electron: ctrl+w close on keyDown only
This commit is contained in:
parent
7858a44974
commit
d38e377346
1 changed files with 1 additions and 1 deletions
|
|
@ -79,7 +79,7 @@ module.exports = function(options={}) {
|
|||
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)
|
||||
if ((input.key === 'w' || input.key === 'W') && input.control) {
|
||||
if ((input.key === 'w' || input.key === 'W') && input.control && input.type === 'keyDown') {
|
||||
window.close()
|
||||
}
|
||||
})
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue