Handles all keyboard input for the menu and user-registered keys registered through Menu.GlobalAccelerator
| Name | Type | Description | |||||||||
|---|---|---|---|---|---|---|---|---|---|---|---|
options |
object |
|
Methods
-
clear all user-registered keys
-
register a key as a global accelerator
Name Type Description keyCodeKeyCodes (e.g., Ctrl+shift+E)
callbackfunction
Type Definitions
-
Keycodes definition. In the form of modifier[+modifier...]+key
For example: ctrl+shift+e
KeyCodes are case insensitive (i.e., shift+a is the same as Shift+A)
Modifiers: ctrl, alt, shift, meta, (ctrl aliases: command, control, commandorcontrol)
Keys: escape, 0-9, minus, equal, backspace, tab, a-z, backetleft, bracketright, semicolon, quote, backquote, backslash, comma, period, slash, numpadmultiply, space, capslock, f1-f24, pause, scrolllock, printscreen, home, arrowup, arrowleft, arrowright, arrowdown, pageup, pagedown, end, insert, delete, enter, shiftleft, shiftright, ctrlleft, ctrlright, altleft, altright, shiftleft, shiftright, numlock, numpad...
For OS-specific codes and a more detailed explanation see https://developer.mozilla.org/en-US/docs/Web/API/KeyboardEvent/code. Also note that 'Digit' and 'Key' are removed from the code to make it easier to type.