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-30",
"summary": "Improved keyboard docs: added touch-device caveat, 'Any key released' and 'Key just pressed' conditions (held vs single-frame distinction), and a full reference of valid key names for text expressions"
}
]
}
29 changes: 29 additions & 0 deletions docs/gdevelop5/all-features/keyboard/index.md
Original file line number Diff line number Diff line change
Expand Up @@ -5,10 +5,18 @@ title: Keyboard

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

!!! warning

Keyboard conditions do not work with the on-screen keyboard of touch devices. When making a game for mobile or touchscreen devices, use the [mouse/touch](/gdevelop5/all-features/mouse-touch) conditions 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

The corresponding actions are performed during the frame in which any key on the keyboard is released.

## Key pressed

Whenever the key selected while setting this condition is pressed, the corresponding actions are performed.
Expand All @@ -21,12 +29,18 @@ 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 condition stays true for as long as the key is **held down**. To run an action only once when the key starts being pressed (for example to make a character jump), use **Key just pressed** instead.

!!! danger

Make sure that the key name is surrounded by quotes.

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

## Key just pressed (text expression)

This condition is true only during the single frame in which the key starts being pressed. It is useful for one-shot actions (jumping, validating a menu, firing a single shot...) so that holding the key down does not repeat the action every frame.

## Key released (text expression)

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.
Expand All @@ -37,6 +51,21 @@ 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".

## Key names

When a condition or expression asks for a key name as text, use one of these names (case sensitive):

- **Letters**: `a` to `z` (always lowercase, regardless of Shift or Caps Lock).
- **Numbers**: `Num0` to `Num9` (top row) and `Numpad0` to `Numpad9` (numeric keypad).
- **Arrow keys**: `Left`, `Up`, `Right`, `Down`.
- **Modifiers**: `LShift`, `RShift`, `LControl`, `RControl`, `LAlt`, `RAlt`, `LSystem`, `RSystem` (the left/right Windows or Command key).
- **Function keys**: `F1` to `F12`.
- **Editing & navigation**: `Space`, `Return`, `Back` (Backspace), `Tab`, `Delete`, `Insert`, `Escape`, `Home`, `End`, `PageUp`, `PageDown`, `Pause`, `Menu`.
- **Punctuation**: `SemiColon`, `Comma`, `Period`, `Quote`, `Slash`, `BackSlash`, `Equal`, `Dash`, `Tilde`, `LBracket`, `RBracket`.
- **Numpad operators**: `Add`, `Subtract`, `Multiply`, `Divide` (and their `Numpad`-prefixed variants).

The left and right variants of a key (such as `LShift`/`RShift`) are reported separately, so a key picker or the "Last pressed key" expression will return the specific side that was used.

## Reference

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