Optionalkey: string
Keys such as ctrl+shift+=; separate several with commas.
Optionalhandler: The function or { keydown, keyup } object to call.
Optionalkeydown?: (event: KeyboardEvent) => unknownCalled when the shortcut key is pressed.
Optionalkeyup?: (event: KeyboardEvent) => unknownCalled when the shortcut key is released.
Binds keys. With a handler, the handler is called on keydown (a function) or on keydown and keyup (
{ keydown, keyup }). Without a handler, the key gets its built-in shortcut back, for exampleKeys.CTRL_EQUALzooms in. Without arguments, all shortcuts resume.