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-06",
"summary": "Improved window docs (resolution vs window size, resize mode, center window, window icon, screen/scene-window expressions), keyboard docs (key just pressed, touch-device warning, any-key-released), and added screenshot platform-support note"
}
]
}
16 changes: 13 additions & 3 deletions docs/gdevelop5/all-features/keyboard/index.md
Original file line number Diff line number Diff line change
Expand Up @@ -5,13 +5,21 @@ 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 do **not** work with on-screen keyboards on touch devices. If you are making a game for mobile or touchscreen devices, use the mouse/touch conditions instead, or add an on-screen control like a virtual joystick.

## Any key pressed / Any key released

The "Any key pressed" condition is true while at least one key on the keyboard is held down. "Any key released" becomes true the moment any key is released. They are commonly used on a "Press any key to continue" screen.

## 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 stays true as long as the key is held down — so the actions will run on every frame while the player keeps the key pressed.

## Key just pressed

Becomes true only on the single frame during which the key was first pressed. Use this condition (instead of "Key pressed") when an action should happen exactly once per key press — for example to swap a weapon, open a menu, or jump in a platformer.

## Key released

Expand All @@ -21,6 +29,8 @@ Whenever the key selected while setting this condition is released, the correspo

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.

This variant is useful when the key to check is dynamic — for example a key the player has remapped and stored in a variable.

!!! danger

Make sure that the key name is surrounded by quotes.
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 @@ -13,9 +13,13 @@ 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.

!!! warning

Saving a screenshot to disk is only supported on **Windows, Linux and macOS** (when the game is exported as a desktop application). It does not work in browsers or on mobile devices, where the game cannot freely write files to the filesystem.

##### Parameters:

**Save path**: The file path where the screenshot should be saved.
**Save path**: The file path where the screenshot should be saved. If the path does not end in `.png`, the extension is added automatically.

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

Expand Down
48 changes: 42 additions & 6 deletions docs/gdevelop5/all-features/window/index.md
Original file line number Diff line number Diff line change
Expand Up @@ -8,28 +8,45 @@ 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.

The action also has a "Keep aspect ratio" option (HTML5 games only). When enabled, black bars are added on the sides of the game so that the original aspect ratio is preserved when the screen ratio differs. When disabled, the game is stretched to fill the whole screen.

The "Fullscreen activated?" condition can be used to check the current state — useful to update the label of a "Toggle fullscreen" button.

## 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 vs game window size

It's important to distinguish 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 number of pixels rendered by the game (the size of the area cameras "see"). It can be changed with the "Game resolution" action.
- The **game window size** is the size, in screen pixels, of the actual system window in which the game is displayed. It can be changed with the "Game window size" action — only on Windows, macOS and Linux. Browsers and mobile platforms cannot resize their own window.

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.
If the resolution and the window have different sizes, the game is scaled up or down to fit. Increasing the resolution beyond the window size makes more of the scene visible (or renders at a higher density); decreasing it makes the game look more pixelated when stretched up.

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

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 "Game window size" action also has an option to update the game resolution at the same time, so that the game is rendered at the native size of the window without any scaling.

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

!!! note

The game is cropped starting from the top-left corner of the game.
When the resolution is larger than the window and content is cropped, the game is cropped starting from the top-left corner.

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

The "Game resolution resize mode" action controls how the game resolution reacts when the window or screen is resized:

- `adaptWidth`: the game width is updated to fit the window/screen, while the height is preserved.
- `adaptHeight`: the game height is updated to fit the window/screen, while the width is preserved.
- *Empty value*: disables resizing — the resolution stays the same and the game is stretched to fill the window.

The "Automatically adapt the game resolution" action enables/disables that automatic adaptation at runtime. It only takes effect if the resize mode is set to adapt the width or the height.

## Window title

Expand All @@ -39,6 +56,25 @@ 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.

The current title can be read back with the `WindowTitle()` expression.

## Window icon

The "Window's icon" action changes the icon shown for the game window. It takes the name of an image resource from the project. This affects desktop builds (Windows, macOS, Linux) — it has no effect in browsers or on mobile, where the platform manages app icons separately.

## Center the window

The "Center the game window on the screen" action repositions the system window at the center of the player's screen. It only works on Windows, macOS and Linux — it has no effect when the game runs in a browser or on iOS/Android.

## Reading the current sizes

A few expressions are available to query sizes at runtime:

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

These are useful to make UI adapt to different devices, for example to position elements relative to the right or bottom of the screen.

## Reference

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