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
No recognized key or button code, including non-button input.
The Tab key.
The Enter key.
The Escape key.
The space bar.
The left Shift key.
The left Control key.
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
print(Enum.KeyCode.Space)