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 @@ -68,6 +68,10 @@
{
"date": "2026-03-05",
"summary": "Improved network docs: updated to async single-URL API, added HTTP methods, error variable, CORS warning, content type info, and Open URL action"
},
{
"date": "2026-03-06",
"summary": "Improved keyboard docs with Key just pressed, Any key released, held-vs-just-pressed distinction, key name table, and mobile warning; fixed screenshot docs with correct expression syntax and desktop-only note"
}
]
}
47 changes: 31 additions & 16 deletions docs/gdevelop5/all-features/keyboard/index.md
Original file line number Diff line number Diff line change
Expand Up @@ -3,40 +3,55 @@ 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, and an expression to retrieve the last key pressed.

## 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** work with on-screen touch keyboards on mobile devices. When targeting mobile or touch-screen platforms, use mouse/touch conditions instead (or gamepad conditions with a virtual joystick).

## Key pressed

Whenever the key selected while setting this condition is pressed, the corresponding actions are performed.
This condition is true as long as the key is **held down**. It is useful for continuous actions such as moving a character — the action runs every frame while the key is down.

## Key released
## Key just pressed

This condition is true only for the **single frame when the key is first pressed down**. Use this for one-shot actions like jumping or firing a weapon, where you want the action to trigger once per key press rather than every frame.

!!! tip

Whenever the key selected while setting this condition is released, the corresponding actions are performed.
If a player complains that holding down the jump key makes them jump repeatedly, switch from **Key pressed** to **Key just pressed**.

## Key released

## Key pressed (text expression)
This condition is true only for the **single frame when the key is released**. Useful for actions that should trigger at the moment the player lifts their finger.

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.
## Any key pressed / Any key released

!!! danger
These conditions are true when **any** keyboard key is pressed or released, regardless of which one. Handy for "press any key to continue" prompts.

Make sure that the key name is surrounded by quotes.
Use the **Last key pressed** expression to find out which key it was — for example, to display it in a text object or store it in a variable.

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

## Key released (text expression)
Keys are identified by name strings. Some common names:

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.
| Key | Name string |
|---|---|
| Arrow keys | `Left`, `Right`, `Up`, `Down` |
| Letter keys | `a`–`z` (lowercase) |
| Number row | `Num0`–`Num9` |
| Numpad digits | `Numpad0`–`Numpad9` |
| Function keys | `F1`–`F12` |
| Modifier keys | `LShift`, `RShift`, `LControl`, `RControl`, `LAlt`, `RAlt` |
| Space / Enter | `Space`, `Return` |
| Other | `Escape`, `Tab`, `Back` (Backspace), `Delete`, `Insert`, `Pause` |

![](/gdevelop5/all-features/annotation_2019-06-20_191302.png)
The GDevelop event editor provides a key picker, so you rarely need to type names manually. The **Key pressed (text expression)** and **Key released (text expression)** variants accept the name as a text expression, which is useful when the key to check is stored in a variable.

## 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 presses the left arrow key, the expression returns `"Left"`.

## Reference

All actions, conditions and expressions are listed in [the keyboard reference page](/gdevelop5/all-features/keyboard/reference/).
All actions, conditions and expressions are listed in [the keyboard reference page](/gdevelop5/all-features/keyboard/reference/).
34 changes: 15 additions & 19 deletions docs/gdevelop5/all-features/screenshot/index.md
Original file line number Diff line number Diff line change
Expand Up @@ -3,36 +3,32 @@ title: Screenshot extension
---
# Screenshot extension

This extension lets you save a screenshot of the running game in a specified folder.
This extension lets you save a screenshot of the running game to a file.

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

### Actions
Screenshots are saved to the **local file system**, so this only works in **desktop (Windows/macOS/Linux) exports** built with Electron. The action has no effect in web/browser or mobile builds.

#### Take screenshot
## Take screenshot

Use this action to save a screenshot of everything which is currently drawn on the game window into a *png* file.
Use the **Take screenshot** action to save everything currently drawn on the game window as a PNG file.

##### Parameters:
**Save path**: The absolute path where the file should be saved, including the `.png` extension. If the extension is omitted it is added automatically.

**Save path**: The file path where the screenshot should be saved.
!!! tip

The save path needs to be an absolute path on the file system (Like "C:\MyFolder\MyScreenshot.png" on Windows)'
Use the special folder expressions from the [File System extension](/gdevelop5/all-features/filesystem) to build a portable path that works across operating systems:

Relative paths are not supported.
```
FileSystem::PicturesPath() + FileSystem::PathDelimiter() + "my_screenshot.png"
```

!!! note

In order to create a game that runs on all supported platforms you should use the special folders from the file system extension in combination with the path separator. These determine the path to common folders like *Pictures*, *Documents* or *Desktop* automatically. You can read more about it in [this article](/gdevelop5/all-features/filesystem).

## Example
This saves the screenshot to the *Pictures* folder on Windows, macOS and Linux.

This path:

``` <FileSystem::PicturesPath>() + <FileSystem::PathDelimiter>() + "my_screenshot.png" ```
!!! note

This will save the screenshot to the *Pictures* folder on Windows, Linux and MacOS.
Relative paths are not supported. Always use an absolute path or one built from a `FileSystem::` expression.

## Reference

All actions, conditions and expressions are listed in [the screenshot extension reference page](/gdevelop5/all-features/screenshot/reference/).
All actions, conditions and expressions are listed in [the screenshot extension reference page](/gdevelop5/all-features/screenshot/reference/).