Interface ClientScreenInputEvent.KeyPressed
- Enclosing interface:
- ClientScreenInputEvent
public static interface ClientScreenInputEvent.KeyPressed
-
Method Summary
Modifier and TypeMethodDescriptionkeyPressed(net.minecraft.client.Minecraft client, net.minecraft.client.gui.screens.Screen screen, int keyCode, int scanCode, int modifiers) Invoked whenever a key press is performed inside a screen.
-
Method Details
-
keyPressed
EventResult keyPressed(net.minecraft.client.Minecraft client, net.minecraft.client.gui.screens.Screen screen, int keyCode, int scanCode, int modifiers) Invoked whenever a key press is performed inside a screen. Equivalent to Forge'sGuiScreenEvent.KeyboardKeyPressedEventevent.This event is handled in two phases PRE and POST, which are invoked before and after the keys have been processed by the screen, respectively.
- Parameters:
client- The Minecraft instance performing it.screen- The screen this keystroke was performed in.keyCode- The key code.scanCode- The raw keyboard scan code.modifiers- Additional modifiers.- Returns:
- A
EventResultdetermining the outcome of the event, the execution of the vanilla pressing mechanism may be cancelled by the result.
-