Skip to content

Instantly share code, notes, and snippets.

@deepak1556
Created December 12, 2019 01:12
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save deepak1556/f118526cde676c1283244d8a27dbd720 to your computer and use it in GitHub Desktop.
Save deepak1556/f118526cde676c1283244d8a27dbd720 to your computer and use it in GitHub Desktop.
Super key menu labelling issue on linux
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