onKey([callback], [remove])
Class: SwingUI.
Description:
Registers java-wide KeyEvent keyboard key event handler. Handles keyboard keys actions made anywhere on the operating system.
Parameters:
| Name | Type | Default | Description |
|---|---|---|---|
|
|
function |
Function to handle the event |
|
|
|
boolean |
false |
Remove the callback from this event |
Returns:
When called with arguments, returns this instance of SwingUI class, otherwise returns an array of current callbacks.
Type: SwingUI | Array.<function()>
