Lwjgl2Keys
final class Lwjgl2Keys
Package: dev.joid.base.lwjgl2.input · Module: base-lwjgl2 · Source: Lwjgl2Keys.java
Backends: LWJGL 2
Maps the key codes of LWJGL 2 to the keys of JOID and back, by physical position or through the character that the key typed.
Description
Section titled “Description”LWJGL 2 does not tell the layout, so the key of the layout comes from the character of each press, remembered for the presses with a modifier.
Learn more
Section titled “Learn more”Methods
Section titled “Methods”| Returns | Signature | Summary |
|---|---|---|
int | getCode(Key key) static | Returns the LWJGL 2 code at the physical position of the key, or Keyboard.KEY_NONE for a key that LWJGL 2 does not name. |
Key | getPhysicalKey(int code) static | Returns the key at the physical position of the LWJGL 2 code, or Key.UNKNOWN. |
Key | getKey(int code, char character) static | Returns the key that the press typed on the current layout: the key of the character for a letter or symbol key, the key of the position for the others. |
boolean | isKeyDown(Key key) static | If true, LWJGL 2 reports the key at that physical position as pressed. |
Method details
Section titled “Method details”getCode
Section titled “getCode”int getCode(Key key) static
Returns the LWJGL 2 code at the physical position of the key, or Keyboard.KEY_NONE for a key that LWJGL 2 does not name.
getPhysicalKey
Section titled “getPhysicalKey”Key getPhysicalKey(int code) static
Returns the key at the physical position of the LWJGL 2 code, or Key.UNKNOWN.
getKey
Section titled “getKey”Key getKey(int code, char character) static
Returns the key that the press typed on the current layout: the key of the character for a letter or symbol key, the key of the position for the others. With Control, a letter types a control character, which gives its letter. With Shift or Alt held, or Control on another key, it returns the key that this position typed last without a modifier.
isKeyDown
Section titled “isKeyDown”boolean isKeyDown(Key key) static
If true, LWJGL 2 reports the key at that physical position as pressed.
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
