Created
December 12, 2019 01:12
-
-
Save deepak1556/f118526cde676c1283244d8a27dbd720 to your computer and use it in GitHub Desktop.
Super key menu labelling issue on linux
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
const {app, BrowserWindow, Menu} = require('electron') | |
app.on('ready', function() { | |
var mainWindow = new BrowserWindow({}); | |
var menuTemplate = [ | |
{ | |
label: 'View', | |
submenu: [ | |
{ | |
label: 'Super Key example', | |
accelerator: 'Ctrl+Super+A', | |
click: function() { | |
console.log("Command+Super+A event"); | |
}, | |
}, | |
{ | |
label: 'Quit', | |
accelerator: 'Command+Q', | |
click: function() { app.quit(); } | |
}, | |
], | |
}, | |
]; | |
Menu.setApplicationMenu(Menu.buildFromTemplate(menuTemplate)); | |
}); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment