Class ScreenEvent.KeyInput
java.lang.Object
net.neoforged.bus.api.Event
net.neoforged.neoforge.client.event.ScreenEvent
net.neoforged.neoforge.client.event.ScreenEvent.KeyInput
- Direct Known Subclasses:
ScreenEvent.KeyPressed, ScreenEvent.KeyReleased
- Enclosing class:
ScreenEvent
Fired whenever a keyboard key is pressed or released.
See the various subclasses to listen for key pressing or releasing.
- See Also:
-
Nested Class Summary
Nested classes/interfaces inherited from class ScreenEvent
ScreenEvent.CharacterTyped, ScreenEvent.Closing, ScreenEvent.Init, ScreenEvent.KeyPressed, ScreenEvent.KeyReleased, ScreenEvent.MouseButtonPressed, ScreenEvent.MouseButtonReleased, ScreenEvent.MouseDragged, ScreenEvent.MouseScrolled, ScreenEvent.Opening, ScreenEvent.Preedit, ScreenEvent.Render, ScreenEvent.RenderInventoryMobEffects -
Field Summary
Fields -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionintgetKey()Returns theSDLphysical key code.intReturns theSDLvirtual key code.intReturns a bit field representing the active modifier keys.Methods inherited from class ScreenEvent
getScreen
-
Field Details
-
keyEvent
-
-
Constructor Details
-
KeyInput
-
-
Method Details
-
getKeyEvent
-
getKey
public int getKey()Returns theSDLphysical key code.- Returns:
- the
SDLphysical key code - See Also:
-
getKeycode
public int getKeycode()Returns theSDLvirtual key code.- Returns:
- the
SDLvirtual key code - See Also:
-
getModifiers
public int getModifiers()Returns a bit field representing the active modifier keys.- Returns:
- a bit field representing the active modifier keys
- See Also:
-