Enum Class KeyEvent.Type

java.lang.Object
java.lang.Enum<KeyEvent.Type>
org.jline.terminal.KeyEvent.Type
All Implemented Interfaces:
Serializable, Comparable<KeyEvent.Type>, Constable
Enclosing class:
KeyEvent

public static enum KeyEvent.Type extends Enum<KeyEvent.Type>
Defines the types of key events that can occur.
  • Enum Constant Details

    • Character

      public static final KeyEvent.Type Character
      A printable character was typed.
    • Arrow

      public static final KeyEvent.Type Arrow
      An arrow key was pressed.
    • Function

      public static final KeyEvent.Type Function
      A function key was pressed (F1-F35).
    • Special

      public static final KeyEvent.Type Special
      A special key was pressed (Enter, Tab, Escape, etc.).
    • Keypad

      public static final KeyEvent.Type Keypad
      A keypad key was pressed.
    • Media

      public static final KeyEvent.Type Media
      A media key was pressed.
    • ModifierKey

      public static final KeyEvent.Type ModifierKey
      A modifier key was pressed or released as its own event. Only reported by the Kitty Keyboard Protocol with ReportAllKeys.
    • Unknown

      public static final KeyEvent.Type Unknown
      An unrecognized key sequence.
  • Method Details

    • values

      public static KeyEvent.Type[] values()
      Returns an array containing the constants of this enum class, in the order they are declared.
      Returns:
      an array containing the constants of this enum class, in the order they are declared
    • valueOf

      public static KeyEvent.Type valueOf(String name)
      Returns the enum constant of this class with the specified name. The string must match exactly an identifier used to declare an enum constant in this class. (Extraneous whitespace characters are not permitted.)
      Parameters:
      name - the name of the enum constant to be returned.
      Returns:
      the enum constant with the specified name
      Throws:
      IllegalArgumentException - if this enum class has no constant with the specified name
      NullPointerException - if the argument is null