Package net.minecraftforge.client.event
Class ScreenEvent.KeyboardKeyEvent
java.lang.Object
net.minecraftforge.eventbus.api.Event
net.minecraftforge.client.event.ScreenEvent
net.minecraftforge.client.event.ScreenEvent.KeyboardKeyEvent
- Direct Known Subclasses:
ScreenEvent.KeyboardKeyPressedEvent
,ScreenEvent.KeyboardKeyReleasedEvent
- Enclosing class:
- ScreenEvent
-
Nested Class Summary
Nested classes/interfaces inherited from class net.minecraftforge.client.event.ScreenEvent
ScreenEvent.BackgroundDrawnEvent, ScreenEvent.DrawScreenEvent, ScreenEvent.InitScreenEvent, ScreenEvent.KeyboardCharTypedEvent, ScreenEvent.KeyboardKeyEvent, ScreenEvent.KeyboardKeyPressedEvent, ScreenEvent.KeyboardKeyReleasedEvent, ScreenEvent.MouseClickedEvent, ScreenEvent.MouseDragEvent, ScreenEvent.MouseInputEvent, ScreenEvent.MouseReleasedEvent, ScreenEvent.MouseScrollEvent, ScreenEvent.PotionShiftEvent, ScreenEvent.PotionSizeEvent
Nested classes/interfaces inherited from class net.minecraftforge.eventbus.api.Event
net.minecraftforge.eventbus.api.Event.HasResult, net.minecraftforge.eventbus.api.Event.Result
-
Field Summary
-
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptionint
The keyboard key that was pressed or released https://www.glfw.org/docs/latest/group__keys.htmlint
Bit field representing the modifier keys pressed.int
Platform-specific scan code.Methods inherited from class net.minecraftforge.client.event.ScreenEvent
getScreen
Methods inherited from class net.minecraftforge.eventbus.api.Event
getListenerList, getParentListenerList, getPhase, getResult, hasResult, isCancelable, isCanceled, setCanceled, setPhase, setResult, setup
-
Field Details
-
keyCode
private final int keyCode -
scanCode
private final int scanCode -
modifiers
private final int modifiers
-
-
Constructor Details
-
KeyboardKeyEvent
-
-
Method Details
-
getKeyCode
public int getKeyCode()The keyboard key that was pressed or released https://www.glfw.org/docs/latest/group__keys.html- See Also:
-
key constants starting with "GLFW_KEY_"
-
getScanCode
public int getScanCode()Platform-specific scan code. Used forInputConstants.getKey(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. -
getModifiers
public int getModifiers()Bit field representing the modifier keys pressed. https://www.glfw.org/docs/latest/group__mods.html- See Also:
-
GLFW.GLFW_MOD_SHIFT
GLFW.GLFW_MOD_CONTROL
GLFW.GLFW_MOD_ALT
GLFW.GLFW_MOD_SUPER
-