Interface ClientScreenInputEvent.KeyTyped

Enclosing interface:
ClientScreenInputEvent

public static interface ClientScreenInputEvent.KeyTyped
  • Method Summary

    Modifier and Type
    Method
    Description
    charTyped(net.minecraft.client.Minecraft client, net.minecraft.client.gui.screens.Screen screen, char character, int keyCode)
    Invoked whenever a character is typed within a screen.
  • Method Details

    • charTyped

      EventResult charTyped(net.minecraft.client.Minecraft client, net.minecraft.client.gui.screens.Screen screen, char character, int keyCode)
      Invoked whenever a character is typed within a screen. Equivalent to Forge's GuiScreenEvent.KeyboardCharTypedEvent event.

      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.
      character - The typed character.
      keyCode - The key code.
      Returns:
      A EventResult determining the outcome of the event, the execution of the vanilla typing mechanism may be cancelled by the result.