- All Implemented Interfaces:
Serializable
,Comparable<KeyType>
,java.lang.constant.Constable
This enum is a categorization of the various keys available on a normal computer keyboard that are usable
(detectable) by a terminal environment. For ordinary numbers, letters and symbols, the enum value is Character
but please keep in mind that newline and tab, usually represented by \n and \t, are considered their own separate
values by this enum (Enter and Tab).
Previously (before Lanterna 3.0), this enum was embedded inside the Key class.
-
Nested Class Summary
Nested classes/interfaces inherited from class java.lang.Enum
Enum.EnumDesc<E extends Enum<E>>
-
Enum Constant Summary
Enum ConstantsEnum ConstantDescriptionThis value corresponds to a regular character 'typed', usually alphanumeric or a symbol.This value is only internally within Lanterna to understand where the cursor currently is, it's not expected to be returned by the API to an input read call.This value is returned when you try to read input and the input stream has been closed.This type is not really a key stroke but actually a 'catch-all' for mouse related events. -
Constructor Summary
Constructors -
Method Summary
-
Enum Constant Details
-
Character
This value corresponds to a regular character 'typed', usually alphanumeric or a symbol. The one special case here is the enter key which could be expected to be returned as a '\n' character but is actually returned as a separateKeyType
(see below). Tab, backspace and some others works this way too. -
Escape
-
Backspace
-
ArrowLeft
-
ArrowRight
-
ArrowUp
-
ArrowDown
-
Insert
-
Delete
-
Home
-
End
-
PageUp
-
PageDown
-
Tab
-
ReverseTab
-
Enter
-
F1
-
F2
-
F3
-
F4
-
F5
-
F6
-
F7
-
F8
-
F9
-
F10
-
F11
-
F12
-
F13
-
F14
-
F15
-
F16
-
F17
-
F18
-
F19
-
Unknown
-
CursorLocation
This value is only internally within Lanterna to understand where the cursor currently is, it's not expected to be returned by the API to an input read call. -
MouseEvent
This type is not really a key stroke but actually a 'catch-all' for mouse related events. Please note that mouse event capturing must first be enabled and many terminals don't suppose this extension at all. -
EOF
This value is returned when you try to read input and the input stream has been closed.
-
-
Constructor Details
-
KeyType
private KeyType()
-
-
Method Details
-
values
Returns an array containing the constants of this enum type, in the order they are declared.- Returns:
- an array containing the constants of this enum type, in the order they are declared
-
valueOf
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:
IllegalArgumentException
- if this enum type has no constant with the specified nameNullPointerException
- if the argument is null
-