- java.lang.Object
-
- java.lang.Enum<KeyEvent.Modifier>
-
- org.jline.terminal.KeyEvent.Modifier
-
- All Implemented Interfaces:
java.io.Serializable,java.lang.Comparable<KeyEvent.Modifier>
- Enclosing class:
- KeyEvent
public static enum KeyEvent.Modifier extends java.lang.Enum<KeyEvent.Modifier>
Defines modifier keys that can be held during a key event.
-
-
Enum Constant Summary
Enum Constants Enum Constant Description AltThe Alt key was held.CapsLockThe Caps Lock key was active.ControlThe Control key was held.HyperThe Hyper key was held.MetaThe Meta key was held.NumLockThe Num Lock key was active.ShiftThe Shift key was held.SuperThe Super (Windows/Command) key was held.
-
Method Summary
All Methods Static Methods Concrete Methods Modifier and Type Method Description static KeyEvent.ModifiervalueOf(java.lang.String name)Returns the enum constant of this type with the specified name.static KeyEvent.Modifier[]values()Returns an array containing the constants of this enum type, in the order they are declared.
-
-
-
Enum Constant Detail
-
Shift
public static final KeyEvent.Modifier Shift
The Shift key was held.
-
Alt
public static final KeyEvent.Modifier Alt
The Alt key was held.
-
Control
public static final KeyEvent.Modifier Control
The Control key was held.
-
Super
public static final KeyEvent.Modifier Super
The Super (Windows/Command) key was held. Reported by the Kitty Keyboard Protocol.
-
Hyper
public static final KeyEvent.Modifier Hyper
The Hyper key was held. Reported by the Kitty Keyboard Protocol.
-
Meta
public static final KeyEvent.Modifier Meta
The Meta key was held. Reported by the Kitty Keyboard Protocol.
-
CapsLock
public static final KeyEvent.Modifier CapsLock
The Caps Lock key was active. Reported by the Kitty Keyboard Protocol.
-
NumLock
public static final KeyEvent.Modifier NumLock
The Num Lock key was active. Reported by the Kitty Keyboard Protocol.
-
-
Method Detail
-
values
public static KeyEvent.Modifier[] 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.Modifier c : KeyEvent.Modifier.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.Modifier 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
-
-