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-05-27",
"summary": "Improved keyboard docs (added 'Key just pressed' vs 'Key pressed' distinction, 'Any key released' condition, key name reference, touch-device warning) and clarified screenshot docs (desktop-only support, automatic .png extension)"
}
]
}
43 changes: 30 additions & 13 deletions docs/gdevelop5/all-features/keyboard/index.md
Original file line number Diff line number Diff line change
Expand Up @@ -3,39 +3,56 @@ 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, just pressed or released.

## Any key pressed
!!! warning

For this condition, the corresponding action/s will be performed if any key on the keyboard is pressed.
Keyboard conditions do not react to the on-screen (virtual) keyboard on touch devices. When making a game for mobile or touch screens, use the [Mouse and touch](/gdevelop5/all-features/mouse-touch) conditions instead, or combine both for cross-platform input.

## Key pressed
## Key pressed vs. Key just pressed

Whenever the key selected while setting this condition is pressed, the corresponding actions are performed.
There are two similar but distinct conditions to detect when a key is down:

## Key released
* **Key pressed**: stays true for every frame the key is held down. Use this for continuous actions, such as moving a character while an arrow key is held.
* **Key just pressed**: only true on the single frame during which the key started being pressed. Use this for one-shot actions, such as opening a menu, firing a single shot or jumping when a key is tapped.

Whenever the key selected while setting this condition is released, the corresponding actions are performed.
Use the matching **Key released** condition to detect the single frame on which a key was released.

## Key pressed (text expression)
## Any key pressed / Any key released

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.
These conditions are triggered when *any* key on the keyboard is pressed or released. They are useful for "Press any key to continue…" prompts or to detect that the player started using the keyboard.

## Key pressed / Key released (text expression)

These variants let you specify the key to check using a text expression (a string in quotes) instead of picking it from a list. This is useful when the key is configurable (for example, stored in a variable to support remapping controls).

For example, to check the left arrow key, type `"Left"` in the field.

!!! danger

Make sure that the key name is surrounded by quotes.

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

## Key released (text expression)
### Key names

Keys are referred to by name. Some commonly used ones:

* Letters: `"a"` to `"z"` (lowercase)
* Top-row digits: `"Num0"` to `"Num9"`. Numeric keypad: `"Numpad0"` to `"Numpad9"`.
* Arrows: `"Left"`, `"Right"`, `"Up"`, `"Down"`
* Function keys: `"F1"` to `"F12"`
* Special: `"Space"`, `"Return"` (Enter), `"Tab"`, `"Escape"`, `"Back"` (Backspace), `"Delete"`, `"Insert"`, `"Home"`, `"End"`, `"PageUp"`, `"PageDown"`
* Modifiers (location-aware): `"LShift"`/`"RShift"`, `"LControl"`/`"RControl"`, `"LAlt"`/`"RAlt"`, `"LSystem"`/`"RSystem"` (Windows/Command key)
* Punctuation: `"Comma"`, `"Period"`, `"SemiColon"`, `"Quote"`, `"Slash"`, `"BackSlash"`, `"Equal"`, `"Dash"`, `"LBracket"`, `"RBracket"`, `"Tilde"`

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.
!!! tip

![](/gdevelop5/all-features/annotation_2019-06-20_191302.png)
The left and right variants of Shift, Control, Alt and System keys are reported separately. To accept either side, check both keys with an [OR condition](/gdevelop5/all-features/advanced-conditions).

## 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, `"Left"` if the left arrow was the last key pressed). This is useful for input remapping screens where the player presses a key to assign it to an action.

## Reference

Expand Down
6 changes: 5 additions & 1 deletion docs/gdevelop5/all-features/screenshot/index.md
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,10 @@ This extension lets you save a screenshot of the running game in a specified fol

Note: As of GDevelop 5.0.0-beta92 the screenshot action is no longer an extension. Just add an action and search for `screenshot` or go to `Other Actions`/`Screenshot`/`Take screenshot`.

!!! warning

Taking a screenshot to a file is only supported when the game runs on **Windows, Linux or macOS** (desktop builds and previews). It does not work in web/HTML5 builds or on Android and iOS, since those platforms do not give the game write access to the local file system.

### Actions

#### Take screenshot
Expand All @@ -19,7 +23,7 @@ Use this action to save a screenshot of everything which is currently drawn on t

The save path needs to be an absolute path on the file system (Like "C:\MyFolder\MyScreenshot.png" on Windows)'

Relative paths are not supported.
Relative paths are not supported. If the path does not end with `.png`, the extension is added automatically.

!!! note

Expand Down