public static class InputEvent.KeyInputEvent extends InputEvent
InputEvent.ClickInputEvent, InputEvent.KeyInputEvent, InputEvent.MouseInputEvent, InputEvent.MouseScrollEvent, InputEvent.RawMouseEvent
Event.HasResult, Event.Result
コンストラクタと説明 |
---|
KeyInputEvent(int key,
int scanCode,
int action,
int modifiers) |
修飾子とタイプ | メソッドと説明 |
---|---|
int |
getAction()
Integer representing the key's action.
|
int |
getKey()
The keyboard key that triggered this event.
|
int |
getModifiers()
Bit field representing the modifier keys pressed.
|
int |
getScanCode()
Platform-specific scan code.
|
getListenerList, getParentListenerList, getPhase, getResult, hasResult, isCancelable, isCanceled, setCanceled, setPhase, setResult, setup
public int getKey()
key constants starting with "GLFW_KEY_"
public int getScanCode()
InputMappings.getInputByCode(int, int)
The scan code is unique for every key, regardless of whether it has a key code.
Scan codes are platform-specific but consistent over time, so keys will have different scan codes depending
on the platform but they are safe to save to disk as custom key bindings.public int getAction()
GLFW.GLFW_PRESS
,
GLFW.GLFW_RELEASE
,
GLFW.GLFW_REPEAT
public int getModifiers()
GLFW.GLFW_MOD_SHIFT
,
GLFW.GLFW_MOD_CONTROL
,
GLFW.GLFW_MOD_ALT
,
GLFW.GLFW_MOD_SUPER