- java.lang.Object
-
- java.lang.Enum<KeyEvent.Type>
-
- org.jline.terminal.KeyEvent.Type
-
- All Implemented Interfaces:
java.io.Serializable,java.lang.Comparable<KeyEvent.Type>
- Enclosing class:
- KeyEvent
public static enum KeyEvent.Type extends java.lang.Enum<KeyEvent.Type>
Defines the types of key events that can occur.
-
-
Enum Constant Summary
Enum Constants Enum Constant Description ArrowAn arrow key was pressed.CharacterA printable character was typed.FunctionA function key was pressed (F1-F35).KeypadA keypad key was pressed.MediaA media key was pressed.ModifierKeyA modifier key was pressed or released as its own event.SpecialA special key was pressed (Enter, Tab, Escape, etc.).UnknownAn unrecognized key sequence.
-
Method Summary
All Methods Static Methods Concrete Methods Modifier and Type Method Description static KeyEvent.TypevalueOf(java.lang.String name)Returns the enum constant of this type with the specified name.static KeyEvent.Type[]values()Returns an array containing the constants of this enum type, in the order they are declared.
-
-
-
Enum Constant Detail
-
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 Detail
-
values
public static KeyEvent.Type[] values()
Returns an array containing the constants of this enum type, in the order they are declared. This method may be used to iterate over the constants as follows:for (KeyEvent.Type c : KeyEvent.Type.values()) System.out.println(c);
- Returns:
- an array containing the constants of this enum type, in the order they are declared
-
valueOf
public static KeyEvent.Type valueOf(java.lang.String name)
Returns the enum constant of this type with the specified name. The string must match exactly an identifier used to declare an enum constant in this type. (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:
java.lang.IllegalArgumentException- if this enum type has no constant with the specified namejava.lang.NullPointerException- if the argument is null
-
-