KeyCode
Overview
KeyCode is an Enum that contains a list of byte key codes representing keys and buttons associated with user input. This Enum also includes not only keyboard keys but also buttons and axes found on gamepads.
This is used in the KeyCode property of InputObject and ContextActionService:BindAction().
Items
Unknown
0
An unknown key code.
Joystick
1
Joystick input.
Backspace
8
The Backspace key.
Tab
9
The Tab key.
Clear
12
The Clear key.
Return
13
The Return (Enter) key.
Pause
19
The Pause key.
Escape
27
The Escape key.
Space
32
The Space (spacebar) key.
QuotedDouble
34
The double quote (") key.
Hash
35
The hash (#) key.
Dollar
36
The dollar sign ($) key.
Percent
37
The percent (%) key.
Ampersand
38
The ampersand (&) key.
Quote
39
The single quote (') key.
LeftParenthesis
40
The left parenthesis (() key.
RightParenthesis
41
The right parenthesis ()) key.
Asterisk
42
The asterisk (*) key.
Plus
43
The plus (+) key.
Comma
44
The comma (,) key.
Minus
45
The minus (-) key.
Period
46
The period (.) key.
Slash
47
The slash (/) key.
Zero
48
The number 0 key.
One
49
The number 1 key.
Two
50
The number 2 key.
Three
51
The number 3 key.
Four
52
The number 4 key.
Five
53
The number 5 key.
Six
54
The number 6 key.
Seven
55
The number 7 key.
Eight
56
The number 8 key.
Nine
57
The number 9 key.
Colon
58
The colon (:) key.
Semicolon
59
The semicolon (;) key.
LessThan
60
The less-than (<) key.
Equals
61
The equals (=) key.
GreaterThan
62
The greater-than (>) key.
Question
63
The question mark (?) key.
At
64
The at sign (@) key.
LeftBracket
91
The left bracket ([) key.
BackSlash
92
The backslash (\) key.
RightBracket
93
The right bracket (]) key.
Caret
94
The caret (^) key.
Underscore
95
The underscore (_) key.
Backquote
96
The backquote (`) key.
A
97
The A key.
B
98
The B key.
C
99
The C key.
D
100
The D key.
E
101
The E key.
F
102
The F key.
G
103
The G key.
H
104
The H key.
I
105
The I key.
J
106
The J key.
K
107
The K key.
L
108
The L key.
M
109
The M key.
N
110
The N key.
O
111
The O key.
P
112
The P key.
Q
113
The Q key.
R
114
The R key.
S
115
The S key.
T
116
The T key.
U
117
The U key.
V
118
The V key.
W
119
The W key.
X
120
The X key.
Y
121
The Y key.
Z
122
The Z key.
LeftCurly
123
The left curly brace ({) key.
Pipe
124
The pipe (`
RightCurly
125
The right curly brace (}) key.
Tilde
126
The tilde (~) key.
Delete
127
The Delete key.
KeypadZero
256
The numpad 0 key.
KeypadOne
257
The numpad 1 key.
KeypadTwo
258
The numpad 2 key.
KeypadThree
259
The numpad 3 key.
KeypadFour
260
The numpad 4 key.
KeypadFive
261
The numpad 5 key.
KeypadSix
262
The numpad 6 key.
KeypadSeven
263
The numpad 7 key.
KeypadEight
264
The numpad 8 key.
KeypadNine
265
The numpad 9 key.
KeypadPeriod
266
The numpad period (.) key.
KeypadDivide
267
The numpad divide (/) key.
KeypadMultiply
268
The numpad multiply (*) key.
KeypadMinus
269
The numpad minus (-) key.
KeypadPlus
270
The numpad plus (+) key.
KeypadEnter
271
The numpad Enter key.
KeypadEquals
272
The numpad equals (=) key.
Up
273
The up arrow key.
Down
274
The down arrow key.
Right
275
The right arrow key.
Left
276
The left arrow key.
Insert
277
The Insert key.
Home
278
The Home key.
End
279
The End key.
PageUp
280
The Page Up key.
PageDown
281
The Page Down key.
F1
282
The F1 function key.
F2
283
The F2 function key.
F3
284
The F3 function key.
F4
285
The F4 function key.
F5
286
The F5 function key.
F6
287
The F6 function key.
F7
288
The F7 function key.
F8
289
The F8 function key.
F9
290
The F9 function key.
F10
291
The F10 function key.
F11
292
The F11 function key.
F12
293
The F12 function key.
F13
294
The F13 function key.
F14
295
The F14 function key.
F15
296
The F15 function key.
NumLock
300
The Num Lock key.
CapsLock
301
The Caps Lock key.
ScrollLock
302
The Scroll Lock key.
RightShift
303
The right Shift key.
LeftShift
304
The left Shift key.
RightControl
305
The right Control key.
LeftControl
306
The left Control key.
RightAlt
307
The right Alt key.
LeftAlt
308
The left Alt key.
RightMeta
309
The right Meta (Windows/Command) key.
LeftMeta
310
The left Meta (Windows/Command) key.
LeftSuper
311
The left Super key.
RightSuper
312
The right Super key.
Mode
313
The Mode key.
Compose
314
The Compose key.
Help
315
The Help key.
316
The Print (screen capture) key.
SysReq
317
The SysReq (System Request) key.
Break
318
The Break key.
Menu
319
The Menu (context menu) key.
Power
320
The Power key.
Euro
321
The euro sign (β¬) key.
Undo
322
The Undo key.
ButtonX
1000
The X button on a gamepad.
ButtonY
1001
The Y button on a gamepad.
ButtonA
1002
The A button on a gamepad.
ButtonB
1003
The B button on a gamepad.
ButtonR1
1004
The right bumper (R1) button on a gamepad.
ButtonL1
1005
The left bumper (L1) button on a gamepad.
ButtonR2
1006
The right trigger (R2) button on a gamepad.
ButtonL2
1007
The left trigger (L2) button on a gamepad.
ButtonR3
1008
The right stick (R3) button on a gamepad.
ButtonL3
1009
The left stick (L3) button on a gamepad.
ButtonStart
1010
The Start button on a gamepad.
ButtonSelect
1011
The Select button on a gamepad.
DPadLeft
1012
The left direction on a gamepad D-pad.
DPadRight
1013
The right direction on a gamepad D-pad.
DPadUp
1014
The up direction on a gamepad D-pad.
DPadDown
1015
The down direction on a gamepad D-pad.
Thumbstick1
1016
The left analog stick on a gamepad.
Thumbstick2
1017
The right analog stick on a gamepad.
See also
InputObjectLast updated