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 @@ -88,6 +88,10 @@
{
"date": "2026-04-02",
"summary": "Improved multiplayer docs: added Quick Join section, documented player username/ping/last-joined/last-left expressions, lobby ID expression, custom message variable variant, and synchronization rate action"
},
{
"date": "2026-04-09",
"summary": "Improved keyboard docs (added 'Key just pressed', 'Any key released', mobile warning, key names table) and save-state docs (added failure conditions and timing expressions)"
}
]
}
54 changes: 42 additions & 12 deletions docs/gdevelop5/all-features/keyboard/index.md
Original file line number Diff line number Diff line change
Expand Up @@ -3,39 +3,69 @@ title: Keyboard
---
# Keyboard

GDevelop gives access to all inputs made on the keyboard. This includes conditions to check if a key was pressed or released.
GDevelop gives access to all inputs made on the keyboard. This includes conditions to check if a key was pressed, held, or released.

!!! warning

Keyboard conditions only respond to **physical keyboards**. They do **not** work with on-screen / virtual keyboards on touch devices. For mobile games, use [mouse and touch conditions](/gdevelop5/all-features/mouse-touch/) instead.

## Any key pressed

For this condition, the corresponding action/s will be performed if any key on the keyboard is pressed.
True as long as any key on the keyboard is currently held down.

## Any key released

True for one frame when any key is released.

## Key pressed

Whenever the key selected while setting this condition is pressed, the corresponding actions are performed.
True as long as the specified key is **held down** — it remains true every frame the key is held. Use this for continuous actions like movement.

## Key just pressed

True only for the **first frame** the key is pressed. Use this for single-fire actions like jumping or shooting, where you want the action to happen once per press rather than every frame.

## Key released

Whenever the key selected while setting this condition is released, the corresponding actions are performed.
True for one frame when the specified key is released.

## Key pressed / Key released (text expression)

## Key pressed (text expression)
The same conditions as above, but the key name is provided as a **text expression** rather than chosen from a picker. This is useful when the key to check is stored in a variable.

To test a key press using this condition, you need to enter the key name in the form of text expression. For example, if you want to check condition for left arrow key press, you need to enter "Left" in the field.
For example, to check if the left arrow key is held, enter `"Left"` in the field.

!!! danger

Make sure that the key name is surrounded by quotes.
Make sure that the key name is surrounded by quotes when entering a literal string.

![](/gdevelop5/all-features/annotation_2019-06-20_191229.png)

## Key released (text expression)

To test a key release using this condition, you need to enter the key name in the form of text expression. For example, if you want to check condition for left arrow key release, you need to enter "Left" in the field.

![](/gdevelop5/all-features/annotation_2019-06-20_191302.png)

## 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".
The `LastPressedKey()` expression returns the name of the most recently pressed key as a string. For example, if the player pressed the left arrow key, it returns `"Left"`.

## Key names reference

The following names can be used with the text-expression variants of keyboard conditions:

| Category | Key names |
|----------|-----------|
| Letters | `a` – `z` |
| Number row | `Num0` – `Num9` |
| Numpad digits | `Numpad0` – `Numpad9` |
| Arrow keys | `Left`, `Right`, `Up`, `Down` |
| Function keys | `F1` – `F12` |
| Common keys | `Space`, `Return`, `Escape`, `Back`, `Tab`, `Delete`, `Insert` |
| Navigation | `Home`, `End`, `PageUp`, `PageDown` |
| Modifiers | `LShift`, `RShift`, `LControl`, `RControl`, `LAlt`, `RAlt` |
| Numpad operators | `Add`, `Subtract`, `Multiply`, `Divide` |
| Punctuation | `SemiColon`, `Comma`, `Period`, `Quote`, `Slash`, `BackSlash`, `Equal`, `Dash`, `LBracket`, `RBracket`, `Tilde` |
| Other | `Pause`, `Menu` |

Key names are **case-sensitive**.

## Reference

Expand Down
12 changes: 11 additions & 1 deletion docs/gdevelop5/all-features/save-state/index.md
Original file line number Diff line number Diff line change
Expand Up @@ -56,7 +56,17 @@ This is useful for:

## Monitoring Save/Load Operations

The extension provides a few **expressions and conditions** to help you monitor saves and loads. In particular, the "Load just succeeded" condition is perfect to run some logic after a scene was loaded. This is somewhat similar to "At the beginning of the scene", except that after a loading a scene is already considered as started (because it was "frozen in time" in the save state).
The extension provides conditions and expressions to monitor saves and loads:

- **Save just succeeded** / **Save just failed** — true for one frame after a save attempt completes.
- **Load just succeeded** / **Load just failed** — true for one frame after a load attempt completes.
- **Time since last save** / **Time since last load** — expressions that return the elapsed time in seconds since the last successful save or load. They return `-1` if no save/load has happened yet in the current session.

The "Load just succeeded" condition is especially useful to run initialization logic after restoring a save. It is similar to "At the beginning of the scene", except that after loading, the scene is already in its saved state (not freshly initialized).

!!! tip

Always check "Load just failed" when loading from device storage so you can handle the case where no save file exists yet (e.g., on a first play-through).

## Advanced: Excluding Objects from Save States with the “Save Configuration” Behavior.

Expand Down