ELECTRON-618 - Initially register global shortcut (#436)

This commit is contained in:
Kiran Niranjan 2018-07-20 12:20:34 +05:30 committed by Vishwas Shashidhar
parent a71d8cb2c7
commit 6489990b19

View File

@ -574,6 +574,9 @@ function doCreateMainWindow(initialUrl, initialBounds, isCustomTitleBar) {
}
}
// This will initially register the global shortcut
globalShortcut.register(isMac ? 'Cmd+Alt+I' : 'Ctrl+Shift+I', devTools);
app.on('browser-window-focus', function () {
globalShortcut.register(isMac ? 'Cmd+Alt+I' : 'Ctrl+Shift+I', devTools);
});