main.js 382 B

12345678910111213
  1. const { app, BrowserWindow } = require('electron/main')
  2. app.whenReady().then(() => {
  3. const win = new BrowserWindow({ width: 800, height: 600 })
  4. win.loadFile('index.html')
  5. win.webContents.on('before-input-event', (event, input) => {
  6. if (input.control && input.key.toLowerCase() === 'i') {
  7. console.log('Pressed Control+I')
  8. event.preventDefault()
  9. }
  10. })
  11. })