Serializable
, Comparable<KeyType>
public enum KeyType extends Enum<KeyType>
Previously (before Lanterna 3.0), this enum was embedded inside the Key class.
Enum Constant | Description |
---|---|
ArrowDown |
|
ArrowLeft |
|
ArrowRight |
|
ArrowUp |
|
Backspace |
|
Character |
This value corresponds to a regular character 'typed', usually alphanumeric or a symbol.
|
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.
|
Delete |
|
End |
|
Enter |
|
EOF |
This value is returned when you try to read input and the input stream has been closed.
|
Escape |
|
F1 |
|
F10 |
|
F11 |
|
F12 |
|
F13 |
|
F14 |
|
F15 |
|
F16 |
|
F17 |
|
F18 |
|
F19 |
|
F2 |
|
F3 |
|
F4 |
|
F5 |
|
F6 |
|
F7 |
|
F8 |
|
F9 |
|
Home |
|
Insert |
|
MouseEvent |
This type is not really a key stroke but actually a 'catch-all' for mouse related events.
|
PageDown |
|
PageUp |
|
ReverseTab |
|
Tab |
|
Unknown |
Modifier and Type | Method | Description |
---|---|---|
static KeyType |
valueOf(String name) |
Returns the enum constant of this type with the specified name.
|
static KeyType[] |
values() |
Returns an array containing the constants of this enum type, in
the order they are declared.
|
public static final KeyType Character
KeyType
(see below). Tab, backspace and some others works this way too.public static final KeyType Escape
public static final KeyType Backspace
public static final KeyType ArrowLeft
public static final KeyType ArrowRight
public static final KeyType ArrowUp
public static final KeyType ArrowDown
public static final KeyType Insert
public static final KeyType Delete
public static final KeyType Home
public static final KeyType End
public static final KeyType PageUp
public static final KeyType PageDown
public static final KeyType Tab
public static final KeyType ReverseTab
public static final KeyType Enter
public static final KeyType F1
public static final KeyType F2
public static final KeyType F3
public static final KeyType F4
public static final KeyType F5
public static final KeyType F6
public static final KeyType F7
public static final KeyType F8
public static final KeyType F9
public static final KeyType F10
public static final KeyType F11
public static final KeyType F12
public static final KeyType F13
public static final KeyType F14
public static final KeyType F15
public static final KeyType F16
public static final KeyType F17
public static final KeyType F18
public static final KeyType F19
public static final KeyType Unknown
public static final KeyType CursorLocation
public static final KeyType MouseEvent
public static final KeyType EOF
public static KeyType[] values()
for (KeyType c : KeyType.values()) System.out.println(c);
public static KeyType valueOf(String name)
name
- the name of the enum constant to be returned.IllegalArgumentException
- if this enum type has no constant with the specified nameNullPointerException
- if the argument is nullCopyright © 2020. All rights reserved.