Interface ClientRawInputEvent.KeyPressed
- Enclosing interface:
- ClientRawInputEvent
public static interface ClientRawInputEvent.KeyPressed
-
Method Summary
Modifier and TypeMethodDescriptionnet.minecraft.world.InteractionResult
keyPressed
(net.minecraft.client.Minecraft client, int keyCode, int scanCode, int action, int modifiers) Invoked whenever a key input is performed.
-
Method Details
-
keyPressed
net.minecraft.world.InteractionResult keyPressed(net.minecraft.client.Minecraft client, int keyCode, int scanCode, int action, int modifiers) Invoked whenever a key input is performed. Equivalent to Forge'sInputEvent.KeyInputEvent
event.- Parameters:
client
- The Minecraft instance performing it.keyCode
- The key code.scanCode
- The raw keyboard scan code.action
- The action that should be performed.modifiers
- Additional modifiers.- Returns:
- Any other result than
InteractionResult.PASS
leads to the cancellation of the key press.
-