Created
September 1, 2021 19:32
-
-
Save voznik/673ce606b0470cd741f38c6b360baf0b to your computer and use it in GitHub Desktop.
electron devtools globalShortcut
This file contains 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
import { remote } from 'electron' | |
remote.globalShortcut.register('CommandOrControl+Shift+K', () => { | |
remote.BrowserWindow.getFocusedWindow().webContents.openDevTools() | |
}) | |
window.addEventListener('beforeunload', () => { | |
remote.globalShortcut.unregisterAll() | |
}) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment