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.
Description
Section titled “Description”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.
Learn more
Section titled “Learn more”Creation
Section titled “Creation”| Returns | Signature | Summary |
|---|---|---|
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. |
Methods
Section titled “Methods”| Returns | Signature | Summary |
|---|---|---|
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. |
Key | getPhysicalKey() | Returns the place of the key on a US QWERTY keyboard, whatever the layout. |
Inherited from NodeInputEvent (2)
Creation details
Section titled “Creation details”create
Section titled “create”<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.
Method details
Section titled “Method details”getKey
Section titled “getKey”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.
getPhysicalKey
Section titled “getPhysicalKey”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
