fix azerty ctrl+w
This commit is contained in:
parent
2c0398e1ad
commit
e57cc0a8b2
1 changed files with 7 additions and 4 deletions
|
|
@ -76,10 +76,13 @@ module.exports = function(options={}) {
|
|||
|
||||
if (process.platform !== 'darwin') {
|
||||
// already registered in app menu on macOs
|
||||
// ISSUE seems to bind ctrl+z as well (FR keyboard ?)
|
||||
shortcut.register(window,'CmdOrCtrl+W',function(){
|
||||
// window.close()
|
||||
})
|
||||
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) {
|
||||
window.close()
|
||||
}
|
||||
});
|
||||
}
|
||||
|
||||
if (options.shortcuts) {
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue