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-21",
"summary": "Improved keyboard docs (added Key just pressed condition, Any key released, clarified held-vs-just-pressed behavior, touchscreen warning) and screenshot docs (added desktop-only platform warning, fixed broken FileSystem expression syntax in example)"
}
]
}
33 changes: 15 additions & 18 deletions docs/gdevelop5/all-features/keyboard/index.md
Original file line number Diff line number Diff line change
Expand Up @@ -5,37 +5,34 @@ title: Keyboard

GDevelop gives access to all inputs made on the keyboard. This includes conditions to check if a key was 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 only work with a physical keyboard. They do not detect input from on-screen (virtual) keyboards on touch devices. For games targeting mobile or touchscreen devices, use [mouse and touch](/gdevelop5/all-features/mouse-touch) conditions instead, or the [Text Input](/gdevelop5/objects/text_input) object for text fields.

## 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 conditions that look similar but behave differently:

## Key released

Whenever the key selected while setting this condition is released, the corresponding actions are performed.

## Key pressed (text expression)

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.
- **Key pressed** stays true *as long as the key is held down*. Use it for continuous actions like moving a character left while the left arrow is held.
- **Key just pressed** is only true *on the frame when the key starts being pressed*. Use it for one-shot actions like jumping, firing a single shot, or toggling a menu — even if the player keeps holding the key, the condition only triggers once.

!!! danger

Make sure that the key name is surrounded by quotes.
To check the key, enter its name as a text expression (between quotes). For example, type `"Left"` to check the left arrow key, `"Space"` for the space bar, or `"a"` for the letter A.

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

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

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.
The **Key released** condition is true on the frame when a held key is released. It is commonly paired with **Key just pressed** to detect a complete press-and-release gesture (for example, charging a shot while a key is held, then firing when it is released).

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

## Last key pressed
## Any key pressed / Any key released

These conditions are true whenever *any* key on the keyboard is pressed or released. They are useful for "Press any key to continue" screens or to detect when the player is interacting with the keyboard at all.

## Last pressed key

"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 latest key pressed on the keyboard, as a string (for example `"Left"`, `"Space"` or `"a"`). This is convenient to display the name of the key used for an action, or to let the player rebind controls by capturing whichever key they press next.

## Reference

Expand Down
10 changes: 7 additions & 3 deletions docs/gdevelop5/all-features/screenshot/index.md
Original file line number Diff line number Diff line change
Expand Up @@ -5,19 +5,23 @@ title: Screenshot extension

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

!!! warning

The **Take screenshot** action only works on **Windows, Linux and macOS** desktop builds (and during a preview in the GDevelop editor). It does not work on HTML5/web exports, Android or iOS, because those platforms do not allow games to write arbitrary files to disk.

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`.

### Actions

#### Take screenshot

Use this action to save a screenshot of everything which is currently drawn on the game window into a *png* file.
Use this action to save a screenshot of everything which is currently drawn on the game window into a *png* file. If the save path does not end with `.png`, the extension is added automatically.

##### Parameters:

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

The save path needs to be an absolute path on the file system (Like "C:\MyFolder\MyScreenshot.png" on Windows)'
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.

Expand All @@ -29,7 +33,7 @@ Relative paths are not supported.

This path:

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

This will save the screenshot to the *Pictures* folder on Windows, Linux and MacOS.

Expand Down