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:
parent
07faeb1881
commit
a27bb0fd35
|
@ -36,7 +36,7 @@ function createMenu({
|
|||
|
||||
const template = [
|
||||
{
|
||||
label: 'Edit',
|
||||
label: '&Edit',
|
||||
submenu: [
|
||||
{
|
||||
label: 'Undo',
|
||||
|
@ -93,7 +93,7 @@ function createMenu({
|
|||
],
|
||||
},
|
||||
{
|
||||
label: 'View',
|
||||
label: '&View',
|
||||
submenu: [
|
||||
{
|
||||
label: 'Back',
|
||||
|
@ -188,7 +188,7 @@ function createMenu({
|
|||
],
|
||||
},
|
||||
{
|
||||
label: 'Window',
|
||||
label: '&Window',
|
||||
role: 'window',
|
||||
submenu: [
|
||||
{
|
||||
|
@ -204,7 +204,7 @@ function createMenu({
|
|||
],
|
||||
},
|
||||
{
|
||||
label: 'Help',
|
||||
label: '&Help',
|
||||
role: 'help',
|
||||
submenu: [
|
||||
{
|
||||
|
@ -231,7 +231,7 @@ function createMenu({
|
|||
|
||||
if (process.platform === 'darwin') {
|
||||
template.unshift({
|
||||
label: 'Electron',
|
||||
label: 'E&lectron',
|
||||
submenu: [
|
||||
{
|
||||
label: 'Services',
|
||||
|
|
Loading…
Reference in New Issue