Enum Class Key
- All Implemented Interfaces:
Serializable
,Comparable<Key>
,Constable
Represents a key on a keyboard.
-
Nested Class Summary
Nested classes/interfaces inherited from class java.lang.Enum
Enum.EnumDesc<E extends Enum<E>>
-
Enum Constant Summary
Enum ConstantDescriptionA'B\Backspace ButtonCCaps Lock Button,DDelete ButtonDown Arrow ButtonEEnd ButtonEnter Button=Escape ButtonFF1F10F11F12F13F14F15F16F17F18F19F2F20F21F22F23F24F25F3F4F5F6F7F8F9G`HHome ButtonIInsert ButtonJK0 (Keypad)1 (Keypad)2 (Keypad)3 (Keypad)4 (Keypad)5 (Keypad)6 (Keypad)7 (Keypad)8 (Keypad)9 (Keypad)+ (Keypad)./ (Keypad)Enter Button (Keypad)= (Keypad)* (Keypad)- (Keypad)LLeft Arrow ButtonLeft Alt Button[Left Control ButtonLeft Shift ButtonLeft Super ButtonMMenu Button-N0123456789Num Lock ButtonOPPage Down ButtonPage Up ButtonPause Button.Print Screen ButtonQRRight Arrow ButtonRight Alt Button]Right Control ButtonRight Shift ButtonRight Super ButtonSScroll Lock Button;/' ' (space)TTab ButtonUUp Arrow ButtonVWWorld 1 (non-US #1)World 2 (non-US #2)XYZ -
Method Summary
Modifier and TypeMethodDescriptionfromCode
(int code) Gets the key from the keyboard code.int
getCode()
Gets the keyboard code of this key, as specified by GLFW.static Key
Returns the enum constant of this class with the specified name.static Key[]
values()
Returns an array containing the constants of this enum class, in the order they are declared.
-
Enum Constant Details
-
SPACE
' ' (space) -
APOSTROPHE
' -
COMMA
, -
MINUS
- -
PERIOD
. -
SLASH
/ -
NUM_0
0 -
NUM_1
1 -
NUM_2
2 -
NUM_3
3 -
NUM_4
4 -
NUM_5
5 -
NUM_6
6 -
NUM_7
7 -
NUM_8
8 -
NUM_9
9 -
SEMICOLON
; -
EQUAL
= -
A
A -
B
B -
C
C -
D
D -
E
E -
F
F -
G
G -
H
H -
I
I -
J
J -
K
K -
L
L -
M
M -
N
N -
O
O -
P
P -
Q
Q -
R
R -
S
S -
T
T -
U
U -
V
V -
W
W -
X
X -
Y
Y -
Z
Z -
LEFT_BRACKET
[ -
BACKSLASH
\ -
RIGHT_BRACKET
] -
GRAVE_ACCENT
` -
WORLD_1
World 1 (non-US #1) -
WORLD_2
World 2 (non-US #2) -
ESCAPE
Escape Button -
ENTER
Enter Button -
TAB
Tab Button -
BACKSPACE
Backspace Button -
INSERT
Insert Button -
DELETE
Delete Button -
RIGHT
Right Arrow Button -
LEFT
Left Arrow Button -
DOWN
Down Arrow Button -
UP
Up Arrow Button -
PAGE_UP
Page Up Button -
PAGE_DOWN
Page Down Button -
HOME
Home Button -
END
End Button -
CAPS_LOCK
Caps Lock Button -
SCROLL_LOCK
Scroll Lock Button -
NUM_LOCK
Num Lock Button -
PRINT_SCREEN
Print Screen Button -
PAUSE
Pause Button -
F1
F1 -
F2
F2 -
F3
F3 -
F4
F4 -
F5
F5 -
F6
F6 -
F7
F7 -
F8
F8 -
F9
F9 -
F10
F10 -
F11
F11 -
F12
F12 -
F13
F13 -
F14
F14 -
F15
F15 -
F16
F16 -
F17
F17 -
F18
F18 -
F19
F19 -
F20
F20 -
F21
F21 -
F22
F22 -
F23
F23 -
F24
F24 -
F25
F25 -
KP_0
0 (Keypad) -
KP_1
1 (Keypad) -
KP_2
2 (Keypad) -
KP_3
3 (Keypad) -
KP_4
4 (Keypad) -
KP_5
5 (Keypad) -
KP_6
6 (Keypad) -
KP_7
7 (Keypad) -
KP_8
8 (Keypad) -
KP_9
9 (Keypad) -
KP_DECIMAL
. (Keypad) -
KP_DIVIDE
/ (Keypad) -
KP_MULTIPLY
* (Keypad) -
KP_SUBTRACT
- (Keypad) -
KP_ADD
+ (Keypad) -
KP_ENTER
Enter Button (Keypad) -
KP_EQUAL
= (Keypad) -
LEFT_SHIFT
Left Shift Button -
LEFT_CONTROL
Left Control Button -
LEFT_ALT
Left Alt Button -
LEFT_SUPER
Left Super Button -
RIGHT_SHIFT
Right Shift Button -
RIGHT_CONTROL
Right Control Button -
RIGHT_ALT
Right Alt Button -
RIGHT_SUPER
Right Super Button -
MENU
Menu Button
-
-
Method Details
-
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
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 nameNullPointerException
- if the argument is null
-
getCode
public int getCode()Gets the keyboard code of this key, as specified by GLFW.- Returns:
- the keyboard code
-
fromCode
Gets the key from the keyboard code.- Parameters:
code
- the keyboard code- Returns:
- the key or null if not found
- See Also:
-