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

[callback]

function

Function to handle the event

[remove]

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()>

Also See: