Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 4 additions & 0 deletions automated_updates_data.json
Original file line number Diff line number Diff line change
Expand Up @@ -92,6 +92,10 @@
{
"date": "2026-04-22",
"summary": "Improved resources-loading docs (named Preload scene action, documented SceneLoadingProgress expression and AreSceneAssetsLoaded condition, clarified custom loading screen approach) and added extension lifecycle functions table to events/functions docs"
},
{
"date": "2026-06-03",
"summary": "Improved keyboard docs: added full reference of valid key names (case-sensitive) for text-expression conditions and Last key pressed, plus left/right modifier note"
}
]
}
22 changes: 21 additions & 1 deletion docs/gdevelop5/all-features/keyboard/index.md
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,27 @@ To test a key release using this condition, you need to enter the key name in th

## Last key pressed

"Last key pressed" expression returns the last key press in the form of a string. For example, if the last key press is the left arrow key, the expression will return "Left".
"Last key pressed" expression returns the last key press in the form of a string. For example, if the last key press is the left arrow key, the expression will return "Left". If the last key pressed has no name known to GDevelop, the expression returns an empty string.

## Key names

The "Key pressed/released (text expression)" conditions and the "Last key pressed" expression use the key names below. These names are **case sensitive** — in particular letter keys are **lowercase** (`"a"`, not `"A"`).

- **Letters**: `a` to `z`
- **Top-row numbers**: `Num0` to `Num9`
- **Numpad numbers**: `Numpad0` to `Numpad9`
- **Numpad operations**: `Add`, `Subtract`, `Multiply`, `Divide` (and the location-specific `NumpadAdd`, `NumpadSubtract`, `NumpadMultiply`, `NumpadDivide`, `NumpadReturn`)
- **Arrows**: `Left`, `Up`, `Right`, `Down` (numpad variants: `NumpadLeft`, `NumpadUp`, `NumpadRight`, `NumpadDown`)
- **Modifiers**: `LShift`, `RShift`, `LControl`, `RControl`, `LAlt`, `RAlt`, `LSystem`, `RSystem` (the Windows/Command key), `Menu`
- **Navigation**: `PageUp`, `PageDown`, `End`, `Home`, `Insert`, `Delete` (numpad variants: `NumpadPageUp`, `NumpadPageDown`, `NumpadEnd`, `NumpadHome`)
- **Editing/whitespace**: `Space`, `Back` (Backspace), `Tab`, `Return` (Enter), `Escape`
- **Punctuation**: `SemiColon`, `Comma`, `Period`, `Quote`, `Slash`, `BackSlash`, `Equal`, `Dash`, `LBracket`, `RBracket`, `Tilde`
- **Function keys**: `F1` to `F12`
- **Other**: `Pause`

!!! tip

The left/right modifier keys (like `LShift`/`RShift`) are distinguished by their physical position. If you don't care which side was pressed, you need to check for both.

## Reference

Expand Down