Register global keyboard shortcuts.
This class can not be created by user, you can only receive its global
instance from the
globalshortcut property of the module:
Register a global keyboard shortcut that,
callback will called when the
accelerator is pressed.
An unsigned ID will returned on success, which can be used to undo the registration. -1 will be returned on error.
This API will fail silently when the accelerator is already taken by other apps, there is no way to know if an accelerator has already been registered by other apps.
Unregister the shortcut with the
id returned by
Unregister all shortcuts registered in this app.