Created
October 31, 2017 08:44
-
-
Save jiafangtao/dba1a2bae667c8d24172863db3fbe600 to your computer and use it in GitHub Desktop.
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
// register global shortcuts | |
var { globalShortcut } = require('electron'); | |
var ret = globalShortcut.register('CommandOrControl+Down', function () { | |
console.log ('Key down is pressed with globalShortcut'); | |
}); | |
if (!ret) { | |
console.log ('failed to register shortcut'); | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment