Reference API Roblox

Engine API

Website

Related

Reference API Roblox

KeyCode

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

Items 274

HistoryNameValueDescription
238Unknown0

Blank value that represents no key being pressed.

238Backspace8

The Backspace key.

238Tab9

The Tab key.

238Clear12

Only present on certain keyboards.

238Return13

Frequently known as Enter.

238Pause19

Only present on certain keyboards.

238Escape27

The Escape key.

238Space32

The Space key.

238QuotedDouble34

The " key.

238Hash35

The # key.

238Dollar36

The $ key.

238Percent37

The % key.

238Ampersand38

The & key.

238Quote39

The ' key.

238LeftParenthesis40

The ( key.

238RightParenthesis41

The ) key.

238Asterisk42

The * key.

238Plus43

The + key.

238Comma44

The , key.

238Minus45

The - key.

238Period46

The . key.

238Slash47

The / key.

238Zero48

The 0 key.

238One49

The 1 key.

238Two50

The 2 key.

238Three51

The 3 key.

238Four52

The 4 key.

238Five53

The 5 key.

238Six54

The 6 key.

238Seven55

The 7 key.

238Eight56

The 8 key.

238Nine57

The 9 key.

238Colon58

The : key.

238Semicolon59

The ; key.

238LessThan60

The < key.

238Equals61

The = key.

238GreaterThan62

The > key.

238Question63

The ? key.

238At64

The @ key.

238LeftBracket91

The [ key.

238BackSlash92

The \ key.

238RightBracket93

The ] key.

238Caret94

The ^ key.

238Underscore95

The _ key.

238Backquote96

The ` key.

238A97

The A key.

238B98

The B key.

238C99

The C key.

238D100

The D key.

238E101

The E key.

238F102

The F key.

238G103

The G key.

238H104

The H key.

238I105

The I key.

238J106

The J key.

238K107

The K key.

238L108

The L key.

238M109

The M key.

238N110

The N key.

238O111

The O key.

238P112

The P key.

238Q113

The Q key.

238R114

The R key.

238S115

The S key.

238T116

The T key.

238U117

The U key.

238V118

The V key.

238W119

The W key.

238X120

The X key.

238Y121

The Y key.

238Z122

The Z key.

238LeftCurly123

The { key.

238Pipe124

The | key.

238RightCurly125

The } key.

238Tilde126

The ~ key.

133Delete127

The Del key.

666KeypadZero256

The 0 key on the keypad cluster.

666KeypadOne257

The 1 key on the keypad cluster.

666KeypadTwo258

The 2 key on the keypad cluster.

666KeypadThree259

The 3 key on the keypad cluster.

666KeypadFour260

The 4 key on the keypad cluster.

666KeypadFive261

The 5 key on the keypad cluster.

666KeypadSix262

The 6 key on the keypad cluster.

666KeypadSeven263

The 7 key on the keypad cluster.

666KeypadEight264

The 8 key on the keypad cluster.

666KeypadNine265

The 9 key on the keypad cluster.

666KeypadPeriod266

The . key on the keypad cluster.

666KeypadDivide267

The / key on the keypad cluster.

666KeypadMultiply268

The * key on the keypad cluster.

666KeypadMinus269

The - key on the keypad cluster.

666KeypadPlus270

The + key on the keypad cluster.

666KeypadEnter271

The Enter key on the keypad cluster.

666KeypadEquals272

The = key on the keypad cluster.

666Up273

The arrow key.

666Down274

The arrow key.

666Right275

The arrow key.

666Left276

The arrow key.

666Insert277

The Insert key.

666Home278

The Home key.

666End279

The End key.

666PageUp280

The PgUp key.

666PageDown281

The PgDown key.

666F1282

The F1 key.

666F2283

The F2 key.

666F3284

The F3 key.

666F4285

The F4 key.

666F5286

The F5 key.

666F6287

The F6 key.

666F7288

The F7 key.

666F8289

The F8 key.

666F9290

The F9 key.

666F10291

The F10 key.

666F11292

The F11 key.

666F12293

The F12 key.

666F13294

The F13 key. Only present on certain keyboards.

666F14295

The F14 key. Only present on certain keyboards.

666F15296

The F15 key. Only present on certain keyboards.

666NumLock300

The Num Lock key on the keypad cluster.

666CapsLock301

The Caps Lock key.

666ScrollLock302

The Scr Lock key.

666RightShift303

The right side Shift key.

666LeftShift304

The left side Shift key.

666RightControl305

The right side Ctrl key.

666LeftControl306

The left side Ctrl key.

666RightAlt307

The right side Alt key.

666LeftAlt308

The left side Alt key.

666RightMeta309

The right side Meta key.

666LeftMeta310

The left side Meta key.

666LeftSuper311

The left side Super key. Better known as the Windows key or Cmd key.

666RightSuper312

The right side Super key. Better known as the Windows key or Cmd key.

666Mode313

Only present on certain keyboards.

666Compose314

Only present on certain keyboards.

666Help315

Only present on certain keyboards.

666Print316

Only present on certain keyboards.

666SysReq317

Only present on certain keyboards.

666Break318

Only present on certain keyboards.

666Menu319

The Menu key.

666Power320

Only present on certain keyboards.

666Euro321

The key. Only present on certain keyboards.

666Undo322

Only present on certain keyboards.

666ButtonX1000

Gamepad X button.

666ButtonY1001

Gamepad Y button.

666ButtonA1002

Gamepad A button.

666ButtonB1003

Gamepad B button.

666ButtonR11004

Gamepad R1 button.

666ButtonL11005

Gamepad L1 button.

666ButtonR21006

Gamepad R2 button.

666ButtonL21007

Gamepad L2 button.

666ButtonR31008

Gamepad R3 button.

666ButtonL31009

Gamepad L3 button.

666ButtonStart1010

Gamepad Start button.

666ButtonSelect1011

Gamepad Select button.

666DPadLeft1012

Left arrow on a gamepad D-pad.

666DPadRight1013

Right arrow on a gamepad D-pad.

666DPadUp1014

Up arrow on a gamepad D-pad.

666DPadDown1015

Down arrow on a gamepad D-pad.

666Thumbstick11016

Gamepad primary thumbstick.

666Thumbstick21017

Gamepad secondary thumbstick.

696Thumbstick1Up1018

Up vector on the gamepad primary thumbstick. Primarily used in the Input Action System.

696Thumbstick1Down1019

Down vector on the gamepad primary thumbstick. Primarily used in the Input Action System.

696Thumbstick1Left1020

Left vector on the gamepad primary thumbstick. Primarily used in the Input Action System.

696Thumbstick1Right1021

Right vector on the gamepad primary thumbstick. Primarily used in the Input Action System.

696Thumbstick2Up1022

Up vector on the gamepad secondary thumbstick. Primarily used in the Input Action System.

696Thumbstick2Down1023

Down vector on the gamepad secondary thumbstick. Primarily used in the Input Action System.

696Thumbstick2Left1024

Left vector on the gamepad secondary thumbstick. Primarily used in the Input Action System.

696Thumbstick2Right1025

Right vector on the gamepad secondary thumbstick. Primarily used in the Input Action System.

696MouseLeftButton1026
696MouseRightButton1027
696MouseMiddleButton1028
696MousePosition1033

The position of a mouse in the viewport. Primarily used in the Input Action System.

702Touch1034

The position of a touch in the viewport. Primarily used in the Input Action System.

707MouseWheel1035
707TrackpadPan1040
707TrackpadPinch1045
707World0160
707World1161
707World2162
707World3163
707World4164
707World5165
707World6166
707World7167
707World8168
707World9169
707World10170
707World11171
707World12172
707World13173
707World14174
707World15175
707World16176
707World17177
707World18178
707World19179
707World20180
707World21181
707World22182
707World23183
707World24184
707World25185
707World26186
707World27187
707World28188
707World29189
707World30190
707World31191
707World32192
707World33193
707World34194
707World35195
707World36196
707World37197
707World38198
707World39199
707World40200
707World41201
707World42202
707World43203
707World44204
707World45205
707World46206
707World47207
707World48208
707World49209
707World50210
707World51211
707World52212
707World53213
707World54214
707World55215
707World56216
707World57217
707World58218
707World59219
707World60220
707World61221
707World62222
707World63223
707World64224
707World65225
707World66226
707World67227
707World68228
707World69229
707World70230
707World71231
707World72232
707World73233
707World74234
707World75235
707World76236
707World77237
707World78238
707World79239
707World80240
707World81241
707World82242
707World83243
707World84244
707World85245
707World86246
707World87247
707World88248
707World89249
707World90250
707World91251
707World92252
707World93253
707World94254
707World95255
707MouseBackButton1029
707MouseNoButton1030
707MouseX1031
707MouseY1032

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.

History 1777

Settings