[ type ] KeyEvent

Description:

Key event received by the onKey() handler callback.

Type: Object

Properties:

Name Type Description

target

object

The component that triggered the event.

type

string

One of up, down, type.

keyCode

number

Numeric code associated with the key.

[extendedKeyCode]

number

Unique id assigned to a key depending on the current keyboard layout. Not present for global ui.onKey() events.

[keyChar]

string

The character produced by the key. Present only for type events.

[modifiers]

number

Keyboard modifiers (bitmask or flags).

[modifiersText]

string

Human-readable representation of modifiers.

[alt]

boolean

Indicates if ALT key was pressed.

[shift]

boolean

Indicates if SHIFT key was pressed.

[ctrl]

boolean

Indicates if CTRL key was pressed.

[meta]

boolean

Indicates if META (Windows or Command) key was pressed.

[keyLocation]

string

One of standard, numpad, left, right. Present for up and down events.

Also See: