]> khamidou — GitHub mirrors - electron.git/commitdiff
Update docs for globalShortcut.register
authorStephen Niedzielski <stephen@niedzielski.com>
Fri, 27 Nov 2015 05:35:22 +0000 (22:35 -0700)
committerStephen Niedzielski <stephen@niedzielski.com>
Fri, 27 Nov 2015 05:38:47 +0000 (22:38 -0700)
Document return value for globalShortcut.register and common failure scenario.

Fix: #3600

docs/api/global-shortcut.md

index a0f069d7f1c569ab5039d2431bc5c9c03e629dc3..ab6123bd877e30d04538ad8a186bde88036f39ed 100644 (file)
@@ -46,7 +46,10 @@ The `global-shortcut` module has the following methods:
 * `callback` Function
 
 Registers a global shortcut of `accelerator`. The `callback` is called when
-the registered shortcut is pressed by the user.
+the registered shortcut is pressed by the user. Returns `true` if the shortcut
+`accelerator` was registered, `false` otherwise. For example, the specified
+`accelerator` has already been registered by another caller or other native
+applications.
 
 ### `globalShortcut.isRegistered(accelerator)`