Skip to content

Enum

Enum.KeyCode

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

Official docs ↗
ItemValueSummary
Enum.KeyCode.None0
Enum.KeyCode.Backspace8The Backspace key.
Enum.KeyCode.Tab9The Tab key.
Enum.KeyCode.Clear12Only present on certain keyboards.
Enum.KeyCode.Return13Frequently known as Enter.
Enum.KeyCode.Pause19Only present on certain keyboards.
Enum.KeyCode.Escape27The Escape key.
Enum.KeyCode.Space32The Space key.
Enum.KeyCode.QuotedDouble34The " key.
Enum.KeyCode.Hash35The # key.
Enum.KeyCode.Dollar36The $ key.
Enum.KeyCode.Percent37The % key.
Enum.KeyCode.Ampersand38The & key.
Enum.KeyCode.Quote39The ' key.
Enum.KeyCode.LeftParenthesis40The ( key.
Enum.KeyCode.RightParenthesis41The ) key.
Enum.KeyCode.Asterisk42The key.
Enum.KeyCode.Plus43The + key.
Enum.KeyCode.Comma44The , key.
Enum.KeyCode.Minus45The - key.
Enum.KeyCode.Period46The . key.
Enum.KeyCode.Slash47The / key.
Enum.KeyCode.Zero48The 0 key.
Enum.KeyCode.One49The 1 key.
Enum.KeyCode.Two50The 2 key.
Enum.KeyCode.Three51The 3 key.
Enum.KeyCode.Four52The 4 key.
Enum.KeyCode.Five53The 5 key.
Enum.KeyCode.Six54The 6 key.
Enum.KeyCode.Seven55The 7 key.
Enum.KeyCode.Eight56The 8 key.
Enum.KeyCode.Nine57The 9 key.
Enum.KeyCode.Colon58The : key.
Enum.KeyCode.Semicolon59The ; key.
Enum.KeyCode.LessThan60The < key.
Enum.KeyCode.Equals61The = key.
Enum.KeyCode.GreaterThan62The > key.
Enum.KeyCode.Question63The ? key.
Enum.KeyCode.At64The @ key.
Enum.KeyCode.LeftBracket91The [ key.
Enum.KeyCode.BackSlash92The \ key.
Enum.KeyCode.RightBracket93The ] key.
Enum.KeyCode.Caret94The ^ key.
Enum.KeyCode.Underscore95The key.
Enum.KeyCode.Backquote96The key.
Enum.KeyCode.A97The A key.
Enum.KeyCode.B98The B key.
Enum.KeyCode.C99The C key.
Enum.KeyCode.D100The D key.
Enum.KeyCode.E101The E key.
Enum.KeyCode.F102The F key.
Enum.KeyCode.G103The G key.
Enum.KeyCode.H104The H key.
Enum.KeyCode.I105The I key.
Enum.KeyCode.J106The J key.
Enum.KeyCode.K107The K key.
Enum.KeyCode.L108The L key.
Enum.KeyCode.M109The M key.
Enum.KeyCode.N110The N key.
Enum.KeyCode.O111The O key.
Enum.KeyCode.P112The P key.
Enum.KeyCode.Q113The Q key.
Enum.KeyCode.R114The R key.
Enum.KeyCode.S115The S key.
Enum.KeyCode.T116The T key.
Enum.KeyCode.U117The U key.
Enum.KeyCode.V118The V key.
Enum.KeyCode.W119The W key.
Enum.KeyCode.X120The X key.
Enum.KeyCode.Y121The Y key.
Enum.KeyCode.Z122The Z key.
Enum.KeyCode.LeftCurly123The { key.
Enum.KeyCode.Pipe124The | key.
Enum.KeyCode.RightCurly125The } key.
Enum.KeyCode.Tilde126The ~ key.
Enum.KeyCode.Delete127The Del key.
Enum.KeyCode.KeypadZero256The 0 key on the keypad cluster.
Enum.KeyCode.KeypadOne257The 1 key on the keypad cluster.
Enum.KeyCode.KeypadTwo258The 2 key on the keypad cluster.
Enum.KeyCode.KeypadThree259The 3 key on the keypad cluster.
Enum.KeyCode.KeypadFour260The 4 key on the keypad cluster.
Enum.KeyCode.KeypadFive261The 5 key on the keypad cluster.
Enum.KeyCode.KeypadSix262The 6 key on the keypad cluster.
Enum.KeyCode.KeypadSeven263The 7 key on the keypad cluster.
Enum.KeyCode.KeypadEight264The 8 key on the keypad cluster.
Enum.KeyCode.KeypadNine265The 9 key on the keypad cluster.
Enum.KeyCode.KeypadPeriod266The . key on the keypad cluster.
Enum.KeyCode.KeypadDivide267The / key on the keypad cluster.
Enum.KeyCode.KeypadMultiply268The key on the keypad cluster.
Enum.KeyCode.KeypadMinus269The - key on the keypad cluster.
Enum.KeyCode.KeypadPlus270The + key on the keypad cluster.
Enum.KeyCode.KeypadEnter271The Enter key on the keypad cluster.
Enum.KeyCode.KeypadEquals272The = key on the keypad cluster.
Enum.KeyCode.Up273The ↑ arrow key.
Enum.KeyCode.Down274The ↓ arrow key.
Enum.KeyCode.Left276The ← arrow key.
Enum.KeyCode.Insert277The Insert key.
Enum.KeyCode.Home278The Home key.
Enum.KeyCode.End279The End key.
Enum.KeyCode.PageUp280The PgUp key.
Enum.KeyCode.PageDown281The PgDown key.
Enum.KeyCode.F1282The F1 key.
Enum.KeyCode.F2283The F2 key.
Enum.KeyCode.F3284The F3 key.
Enum.KeyCode.F4285The F4 key.
Enum.KeyCode.F5286The F5 key.
Enum.KeyCode.F6287The F6 key.
Enum.KeyCode.F7288The F7 key.
Enum.KeyCode.F8289The F8 key.
Enum.KeyCode.F9290The F9 key.
Enum.KeyCode.F10291The F10 key.
Enum.KeyCode.F11292The F11 key.
Enum.KeyCode.F12293The F12 key.
Enum.KeyCode.F13294The F13 key. Only present on certain keyboards.
Enum.KeyCode.F14295The F14 key. Only present on certain keyboards.
Enum.KeyCode.F15296The F15 key. Only present on certain keyboards.
Enum.KeyCode.NumLock300The Num Lock key on the keypad cluster.
Enum.KeyCode.CapsLock301The Caps Lock key.
Enum.KeyCode.ScrollLock302The Scr Lock key.
Enum.KeyCode.RightShift303The right side Shift key.
Enum.KeyCode.LeftShift304The left side Shift key.
Enum.KeyCode.RightControl305The right side Ctrl key.
Enum.KeyCode.LeftControl306The left side Ctrl key.
Enum.KeyCode.RightAlt307The right side Alt key.
Enum.KeyCode.LeftAlt308The left side Alt key.
Enum.KeyCode.RightMeta309The right side Meta key.
Enum.KeyCode.LeftMeta310The left side Meta key.
Enum.KeyCode.LeftSuper311The left side Super key. Better known as the Windows key or <kbd>Cmd</kbd> key.
Enum.KeyCode.RightSuper312The right side Super key. Better known as the Windows key or <kbd>Cmd</kbd> key.
Enum.KeyCode.Mode313Only present on certain keyboards.
Enum.KeyCode.Compose314Only present on certain keyboards.
Enum.KeyCode.Help315Only present on certain keyboards.
Enum.KeyCode.Print316Only present on certain keyboards.
Enum.KeyCode.SysReq317Only present on certain keyboards.
Enum.KeyCode.Break318Only present on certain keyboards.
Enum.KeyCode.Power320Only present on certain keyboards.
Enum.KeyCode.Euro321The € key. Only present on certain keyboards.
Enum.KeyCode.Undo322Only present on certain keyboards.
Enum.KeyCode.ButtonX1000Gamepad X button.
Enum.KeyCode.ButtonY1001Gamepad Y button.
Enum.KeyCode.ButtonA1002Gamepad A button.
Enum.KeyCode.ButtonB1003Gamepad B button.
Enum.KeyCode.ButtonR11004Gamepad R1 button.
Enum.KeyCode.ButtonL11005Gamepad L1 button.
Enum.KeyCode.ButtonR21006Gamepad R2 button.
Enum.KeyCode.ButtonL21007Gamepad L2 button.
Enum.KeyCode.ButtonR31008Gamepad R3 button.
Enum.KeyCode.ButtonL31009Gamepad L3 button.
Enum.KeyCode.ButtonStart1010Gamepad Start button.
Enum.KeyCode.ButtonSelect1011Gamepad Select button.
Enum.KeyCode.DPadLeft1012Left arrow on a gamepad D-pad.
Enum.KeyCode.DPadRight1013Right arrow on a gamepad D-pad.
Enum.KeyCode.DPadUp1014Up arrow on a gamepad D-pad.
Enum.KeyCode.DPadDown1015Down arrow on a gamepad D-pad.
Enum.KeyCode.Thumbstick11016Gamepad primary thumbstick.
Enum.KeyCode.Thumbstick21017Gamepad secondary thumbstick.
Enum.KeyCode.Thumbstick1Up1018Up vector on the gamepad primary thumbstick. Primarily used in the Input Action System.
Enum.KeyCode.Thumbstick1Down1019Down vector on the gamepad primary thumbstick. Primarily used in the Input Action System.
Enum.KeyCode.Thumbstick1Left1020Left vector on the gamepad primary thumbstick. Primarily used in the Input Action System.
Enum.KeyCode.Thumbstick1Right1021Right vector on the gamepad primary thumbstick. Primarily used in the Input Action System.
Enum.KeyCode.Thumbstick2Up1022Up vector on the gamepad secondary thumbstick. Primarily used in the Input Action System.
Enum.KeyCode.Thumbstick2Down1023Down vector on the gamepad secondary thumbstick. Primarily used in the Input Action System.
Enum.KeyCode.Thumbstick2Left1024Left vector on the gamepad secondary thumbstick. Primarily used in the Input Action System.
Enum.KeyCode.Thumbstick2Right1025Right vector on the gamepad secondary thumbstick. Primarily used in the Input Action System.
Enum.KeyCode.MouseLeftButton1026The left mouse button, also commonly referred to as "button 1" on a generic mouse. Primarily used in the Input Action System.
Enum.KeyCode.MouseRightButton1027The right mouse button, also commonly referred to as "button 2" on a generic mouse. Primarily used in the Input Action System.
Enum.KeyCode.MouseMiddleButton1028The middle mouse button, also commonly referred to as "button 3" on a generic mouse. Primarily used in the Input Action System.
Enum.KeyCode.MousePosition1033The position of a mouse in the viewport. Primarily used in the Input Action System.
Enum.KeyCode.TouchPosition1034The position of a touch in the viewport. Primarily used in the Input Action System.
Enum.KeyCode.MouseWheel1035The scroll delta (change) of a mouse wheel. Primarily used in the Input Action System.
Enum.KeyCode.TrackpadPan1040The pan delta (change) from a trackpad two-finger pan gesture. Primarily used in the Input Action System.
Enum.KeyCode.TrackpadPinch1045The scale delta (change) from a trackpad two-finger pinch gesture. Primarily used in the Input Action System.
Enum.KeyCode.MouseDelta1048The movement delta (change) of the mouse cursor. Primarily used in the Input Action System.
Enum.KeyCode.TouchDelta1049The movement delta (change) of a touch input. Primarily used in the Input Action System.
Enum.KeyCode.TouchPinch1050The scale delta (change) of a two-finger touch pinch gesture. Primarily used in the Input Action System.
Enum.KeyCode.ButtonCenter1051TV remote Center button.
Enum.KeyCode.ButtonBack1052TV remote Back button.
Enum.KeyCode.ButtonUp1053MicroGamepad (including TV remotes) Up directional button.
Enum.KeyCode.ButtonDown1054MicroGamepad (including TV remotes) Down directional button.
Enum.KeyCode.ButtonLeft1055MicroGamepad (including TV remotes) Left directional button.
Enum.KeyCode.ButtonRight1056MicroGamepad (including TV remotes) Right directional button.

Reference text from the Roblox Creator Documentation, licensed CC BY 4.0, reorganized by rbxtoolshub.com.