2
2
mirror of https://github.com/Llewellynvdm/nativefier.git synced 2024-06-26 07:13:26 +00:00

Prevent menu from opening on Alt+Shift, by defining Alt+... menu shortcuts (#768)

On Linux if you try to change the keyboard layout with Alt + Shift,
the menu will pop up. Shortcuts are needed because Electron opens
the first menu on pressing `Alt` if no hotkey is assigned.

[Similar issue in RocketChat](https://github.com/RocketChat/Rocket.Chat.Electron/issues/50)
This commit is contained in:
Anas Emad 2019-03-17 16:29:15 +01:00 committed by Ronan Jouchet
parent 07faeb1881
commit a27bb0fd35

View File

@ -36,7 +36,7 @@ function createMenu({
const template = [ const template = [
{ {
label: 'Edit', label: '&Edit',
submenu: [ submenu: [
{ {
label: 'Undo', label: 'Undo',
@ -93,7 +93,7 @@ function createMenu({
], ],
}, },
{ {
label: 'View', label: '&View',
submenu: [ submenu: [
{ {
label: 'Back', label: 'Back',
@ -188,7 +188,7 @@ function createMenu({
], ],
}, },
{ {
label: 'Window', label: '&Window',
role: 'window', role: 'window',
submenu: [ submenu: [
{ {
@ -204,7 +204,7 @@ function createMenu({
], ],
}, },
{ {
label: 'Help', label: '&Help',
role: 'help', role: 'help',
submenu: [ submenu: [
{ {
@ -231,7 +231,7 @@ function createMenu({
if (process.platform === 'darwin') { if (process.platform === 'darwin') {
template.unshift({ template.unshift({
label: 'Electron', label: 'E&lectron',
submenu: [ submenu: [
{ {
label: 'Services', label: 'Services',