Open Asterune
KeyCode

KeyCode

Identifies keyboard keys and gamepad buttons.

Access items through Enum.KeyCode.

Behavior

Enum.KeyCode identifies a key or gamepad button in InputObject.KeyCode. Check UserInputType when handling inputs from several device types. Non-button input uses Unknown.

Letter names use A through Z. Digit names use Zero through Nine. Gamepad buttons include ButtonA and ButtonL1.

Items

Items154Value

Unknown

No recognized key or button code, including non-button input.

Tab

The Tab key.

Return

The Enter key.

Escape

The Escape key.

Space

The space bar.

LeftShift

The left Shift key.

LeftControl

The left Control key.

Example

Luau
print(Enum.KeyCode.Space)

InputObject · InputService · Enum.UserInputType