ui.root.setKeyHandler

Sets a keydown event handler to the root panel with a non-predefined key. The handler is fired only once when a user presses the bound key command. The same key will be bound to the latest handler set to it.

UsageReturns
ui.root.setKeyHandler(keyCode, handler, description)
ArgumentTypeDetails
keyCodeListA key code or an array of key codes. For example, ui.Key.A or [ui.Key.SHIFT, ui.Key.A].
handlerFunctionThe handler for the key command.
descriptionString, optionalA short description that explains this key command. The description will be visible in the Shortcuts Menu.