Skip to content

Input actions

20 actions in the Input category. Each block mirrors how the action appears in the editor's sidebar.

Any Key Pressed

Every Frame
Any Key Pressed Input
→ True | → False

Branches on whether any key, mouse button or gamepad button is down right now. It is the press any key to start check.

Branch Goes to
True Where to go while something is pressed.
False Where to go while nothing is pressed.

Phases StartEvery FramePhysics

Buffered Press

Every Frame
Buffered Press Input
Action 'ui_accept' | Remember 0.15 | → Buffered | → Nothing

Remembers a press for a moment and takes Buffered on the first frame that reads it. With Remember = 0.15, pressing jump a tenth of a second before landing still jumps, instead of being lost because the ground was not there yet. The press is taken only once.

Input Type Default Description
Action StringName 'ui_accept' The input action to remember, as named in the input map.
Remember float 0.15 How long the press stays available after it happened, in seconds.
Branch Goes to
Buffered Where to go on the first frame that takes a press still inside the window.
Nothing Where to go while no press is waiting to be taken.

Phases Every FramePhysics

Check Action

Every Frame
Check Action Input
Action 'ui_accept' | Mode 'is_action_pressed' | → True | → False

Checks an input action and branches on whether it is active. Mode chooses between held, pressed this frame, and released this frame.

Input Type Default Description
Action StringName 'ui_accept' The input action to check, as named in the input map.
Mode String 'is_action_pressed' How to test the action, from held down to the single frame it changes.
Branch Goes to
True Where to go when the action check passes.
False Where to go when it does not.

Phases StartEvery FramePhysics

Check Key

Every Frame
Check Key Input
Key 'KEY_SPACE' | When 'Held' | → True | → False

Checks a keyboard key and branches on whether it is down. Reads the key directly, so nothing has to be set up in the input map.

Input Type Default Description
Key String 'KEY_SPACE' Which keyboard key to watch.
When String 'Held' Whether to react continuously while the key is down or only at the moment it changes.
Branch Goes to
True Where to go when the key check passes.
False Where to go when it does not.

Phases StartEvery FramePhysics

Check Mouse Button

Every Frame
Check Mouse Button Input
Button 'MOUSE_BUTTON_LEFT' | When 'Held' | → True | → False

Checks a mouse button and branches on its state. Reads the button directly, so nothing has to be set up in the input map. Picking a wheel direction is how scrolling is read, such as swapping weapons.

Input Type Default Description
Button String 'MOUSE_BUTTON_LEFT' Which mouse button to watch.
When String 'Held' Whether to react continuously while the button is down or only at the moment it changes. A wheel is always a moment, so it ignores Held.
Branch Goes to
True Where to go when the button check passes.
False Where to go when it does not.

Phases StartEvery FramePhysics

Check Touch

Every Frame
Check Touch Input
'Pressed' | → True | → False

Checks the touch screen and branches when a finger touches or leaves it. Also stores where the touch happened.

Input Type Default Description
When String 'Pressed' Whether to react as the finger touches down or as it lifts off.
Output Type Description
Position Vector2 Where to store the screen point of the touch.
Branch Goes to
True Where to go when the touch happens.
False Where to go when it does not.

Phases StartEvery FramePhysics

Double Tap

Every Frame
Double Tap Input
Condition true | Window 0.3 | → Tapped | → Waiting

Takes Tapped the second time the condition turns true, when the two moments land within Window seconds of each other. With Window = 0.3 and a Check Key placed in Condition, hitting shift twice quickly is what an air dash listens for. A lone press takes Waiting and is kept as the start of a possible pair.

Input Type Default Description
Condition bool true The test whose two turns make the pair, such as a Check Key or a Check Action placed right here.
Window float 0.3 How long the second press has to arrive, in seconds.
Branch Goes to
Tapped Where to go on the frame the second press lands.
Waiting Where to go on every other frame.

Phases Every FramePhysics

Get Axis

Every Frame
Get Axis Input
Negative 'ui_left' | Positive 'ui_right'

Reads two input actions and stores their combined strength as a number from -1 to 1.

Input Type Default Description
Negative StringName 'ui_left' The input action that pushes the value toward -1.
Positive StringName 'ui_right' The input action that pushes the value toward 1.
Output Type Description
Result float Where to store the axis value, from -1 to 1.

Phases StartEvery FramePhysicsEnd

Get Mouse Motion

Every Frame
Get Mouse Motion Input

Reads how the mouse is moving and stores it as a direction whose length is the speed in pixels per second. It stays at zero while the mouse is still.

Output Type Description
Result Vector2 Where to store the mouse movement, in pixels per second.

Phases StartEvery FramePhysicsEnd

Get Mouse Position

Every Frame
Get Mouse Position Input

Reads the mouse position in world space and stores it. Useful to aim at the cursor or drag a node toward it.

Output Type Description
Position Vector2 Where to store the mouse position, in world space.

Phases StartEvery FramePhysicsEnd Works on CanvasItem

Get Mouse World Position

Every Frame
Get Mouse World Position Input
0.0

Reads the world point the mouse is over on a flat ground and stores it. It is what a click to move, a tower placement or an RTS order needs, and it uses the active camera.

Input Type Default Description
Height float 0.0 How high the flat ground sits on the Y axis, usually 0 for the floor.
Output Type Description
Result Vector3 Where to store the point the mouse is over. It stays at zero while no camera is active.

Phases StartEvery FramePhysicsEnd Works on Node3D

Get Move Vector

Every Frame
Get Move Vector Input
Left 'ui_left' | Right 'ui_right' | Forward 'ui_up' | Back 'ui_down'

Reads four movement input actions and stores their direction as a Vector2, already normalized for even diagonal speed.

Input Type Default Description
Left StringName 'ui_left' The input action for moving left.
Right StringName 'ui_right' The input action for moving right.
Forward StringName 'ui_up' The input action for moving forward.
Back StringName 'ui_down' The input action for moving back.
Output Type Description
Result Vector2 Where to store the movement direction.

Phases StartEvery FramePhysicsEnd

Mouse Captured

Physics
Mouse Captured Input
→ Captured | → Free

Answers whether the cursor is locked to the window for looking around, which is what keeps a pause screen from turning the camera. It can branch on the answer or hand it to a field that takes a yes or no.

Output Type Description
Yes bool Where to store whether the cursor is locked to the window.
Branch Goes to
Captured Where to go while the cursor is locked, which is when the game is being played.
Free Where to go while the cursor is loose on screen.

Phases StartEvery FramePhysics

Mouse Look

Physics
Mouse Look Input
Camera not set | Sensitivity 0.003 | Max Pitch 85.0

Turns the body left and right and tilts a camera up and down from mouse motion, for a first person view.

Input Type Default Description
Camera Node - The camera node that tilts up and down.
Sensitivity float 0.003 How much the view moves per pixel of mouse motion.
Max Pitch float 85.0 How far the camera can look up or down, in degrees.

Phases Every FramePhysics Works on Node3D

On Clicked

Physics
On Clicked Input
'left' | → Clicked | → Not Clicked

Checks whether a mouse click landed on this node and branches on the answer. It asks the 2D physics world what sits under the cursor, so the node needs a collision shape, and it only fires on the frame the button goes down.

Input Type Default Description
Button String 'left' Which mouse button has to go down.
Branch Goes to
Clicked Where to go when the click landed on this node.
Not Clicked Where to go on every other frame.

Phases Physics Works on Node2D

Pick Under Mouse

Physics
Pick Under Mouse Input
→ Hit | → Miss

Asks the 2D physics world which collider sits under the mouse and branches on whether one is found.

Output Type Description
Collider Object Where to store the collider found under the mouse.
Branch Goes to
Hit Where to go when a collider is under the mouse.
Miss Where to go when nothing is under it.

Phases Physics Works on Node2D

Pick Under Mouse

Physics
Pick Under Mouse Input
→ Hit | → Miss

Asks the 3D physics world which collider sits under the mouse and branches on whether one is found. It shoots a ray from the active camera, so the scene needs one.

Output Type Description
Collider Object Where to store the collider found under the mouse.
Point Vector3 Where to store the world position the ray touched.
Branch Goes to
Hit Where to go when a collider is under the mouse.
Miss Where to go when nothing is under it, which is also the case while no camera is active.

Phases Physics Works on Node3D

Set Mouse Mode

Start
Set Mouse Mode Input
'MOUSE_MODE_CAPTURED'

Sets how the mouse cursor behaves, such as capturing it for a first person camera or making it visible again.

Input Type Default Description
Mode String 'MOUSE_MODE_CAPTURED' How the cursor should behave.

Phases StartEvery FramePhysicsEnd

Using Gamepad

Every Frame
Using Gamepad Input
→ Gamepad | → Keyboard

Branches on whether the last input came from a gamepad or from the keyboard and mouse. It is what picks the right button icon to show, so a prompt reads "Press A" on a controller and "Press E" otherwise.

Branch Goes to
Gamepad Where to go while the last input came from a gamepad.
Keyboard Where to go while the last input came from the keyboard, the mouse or a touch.

Phases StartEvery FramePhysics

Vibrate

Start
Vibrate Input
Weak 0.5 | Strong 0.5 | Duration 0.2

Vibrates the gamepad for a set time, then stops on its own.

Input Type Default Description
Weak float 0.5 Strength of the light motor, from 0 to 1.
Strong float 0.5 Strength of the heavy motor, from 0 to 1.
Duration float 0.2 How long the vibration lasts, in seconds.

Phases StartEvery FramePhysicsEnd