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

@ -1,5 +1,11 @@
# Changelog
# 1.8.8
- windows
- remove `ctrl+w` shortcut for closing a window (use `alt+f4` instead)
## 1.8.7
- midi

View file

@ -49,7 +49,7 @@ Modals are virtual popup windows that may contain various content: file browser,
## Keyboard shortcuts
=== "Linux / Windows"
=== "Linux"
| Shortcut | Description |
|---|---|
@ -60,6 +60,17 @@ Modals are virtual popup windows that may contain various content: file browser,
| ++ctrl+o++ | open a session file |
| ++ctrl+w++ | close client |
=== "Windows"
| Shortcut | Description |
|---|---|
| ++ctrl+e++ | enable/disable editor |
| ++ctrl+k++ | show/hide console |
| ++ctrl+s++ | save session |
| ++ctrl+shift+s++ | save session as... |
| ++ctrl+o++ | open a session file |
| ++alt+f4++ | close client |
=== "Mac"
| Shortcut | Description |

View file

@ -26,12 +26,18 @@ The console diplays various informations, runtime errors and server debug messag
## Keyboard shortcuts
=== "Linux / Windows"
=== "Linux"
| Shortcut | Description |
|---|---|
| ++ctrl+w++ | close window |
=== "Windows"
| Shortcut | Description |
|---|---|
| ++alt+f4++ | close window |
=== "Mac"
| Shortcut | Description |

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)