public abstract static class GuiScreenEvent.KeyboardKeyEvent extends GuiScreenEvent
GuiScreenEvent.ActionPerformedEvent, GuiScreenEvent.BackgroundDrawnEvent, GuiScreenEvent.DrawScreenEvent, GuiScreenEvent.InitGuiEvent, GuiScreenEvent.KeyboardCharTypedEvent, GuiScreenEvent.KeyboardKeyEvent, GuiScreenEvent.KeyboardKeyPressedEvent, GuiScreenEvent.KeyboardKeyReleasedEvent, GuiScreenEvent.MouseClickedEvent, GuiScreenEvent.MouseDragEvent, GuiScreenEvent.MouseInputEvent, GuiScreenEvent.MouseReleasedEvent, GuiScreenEvent.MouseScrollEvent, GuiScreenEvent.PotionShiftEvent
Event.HasResult, Event.Result
コンストラクタと説明 |
---|
KeyboardKeyEvent(Screen gui,
int keyCode,
int scanCode,
int modifiers) |
修飾子とタイプ | メソッドと説明 |
---|---|
int |
getKeyCode()
The keyboard key that was pressed or released
https://www.glfw.org/docs/latest/group__keys.html
|
int |
getModifiers()
Bit field representing the modifier keys pressed.
|
int |
getScanCode()
Platform-specific scan code.
|
getGui
getListenerList, getParentListenerList, getPhase, getResult, hasResult, isCancelable, isCanceled, setCanceled, setPhase, setResult, setup
public KeyboardKeyEvent(Screen gui, int keyCode, int scanCode, int modifiers)
public int getKeyCode()
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 getModifiers()
GLFW.GLFW_MOD_SHIFT
,
GLFW.GLFW_MOD_CONTROL
,
GLFW.GLFW_MOD_ALT
,
GLFW.GLFW_MOD_SUPER