Reference API Roblox

Engine API

Website

Related

Reference API Roblox

KeyCode

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

Items 271

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

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 1674

Settings