Skip to main content
Represents a keyboard interaction.

Fields

key

The key code of the pressed key.

shift

True if the Shift modifier is active.

control

True if the Control modifier is active.

alt

True if the Alt modifier is active.

meta

True if the Meta (Command/Windows) modifier is active.

phase

The current phase (KeyPhase) of the interaction.

Methods

hit

Claims the key so it goes no further. From a listener action (ListenerContext:asKeyboardEvent()), bare hit() stops the key at the listener’s target: on a capture-phase listener, nothing inside its target, a text input included, ever sees it, and when it was the press, its repeats and release stay away too. hit(true) only marks it seen and lets it go on. In a node’s keyboardEvent, hit() stops propagation like returning true.