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-24",
"summary": "Improved window docs (game resolution vs window size, resize mode, center window, window icon, screen/scene expressions), keyboard docs (Key just pressed, Any key released, touch-device note), and screenshot docs (desktop-only, auto .png extension)"
}
]
}
16 changes: 15 additions & 1 deletion docs/gdevelop5/all-features/keyboard/index.md
Original file line number Diff line number Diff line change
Expand Up @@ -5,13 +5,25 @@ title: Keyboard

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

!!! note

Keyboard conditions do not work with on-screen (virtual) keyboards on touch devices. For mobile or touchscreen games, use the mouse/touch conditions or a virtual joystick instead.

## Any key pressed

For this condition, the corresponding action/s will be performed if any key on the keyboard is pressed.

## Any key released

This condition is true on the frame any key on the keyboard is released. It is useful to trigger logic only once when the player lets go of a key, without needing to specify which key.

## Key pressed

Whenever the key selected while setting this condition is pressed, the corresponding actions are performed.
Whenever the key selected while setting this condition is pressed, the corresponding actions are performed. The condition stays true for as long as the key is held down — it will repeat for every frame.

## Key just pressed

Use this condition when you want to react only on the frame the key was pressed, not while it is being held down. This is the right choice for things like menu navigation, opening an inventory, or any one-shot action that should not repeat if the player holds the key.

## Key released

Expand All @@ -37,6 +49,8 @@ To test a key release using this condition, you need to enter the key name in th

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

This is useful to implement features like "Press any key to continue" or remappable controls: store the value returned by `LastPressedKey()` and feed it back into the text-based "Key pressed" condition.

## Reference

All actions, conditions and expressions are listed in [the keyboard reference page](/gdevelop5/all-features/keyboard/reference/).
6 changes: 6 additions & 0 deletions docs/gdevelop5/all-features/screenshot/index.md
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,10 @@ Note: As of GDevelop 5.0.0-beta92 the screenshot action is no longer an extensio

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

!!! note

Saving screenshots is only supported on desktop builds (Windows, macOS, Linux). It does not work in browsers or on mobile because games cannot freely write files there.

##### Parameters:

**Save path**: The file path where the screenshot should be saved.
Expand All @@ -21,6 +25,8 @@ The save path needs to be an absolute path on the file system (Like "C:\MyFolder

Relative paths are not supported.

If the path does not end with `.png`, the `.png` extension is appended automatically.

!!! 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).
Expand Down
38 changes: 38 additions & 0 deletions docs/gdevelop5/all-features/window/index.md
Original file line number Diff line number Diff line change
Expand Up @@ -31,6 +31,44 @@ If you want to scale the set resolution to the window area, choose "YES". This w

![](/gdevelop5/all-features/annotation_2019-06-29_175540.png)

!!! note

Changing the game window size only works on desktop platforms (Windows, macOS, Linux). Games running in a browser or on mobile cannot resize their window, but the game resolution can still be updated.

## Game resolution vs window size

These two concepts are distinct and often confused:

- The **game resolution** is the number of pixels the game internally renders. Use the action **"Game resolution"** to change it without resizing the window — useful for example to adapt the rendering to a low-end device.
- The **game window size** is the size of the visible area on screen. On desktop, you can change it independently from the resolution. On HTML5 and mobile, the window size is decided by the browser/device.

### Game resolution resize mode

Use the **"Game resolution resize mode"** action to control how the game resolution adapts to the window or screen size:

- `adaptWidth`: the game width is automatically updated to fill the window or screen.
- `adaptHeight`: the game height is automatically updated to fill the window or screen.
- Leave empty to disable automatic resizing (the game resolution stays fixed and is stretched to fit).

This is paired with the **"Automatically adapt the game resolution"** action, which decides if the resolution should be re-adapted at runtime (when the player resizes the window or rotates the device). If turned off, the resolution is only adjusted once when the game starts.

## Centering the window

The **"Center the game window on the screen"** action moves the game window to the center of the user's screen. This only works on Windows, macOS and Linux (it has no effect when the game runs in a browser or on iOS/Android).

## Window icon

Use the **"Window's icon"** action to change the icon shown in the title bar and taskbar. Pass the name of an image resource already included in your project. This applies to desktop builds; on mobile and HTML5 the icon is determined by the build/page settings instead.

## Reading screen and window dimensions

A few expressions let you query sizes at runtime:

- `SceneWindowWidth()` / `SceneWindowHeight()`: the current game resolution (the size of the rendering canvas).
- `ScreenWidth()` / `ScreenHeight()`: the size of the screen or, for HTML5 games in a browser, the size of the page.

Use the scene window expressions for in-game logic like positioning HUD elements, and the screen expressions when you need to know how large the user's display is.

## Window title

The window title is the name of the window that is visible on the title bar (located at the top) of the window. The default title name is "Preview of ProjectName" during a preview.
Expand Down