Skip to content

KeyCode

Supported Enum

Byte keycodes that represent the key or button involved in user input.

Description

The KeyCode enum contains a list of byte keycodes that represent the key or button involved in user input. This enum also includes buttons and axes present on gamepads, and 96 World[] values for non-standard buttons.

Note that keyboard values refer to the physical position of buttons on a standard QWERTY keyboard. Provided the user's system is configured correctly, the location of keys (such as WASD) will remain the same on other keyboard types such as Dvorak keyboards where it would map to ,AOE.

See also InputObject, used for keyboard and gamepad input.

Items

Item Value Status Notes
None 0 Not yet —
Unknown 0 Supported —
Backspace 8 Supported The Backspace key.
Tab 9 Supported The Tab key.
Clear 12 Supported Only present on certain keyboards.
Return 13 Supported Frequently known as Enter.
Pause 19 Supported Only present on certain keyboards.
Escape 27 Supported The Escape key.
Space 32 Supported The Space key.
QuotedDouble 34 Supported The " key.
Hash 35 Supported The # key.
Dollar 36 Supported The $ key.
Percent 37 Supported The % key.
Ampersand 38 Supported The & key.
Quote 39 Supported The ' key.
LeftParenthesis 40 Supported The ( key.
RightParenthesis 41 Supported The ) key.
Asterisk 42 Supported The * key.
Plus 43 Supported The + key.
Comma 44 Supported The , key.
Minus 45 Supported The - key.
Period 46 Supported The . key.
Slash 47 Supported The / key.
Zero 48 Supported The 0 key.
One 49 Supported The 1 key.
Two 50 Supported The 2 key.
Three 51 Supported The 3 key.
Four 52 Supported The 4 key.
Five 53 Supported The 5 key.
Six 54 Supported The 6 key.
Seven 55 Supported The 7 key.
Eight 56 Supported The 8 key.
Nine 57 Supported The 9 key.
Colon 58 Supported The : key.
Semicolon 59 Supported The ; key.
LessThan 60 Supported The < key.
Equals 61 Supported The = key.
GreaterThan 62 Supported The > key.
Question 63 Supported The ? key.
At 64 Supported The @ key.
LeftBracket 91 Supported The [ key.
BackSlash 92 Supported The \ key.
RightBracket 93 Supported The ] key.
Caret 94 Supported The ^ key.
Underscore 95 Supported The _ key.
Backquote 96 Supported The ` key.
A 97 Supported The A key.
B 98 Supported The B key.
C 99 Supported The C key.
D 100 Supported The D key.
E 101 Supported The E key.
F 102 Supported The F key.
G 103 Supported The G key.
H 104 Supported The H key.
I 105 Supported The I key.
J 106 Supported The J key.
K 107 Supported The K key.
L 108 Supported The L key.
M 109 Supported The M key.
N 110 Supported The N key.
O 111 Supported The O key.
P 112 Supported The P key.
Q 113 Supported The Q key.
R 114 Supported The R key.
S 115 Supported The S key.
T 116 Supported The T key.
U 117 Supported The U key.
V 118 Supported The V key.
W 119 Supported The W key.
X 120 Supported The X key.
Y 121 Supported The Y key.
Z 122 Supported The Z key.
LeftCurly 123 Supported The { key.
Pipe 124 Supported The \| key.
RightCurly 125 Supported The } key.
Tilde 126 Supported The ~ key.
Delete 127 Supported The Del key.
World0 160 Supported Deprecated
World1 161 Supported Deprecated
World2 162 Supported Deprecated
World3 163 Supported Deprecated
World4 164 Supported Deprecated
World5 165 Supported Deprecated
World6 166 Supported Deprecated
World7 167 Supported Deprecated
World8 168 Supported Deprecated
World9 169 Supported Deprecated
World10 170 Supported Deprecated
World11 171 Supported Deprecated
World12 172 Supported Deprecated
World13 173 Supported Deprecated
World14 174 Supported Deprecated
World15 175 Supported Deprecated
World16 176 Supported Deprecated
World17 177 Supported Deprecated
World18 178 Supported Deprecated
World19 179 Supported Deprecated
World20 180 Supported Deprecated
World21 181 Supported Deprecated
World22 182 Supported Deprecated
World23 183 Supported Deprecated
World24 184 Supported Deprecated
World25 185 Supported Deprecated
World26 186 Supported Deprecated
World27 187 Supported Deprecated
World28 188 Supported Deprecated
World29 189 Supported Deprecated
World30 190 Supported Deprecated
World31 191 Supported Deprecated
World32 192 Supported Deprecated
World33 193 Supported Deprecated
World34 194 Supported Deprecated
World35 195 Supported Deprecated
World36 196 Supported Deprecated
World37 197 Supported Deprecated
World38 198 Supported Deprecated
World39 199 Supported Deprecated
World40 200 Supported Deprecated
World41 201 Supported Deprecated
World42 202 Supported Deprecated
World43 203 Supported Deprecated
World44 204 Supported Deprecated
World45 205 Supported Deprecated
World46 206 Supported Deprecated
World47 207 Supported Deprecated
World48 208 Supported Deprecated
World49 209 Supported Deprecated
World50 210 Supported Deprecated
World51 211 Supported Deprecated
World52 212 Supported Deprecated
World53 213 Supported Deprecated
World54 214 Supported Deprecated
World55 215 Supported Deprecated
World56 216 Supported Deprecated
World57 217 Supported Deprecated
World58 218 Supported Deprecated
World59 219 Supported Deprecated
World60 220 Supported Deprecated
World61 221 Supported Deprecated
World62 222 Supported Deprecated
World63 223 Supported Deprecated
World64 224 Supported Deprecated
World65 225 Supported Deprecated
World66 226 Supported Deprecated
World67 227 Supported Deprecated
World68 228 Supported Deprecated
World69 229 Supported Deprecated
World70 230 Supported Deprecated
World71 231 Supported Deprecated
World72 232 Supported Deprecated
World73 233 Supported Deprecated
World74 234 Supported Deprecated
World75 235 Supported Deprecated
World76 236 Supported Deprecated
World77 237 Supported Deprecated
World78 238 Supported Deprecated
World79 239 Supported Deprecated
World80 240 Supported Deprecated
World81 241 Supported Deprecated
World82 242 Supported Deprecated
World83 243 Supported Deprecated
World84 244 Supported Deprecated
World85 245 Supported Deprecated
World86 246 Supported Deprecated
World87 247 Supported Deprecated
World88 248 Supported Deprecated
World89 249 Supported Deprecated
World90 250 Supported Deprecated
World91 251 Supported Deprecated
World92 252 Supported Deprecated
World93 253 Supported Deprecated
World94 254 Supported Deprecated
World95 255 Supported Deprecated
KeypadZero 256 Supported The 0 key on the keypad cluster.
KeypadOne 257 Supported The 1 key on the keypad cluster.
KeypadTwo 258 Supported The 2 key on the keypad cluster.
KeypadThree 259 Supported The 3 key on the keypad cluster.
KeypadFour 260 Supported The 4 key on the keypad cluster.
KeypadFive 261 Supported The 5 key on the keypad cluster.
KeypadSix 262 Supported The 6 key on the keypad cluster.
KeypadSeven 263 Supported The 7 key on the keypad cluster.
KeypadEight 264 Supported The 8 key on the keypad cluster.
KeypadNine 265 Supported The 9 key on the keypad cluster.
KeypadPeriod 266 Supported The . key on the keypad cluster.
KeypadDivide 267 Supported The / key on the keypad cluster.
KeypadMultiply 268 Supported The * key on the keypad cluster.
KeypadMinus 269 Supported The - key on the keypad cluster.
KeypadPlus 270 Supported The + key on the keypad cluster.
KeypadEnter 271 Supported The Enter key on the keypad cluster.
KeypadEquals 272 Supported The = key on the keypad cluster.
Up 273 Supported The ↑ arrow key.
Down 274 Supported The ↓ arrow key.
Right 275 Supported The → arrow key.
Left 276 Supported The ← arrow key.
Insert 277 Supported The Insert key.
Home 278 Supported The Home key.
End 279 Supported The End key.
PageUp 280 Supported The PgUp key.
PageDown 281 Supported The PgDown key.
F1 282 Supported The F1 key.
F2 283 Supported The F2 key.
F3 284 Supported The F3 key.
F4 285 Supported The F4 key.
F5 286 Supported The F5 key.
F6 287 Supported The F6 key.
F7 288 Supported The F7 key.
F8 289 Supported The F8 key.
F9 290 Supported The F9 key.
F10 291 Supported The F10 key.
F11 292 Supported The F11 key.
F12 293 Supported The F12 key.
F13 294 Supported The F13 key. Only present on certain keyboards.
F14 295 Supported The F14 key. Only present on certain keyboards.
F15 296 Supported The F15 key. Only present on certain keyboards.
NumLock 300 Supported The Num Lock key on the keypad cluster.
CapsLock 301 Supported The Caps Lock key.
ScrollLock 302 Supported The Scr Lock key.
RightShift 303 Supported The right side Shift key.
LeftShift 304 Supported The left side Shift key.
RightControl 305 Supported The right side Ctrl key.
LeftControl 306 Supported The left side Ctrl key.
RightAlt 307 Supported The right side Alt key.
LeftAlt 308 Supported The left side Alt key.
RightMeta 309 Supported The right side Meta key.
LeftMeta 310 Supported The left side Meta key.
LeftSuper 311 Supported The left side Super key. Better known as the Windows key or Cmd key.
RightSuper 312 Supported The right side Super key. Better known as the Windows key or Cmd key.
Mode 313 Supported Only present on certain keyboards.
Compose 314 Supported Only present on certain keyboards.
Help 315 Supported Only present on certain keyboards.
Print 316 Supported Only present on certain keyboards.
SysReq 317 Supported Only present on certain keyboards.
Break 318 Supported Only present on certain keyboards.
Menu 319 Supported The Menu key.
Power 320 Supported Only present on certain keyboards.
Euro 321 Supported The € key. Only present on certain keyboards.
Undo 322 Supported Only present on certain keyboards.
ButtonX 1000 Supported Gamepad X button.
ButtonY 1001 Supported Gamepad Y button.
ButtonA 1002 Supported Gamepad A button.
ButtonB 1003 Supported Gamepad B button.
ButtonR1 1004 Supported Gamepad R1 button.
ButtonL1 1005 Supported Gamepad L1 button.
ButtonR2 1006 Supported Gamepad R2 button.
ButtonL2 1007 Supported Gamepad L2 button.
ButtonR3 1008 Supported Gamepad R3 button.
ButtonL3 1009 Supported Gamepad L3 button.
ButtonStart 1010 Supported Gamepad Start button.
ButtonSelect 1011 Supported Gamepad Select button.
DPadLeft 1012 Supported Left arrow on a gamepad D-pad.
DPadRight 1013 Supported Right arrow on a gamepad D-pad.
DPadUp 1014 Supported Up arrow on a gamepad D-pad.
DPadDown 1015 Supported Down arrow on a gamepad D-pad.
Thumbstick1 1016 Supported Gamepad primary thumbstick.
Thumbstick2 1017 Supported Gamepad secondary thumbstick.
Thumbstick1Up 1018 Not yet Up vector on the gamepad primary thumbstick. Primarily used in the Input Action System.
Thumbstick1Down 1019 Not yet Down vector on the gamepad primary thumbstick. Primarily used in the Input Action System.
Thumbstick1Left 1020 Not yet Left vector on the gamepad primary thumbstick. Primarily used in the Input Action System.
Thumbstick1Right 1021 Not yet Right vector on the gamepad primary thumbstick. Primarily used in the Input Action System.
Thumbstick2Up 1022 Not yet Up vector on the gamepad secondary thumbstick. Primarily used in the Input Action System.
Thumbstick2Down 1023 Not yet Down vector on the gamepad secondary thumbstick. Primarily used in the Input Action System.
Thumbstick2Left 1024 Not yet Left vector on the gamepad secondary thumbstick. Primarily used in the Input Action System.
Thumbstick2Right 1025 Not yet Right vector on the gamepad secondary thumbstick. Primarily used in the Input Action System.
MouseLeftButton 1026 Not yet The left mouse button, also commonly referred to as "button 1" on a generic mouse. Primarily used in the Input Action System.
MouseRightButton 1027 Not yet The right mouse button, also commonly referred to as "button 2" on a generic mouse. Primarily used in the Input Action System.
MouseMiddleButton 1028 Not yet The middle mouse button, also commonly referred to as "button 3" on a generic mouse. Primarily used in the Input Action System.
MouseBackButton 1029 Not yet —
MouseNoButton 1030 Not yet —
MouseX 1031 Not yet —
MouseY 1032 Not yet —
MousePosition 1033 Not yet The position of a mouse in the viewport. Primarily used in the Input Action System.
TouchPosition 1034 Not yet The position of a touch in the viewport. Primarily used in the Input Action System.
MouseWheel 1035 Not yet The scroll delta (change) of a mouse wheel. Primarily used in the Input Action System, returning a velocity in scroll units per second (whe…
TrackpadPan 1040 Not yet The pan delta (change) from a trackpad two-finger pan gesture. Primarily used in the Input Action System, returning a velocity in pixels pe…
TrackpadPinch 1045 Not yet The scale delta (change) from a trackpad two-finger pinch gesture. Primarily used in the Input Action System, returning a velocity in scrol…
MouseDelta 1048 Not yet The movement delta (change) of the mouse cursor. Primarily used in the Input Action System, returning a velocity in pixels per second under…
TouchDelta 1049 Not yet The movement delta (change) of a touch input. Primarily used in the Input Action System, returning a velocity in pixels per second under a…
TouchPinch 1050 Not yet The scale delta (change) from a touch two-finger pinch gesture. Primarily used in the Input Action System, returning a velocity in pixels p…
ButtonCenter 1051 Not yet TV remote Center button.
ButtonBack 1052 Not yet TV remote Back button.
ButtonUp 1053 Not yet MicroGamepad (including TV remotes) Up directional button.
ButtonDown 1054 Not yet MicroGamepad (including TV remotes) Down directional button.
ButtonLeft 1055 Not yet MicroGamepad (including TV remotes) Left directional button.
ButtonRight 1056 Not yet MicroGamepad (including TV remotes) Right directional button.

Roblox reference: KeyCode