Clean up code in global shortcut code example

This commit is contained in:
Thomas Tuts 2015-06-09 18:01:09 +02:00
parent 6d756d9d13
commit e829a28947

View file

@ -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'));