Package net.minecraftforge.client.event
Class GuiScreenEvent.KeyboardKeyEvent
- java.lang.Object
-
- net.minecraftforge.eventbus.api.Event
-
- net.minecraftforge.client.event.GuiScreenEvent
-
- net.minecraftforge.client.event.GuiScreenEvent.KeyboardKeyEvent
-
- Direct Known Subclasses:
GuiScreenEvent.KeyboardKeyPressedEvent
,GuiScreenEvent.KeyboardKeyReleasedEvent
- Enclosing class:
- GuiScreenEvent
public abstract static class GuiScreenEvent.KeyboardKeyEvent extends GuiScreenEvent
-
-
Nested Class Summary
-
Nested classes/interfaces inherited from class net.minecraftforge.client.event.GuiScreenEvent
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
-
-
Constructor Summary
Constructors Constructor Description KeyboardKeyEvent(Screen gui, int keyCode, int scanCode, int modifiers)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description int
getKeyCode()
The keyboard key that was pressed or released https://www.glfw.org/docs/latest/group__keys.htmlint
getModifiers()
Bit field representing the modifier keys pressed.int
getScanCode()
Platform-specific scan code.-
Methods inherited from class net.minecraftforge.client.event.GuiScreenEvent
getGui
-
-
-
-
Constructor Detail
-
KeyboardKeyEvent
public KeyboardKeyEvent(Screen gui, int keyCode, int scanCode, int modifiers)
-
-
Method Detail
-
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 forInputMappings#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.
-
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
-
-