Interface: HasKeyEvents

olympe.ui.events. HasKeyEvents

Keyboard events interface for the CoreThread Note: All callbacks must be executed with the same node than the one which registered the callback

Methods


<abstract> getEventKeyDown()

Gets the 'Key Down' events. i.e. the key has been pressed down.

Returns:

Key event

Type
olympe.df.Proxy.<olympe.ui.events.KeyEvent> | olympe.ui.events.KeyEvent

<abstract> getEventKeyPressed()

Gets the 'Key Pressed' events. i.e. a key has been pressed then released.

Returns:

Key event

Type
olympe.df.Proxy.<olympe.ui.events.KeyEvent> | olympe.ui.events.KeyEvent

<abstract> getEventKeyUp()

Gets the 'Key Up' events. i.e. when a key is released back after being pressed.

Returns:

Key event

Type
olympe.df.Proxy.<olympe.ui.events.KeyEvent> | olympe.ui.events.KeyEvent

<abstract> offKeyDown(id)

Unregisters a callback from 'Key Down' events.

Parameters:
Name Type Description
id string

id the Id of the callback (returned by onKeyDown)


<abstract> offKeyPressed(id)

Unregisters a callback from 'Key Pressed' events.

Parameters:
Name Type Description
id string

id the Id of the callback (returned by onKeyPressed)


<abstract> offKeyUp(id)

Unregisters a callback from 'Key Up' events.

Parameters:
Name Type Description
id string

id the Id of the callback (returned by onKeyUp)


<abstract> onKeyDown(callback [, id] [, priority])

Registers a callback for 'Key Down' events.

Parameters:
Name Type Argument Default Description
callback olympe.ui.events.OnKeyEventCallback

the callback to register

id string <optional>

Id of event auto-generated if omitted

priority number <optional>
0

Priority of event (higher number = higher priority)

Returns:

Id of the callback

Type
string

<abstract> onKeyPressed(callback [, id] [, priority])

Registers a callback for 'Key Pressed' events.

Parameters:
Name Type Argument Default Description
callback olympe.ui.events.OnKeyEventCallback

the callback to register

id string <optional>

Id of event auto-generated if omitted

priority number <optional>
0

Priority of event (higher number = higher priority)

Returns:

Id of the callback

Type
string

<abstract> onKeyUp(callback [, id] [, priority])

Registers a callback for 'Key Up' events.

Parameters:
Name Type Argument Default Description
callback olympe.ui.events.OnKeyEventCallback

the callback to register

id string <optional>

Id of event auto-generated if omitted

priority number <optional>
0

Priority of event (higher number = higher priority)

Returns:

Id of the callback

Type
string