Source: Roblox Creator Hub · CC BY 4.0 · View source · Code samples: MIT Imported 2026-10-03. Formatting adapted for this site.
KeyCodeStringFormat
This enum is used with UserInputService:GetStringForKeyCode() to control how the returned key string is formatted. The Abbreviated option provides shortened labels suitable for compact UI elements such as keybind hints, tooltips, or on-screen button prompts where space is limited.
Items
| Name | Value | Description |
|---|---|---|
| Default | 0 | Default behavior which returns the full key string, for example "LeftControl", "Backspace", or "Escape". |
| Abbreviated | 1 | Returns a shortened key string when available, for example "LCtrl", "Bksp", or "Esc". |
Default
Default behavior which returns the full key string, for example "LeftControl", "Backspace", or "Escape".
| Field | Value |
|---|---|
| value | 0 |
Abbreviated
Returns a shortened key string when available, for example "LCtrl", "Bksp", or "Esc".
| Field | Value |
|---|---|
| value | 1 |