Skip to content

NodeKeyEvent

final class NodeKeyEvent<N extends Node>
Extends: NodeInputEvent<N>
Package: dev.joid.lib.ui.event.impl.node · Module: core · Source: NodeKeyEvent.java

The event of handleKeyPressed and handleKeyReleased on a node, with the key that the layout names and its place on the keyboard.

Every visible node of the UI receives the keys, whether the pointer is over it or not; the release reaches every node, even hidden or disabled. A held key sends one press and one release, never a repeat.

ReturnsSignatureSummary
NodeKeyEvent<N>create(N node, Key physicalKey, Key key, IConsumableEvent source) factoryCreates the event for a node, the place of the key and the key that the layout names.

ReturnsSignatureSummary
KeygetKey()Returns the key that the layout of the user names: on a French AZERTY keyboard, the key at the place of Q is Key.A.
KeygetPhysicalKey()Returns the place of the key on a US QWERTY keyboard, whatever the layout.
Inherited from NodeInputEvent (2)

consume · isConsumed

Inherited from NodeEvent (1)

getNode

<N extends Node> NodeKeyEvent<N> create(N node, Key physicalKey, Key key, IConsumableEvent source) factory

Creates the event for a node, the place of the key and the key that the layout names. source is the input that the event belongs to, or null for an input of its own.

Key getKey()

Returns the key that the layout of the user names: on a French AZERTY keyboard, the key at the place of Q is Key.A. Use it for a shortcut.

Key getPhysicalKey()

Returns the place of the key on a US QWERTY keyboard, whatever the layout. Use it for a movement, so that the keys stay under the same fingers on every layout.


fluent returns the instance, typed for chaining · factory creates an instance · signal also accepts a value that follows signals, as a signal, an expression or a lambda (When does JOID compute this value again?) · hook called by JOID, override it · abstract you implement it · default interface method with a body · static called on the class · protected visible to subclasses

Report a problem with this page