Class KeyInputEvent

java.lang.Object
org.polyfrost.oneconfig.api.event.v1.events.KeyInputEvent
All Implemented Interfaces:
Event

public class KeyInputEvent extends Object implements Event
Raw key event dispatched by the Minecraft instance.
If you want to translate this into something usable by PolyUI, have a look at KeybindManager.translateKey(EventManager, keyCode, character, down)
  • Nested Class Summary

    Nested classes/interfaces inherited from interface org.polyfrost.oneconfig.api.event.v1.events.Event

    Event.Cancellable
  • Field Summary

    Fields
    Modifier and Type
    Field
    Description
    final char
    The character that created this event.
    A value of 0 indicates this was not a character event but a coded event (see key)
    final int
    The keycode that created this event.
    final int
    0 = up
    1 = down
    2 = repeat
  • Constructor Summary

    Constructors
    Constructor
    Description
    KeyInputEvent(int key, char character, int state)
     
  • Method Summary

    Modifier and Type
    Method
    Description
    int
     
    char
     
    int
     
    boolean
     

    Methods inherited from class java.lang.Object

    clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
  • Field Details

    • key

      public final int key
      The keycode that created this event. A value of 0 indicates this was not a coded event but a character event (see character)
    • character

      public final char character
      The character that created this event.
      A value of 0 indicates this was not a character event but a coded event (see key)
    • state

      public final int state
      0 = up
      1 = down
      2 = repeat
  • Constructor Details

    • KeyInputEvent

      public KeyInputEvent(int key, char character, int state)
  • Method Details

    • component1

      public int component1()
    • component2

      public char component2()
    • component3

      public int component3()
    • isPressed

      public boolean isPressed()