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-07",
"summary": "Improved window docs (game resolution vs window size distinction, resize mode, center window, window icon, screen/window size expressions), keyboard docs (Key just pressed, Any key released, on-screen keyboard note), and screenshot docs (desktop-only platform note, PNG auto-extension)"
}
]
}
14 changes: 13 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 detect the on-screen keyboard on touch devices. When making a game for mobile or touchscreens, prefer the [mouse and touch conditions](/gdevelop5/all-features/mouse-touch).

## Any key pressed

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

## Any key released

The actions are performed during the frame in which any key has just been released.

## 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. This condition stays true as long as the key is held down.

## Key just pressed

This condition is only true during the single frame when the key is first pressed down — useful for triggering an action exactly once on a key press (jumping, firing, opening a menu) without it repeating every frame the key stays held.

## Key released

Expand Down
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 @@ -7,6 +7,12 @@ 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

The "Take screenshot" action only works on games exported to Windows, macOS or Linux. It is not supported on web (HTML5) or mobile (Android/iOS) — those platforms can't write to the player's file system.

The screenshot is always saved as a PNG file. If the save path doesn't end with `.png`, the extension automatically appends it.

### Actions

#### Take screenshot
Expand Down
36 changes: 28 additions & 8 deletions docs/gdevelop5/all-features/window/index.md
Original file line number Diff line number Diff line change
Expand Up @@ -8,28 +8,37 @@ The window of the game is the area in which the game is displayed. It DOES NOT r
## Fullscreen
The "De/activate fullscreen" action allows you to toggle the game between fullscreen on/off. When the window is in fullscreen, it will take up as much area as possible. You can control the action using the "YES" and "NO" actions.

For HTML5 games, the action has an optional "Keep aspect ratio" parameter. When set to "yes" (the default), black bars will be added so the game keeps its original proportions; when set to "no", the game will be stretched to fill the screen.

## Window margins
The margin of the window is the distance between the side of the window and the game window displayed. Shown below is the preview of a game with 100 px margins on all 4 sides.

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

Notice the black borders on all for sides of the window. The width of the borders is 100px.

## Size of the window
## Game resolution and window size

GDevelop makes a distinction between two different concepts:

Size of the window is the number of pixels visible in the game. The "Width" field refers to the number of pixels in the horizontal directions while the "Height" field refers to the number of pixels in the vertical direction.
- The **game resolution** is the size of the game area in pixels. It defines how much of the game world is visible and the unit used by all game coordinates. The default resolution is set in the project properties.
- The **window size** is the size of the system window the game runs in. On the web, mobile or fullscreen, the window size is imposed by the browser, the device or the screen — it can't be changed by the game. On Windows, macOS and Linux, it can be updated with the "Game window size" action.

While setting the size of the window, if you want to scale the current area to the set resolution, choose "NO". This will decrease the visual quality of the game if the size entered is lower than default and will increase the visual quality if the size entered is higher than the default size.
The "**Game resolution**" action changes how much of the game world is visible without changing the size of the window. Reducing the resolution makes objects appear larger (zooming in); increasing it makes them appear smaller (zooming out).

![](/gdevelop5/all-features/annotation_2019-06-29_175454.png)
The "**Game window size**" action only works on Windows, macOS and Linux. It has an option to also update the game resolution: if you say "no", the game will be stretched or reduced to fit the new window.

If you want to scale the set resolution to the window area, choose "YES". This will crop the window and display only the number of pixels entered in the action. This does not affect the visual quality as long as the game is scaled up or down because of the size of the system window.
The "**Center the game window on the screen**" action centers the window on the screen (Windows, macOS and Linux only).

!!! note
### Game resolution resize mode

The game is cropped starting from the top-left corner of the game.
When the system window or screen size changes (for example a player resizing a browser window or rotating their phone), the game resolution can be adapted automatically. Use the "**Game resolution resize mode**" action with one of:

![](/gdevelop5/all-features/annotation_2019-06-29_175540.png)
- `adaptWidth`: the game width is updated to fit in the window or screen, keeping the height fixed.
- `adaptHeight`: the game height is updated to fit, keeping the width fixed.
- *(empty)*: disables resizing — the game is stretched or shown with black bars to fit the window.

The "**Automatically adapt the game resolution**" action enables or disables that adaptation while the game is running. It only takes effect when the resize mode above is `adaptWidth` or `adaptHeight`.

## Window title

Expand All @@ -39,6 +48,17 @@ By default, the game name is used for the executable name (on Windows, macOS and

With the action to change the title, the title bar on Windows, macOS and Linux will be changed. Nothing will be visible on Android and iOS. For HTML5 games, the web page title will be changed.

## Window icon

The "**Window's icon**" action changes the icon shown in the window's title bar and the operating system task bar. It takes the name of an image resource of your project. This only applies to Windows, macOS and Linux: on mobile, the app icon is set when the game is built; on the web, the icon comes from the page's favicon.

## Reading screen and window dimensions

A few expressions help adapt the game to the player's screen or window:

- `SceneWindowWidth()` / `SceneWindowHeight()`: the size of the area where the scene is rendered (the canvas size for HTML5 games).
- `ScreenWidth()` / `ScreenHeight()`: the size of the player's screen (or the page for HTML5 games running in a browser).

## Reference

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