Class ScreenEvent.KeyPressed.Pre

Enclosing class:
ScreenEvent.KeyPressed

public static class ScreenEvent.KeyPressed.Pre extends ScreenEvent.KeyPressed
Fired before the key press is handled by the screen.

This event is cancellable and does not have a result. If the event is cancelled, the screen's key press handler will be bypassed and the corresponding ScreenEvent.KeyPressed.Post will not be fired.

This event is fired on the main Forge event bus, only on the logical client.

  • Constructor Details

    • Pre

      @Internal public Pre(Screen screen, int keyCode, int scanCode, int modifiers)