windows: remove ctrl+w shortcut for closing a window (use alt+f4 instead)

This commit is contained in:
bordun 2021-02-17 09:13:19 +01:00
parent 7aaf6b1358
commit 28fe6dc17c
4 changed files with 27 additions and 3 deletions

View file

@ -114,8 +114,9 @@ module.exports = function(options={}) {
window.loadURL(options.address)
if (process.platform !== 'darwin') {
if (process.platform === 'linux') {
// already registered in app menu on macOs
// already bound to alt+f4 on windows
window.webContents.on('before-input-event', (e, input)=>{
// using before-input-event because electron-localshortcut
// gets azerty keyboards wrong (ctrl + z would also be catched)