Namespaces

Variants

Share

Share
Views
Actions
In other languages

Key codes

From Minecraft Wiki
Jump to: navigation, search

This is a list of key codes used by LWJGL, and by extension Minecraft, which are used in configuration files such as the options.txt file in the Minecraft directory.

Contents

[edit] Keyboard codes

[edit] IBM Windows US Keyboard / QWERTY Keyboard

Esc
1
F1
59
F2
60
F3
61
F4
62
F5
63
F6
64
F7
65
F8
66
F9
67
F10
68
F11
87
F12
88
SysRq
183
Scroll
Lk 70
Pause
197
~
` 41
!
1 2
@ 145
2 3
#
3 4
$
4 5
%
5 6
^ 144
6 7
&
7 8
*
8 9
(
9 10
)
0 11
_ 147
- 12
+
= 13
Backspace
14
Insert
210
Home
199
Page
Up 201
Num
Lk 69
/
181
*
55
-
74
Tab
15
Q
16
W
17
E
18
R
19
T
20
Y
21
U
22
I
23
O
24
P
25
{
[ 26
}
] 27
|
\ 43
Delete
211
End
207
Page
Dn 209
7
71
8
72
9
73
+
78
Caps Lock
58
A
30
S
31
D
32
F
33
G
34
H
35
J
36
K
37
L
38
: 146
; 39
"
' 40
Enter
28
4
75
5
76
6
77
Shift
42
Z
44
X
45
C
46
V
47
B
48
N
49
M
50
<
, 51
>
. 52
?
/ 53
Shift
54
200
1
79
2
80
3
81
Ent
156
Control
29
Meta
219
Alt
56
57
Alt
184
Meta
220
Menu
184
Control
157
203
208
205
0
82
.
83

Larger view of keyboard.

[edit] Full table

Value Name Description
0 NONE [1]
1 ESCAPE Escape
2 1
3 2
4 3
5 4
6 5
7 6
8 7
9 8
10 9
11 0
12 MINUS -
13 EQUALS =
14 BACK Backspace
15 TAB Tab
16 Q
17 W
18 E
19 R
20 T
21 Y
22 U
23 I
24 O
25 P
26 LBRACKET [
27 RBRACKET ]
28 RETURN Enter
29 LCONTROL Left Control
30 A
31 S
32 D
33 F
34 G
35 H
36 J
37 K
38 L
39 SEMICOLON  ;
40 APOSTROPHE '
41 GRAVE `
42 LSHIFT Left Shift
43 BACKSLASH \
44 Z
45 X
46 C
47 V
48 B
49 N
50 M
51 COMMA ,
52 PERIOD .
53 SLASH /
54 RSHIFT Right Shift
55 MULTIPLY
56 LMENU [2] Left Menu/Alt
57 SPACE
58 CAPITAL Caps Lock
59 F1
60 F2
61 F3
62 F4
Value Name Description
63 F5
64 F6
65 F7
66 F8
67 F9
68 F10
69 NUMLOCK Number Lock
70 SCROLL Scroll Lock
71 NUMPAD7
72 NUMPAD8
73 NUMPAD9
74 SUBTRACT
75 NUMPAD4
76 NUMPAD5
77 NUMPAD6
78 ADD
79 NUMPAD1
80 NUMPAD2
81 NUMPAD3
82 NUMPAD0
83 DECIMAL
87 F11
88 F12
100 F13
101 F14
102 F15
112 KANA
121 CONVERT
123 NOCONVERT
125 YEN ¥
141 NUMPADEQUALS
144 CIRCUMFLEX ^
145 AT @
146 COLON  :
147 UNDERLINE _
148 KANJI
149 STOP
150 AX
151 UNLABLED
156 NUMPADENTER
157 RCONTROL Right Control
179 NUMPADCOMMA
181 DIVIDE
183 SYSRQ
184 RMENU [2] Right Menu/Alt
197 PAUSE
199 HOME
200 UP Up Arrow
201 PRIOR Page Up
203 LEFT Left Arrow
205 RIGHT Right Arrow
207 END
208 DOWN Down Arrow
209 NEXT Page Down
210 INSERT
211 DELETE
219 LMETA Left Meta/Super
LWIN [3]
220 RMETA Right Meta/Super
RWIN [3]
221 APPS
222 POWER
223 SLEEP

[edit] Mouse codes

LWJGL supports a maximum of 16 mouse buttons. The Minecraft game settings screen translates button 0 to "Button 1", button 1 to "Button 2", etc.

Value LWJGL
Name
Description
LWJGL Minecraft
0 -100 BUTTON0 Left Click
1 -99 BUTTON1 Right Click
2 -98 BUTTON2 Middle Click
3 -97 BUTTON3
4 -96 BUTTON4
5 -95 BUTTON5
6 -94 BUTTON6
7 -93 BUTTON7
Value LWJGL
Name
Description
LWJGL Minecraft
8 -92 BUTTON8
9 -91 BUTTON9
10 -90 BUTTON10
11 -89 BUTTON11
12 -88 BUTTON12
13 -87 BUTTON13
14 -86 BUTTON14
15 -85 BUTTON15

[edit] Notes

  1. LWJGL returns key code 0 when a key is pressed but it doesn't know what key.
  2. a b
    LWJGL maps the menu key and the alt key to the same value.
  3. a b
    The use of the names "LWIN" and "RWIN" are officially deprecated and the names "LMETA" and "RMETA" should be used instead.