Clean up code in global shortcut code example
This commit is contained in:
parent
6d756d9d13
commit
e829a28947
1 changed files with 3 additions and 1 deletions
|
@ -9,8 +9,10 @@ var globalShortcut = require('global-shortcut');
|
|||
|
||||
// Register a 'ctrl+x' shortcut listener.
|
||||
var ret = globalShortcut.register('ctrl+x', function() { console.log('ctrl+x is pressed'); })
|
||||
if (!ret)
|
||||
|
||||
if (!ret) {
|
||||
console.log('registration failed');
|
||||
}
|
||||
|
||||
// Check whether a shortcut is registered.
|
||||
console.log(globalShortcut.isRegistered('ctrl+x'));
|
||||
|
|
Loading…
Reference in a new issue