From e29a48a18cfc15f3763ea85ff12e5020f38f1b37 Mon Sep 17 00:00:00 2001
From: Nintorch <92302738+Nintorch@users.noreply.github.com>
Date: Sun, 25 Jan 2026 10:47:08 +0500
Subject: [PATCH] Various `Input` class documentation fixes
---
doc/classes/Input.xml | 38 +++++++++++++++++++-------------------
1 file changed, 19 insertions(+), 19 deletions(-)
diff --git a/doc/classes/Input.xml b/doc/classes/Input.xml
index ee7d3aa640..01b6139166 100644
--- a/doc/classes/Input.xml
+++ b/doc/classes/Input.xml
@@ -18,8 +18,8 @@
- This will simulate pressing the specified action.
- The strength can be used for non-boolean actions, it's ranged between 0 and 1 representing the intensity of the given action.
+ Simulates pressing the specified input action.
+ The [param strength] can be used for non-boolean actions, it's ranged between [code]0.0[/code] and [code]1.0[/code] representing the intensity of the given action.
[b]Note:[/b] This method will not cause any [method Node._input] calls. It is intended to be used with [method is_action_pressed] and [method is_action_just_pressed]. If you want to simulate [code]_input[/code], use [method parse_input_event] instead.
@@ -27,7 +27,7 @@
- If the specified action is already pressed, this will release it.
+ Releases the specified input action, if the action is currently pressed.
@@ -35,7 +35,8 @@
- Adds a new mapping entry (in SDL2 format) to the mapping database. Optionally update already connected devices.
+ Adds a new joypad mapping entry (in SDL format) to the mapping database, and optionally updates the already connected devices.
+ [b]Note:[/b] See [url=https://wiki.libsdl.org/SDL3/SDL_AddGamepadMapping#remarks]SDL documentation[/url] for more information about the SDL controller mapping format.
@@ -50,7 +51,7 @@
- Sends all input events which are in the current buffer to the game loop. These events may have been buffered as a result of accumulated input ([member use_accumulated_input]) or agile input flushing ([member ProjectSettings.input_devices/buffering/agile_event_flushing]).
+ Sends all buffered input events to the game loop. These events may have been buffered as a result of accumulated input ([member use_accumulated_input]) or agile input flushing ([member ProjectSettings.input_devices/buffering/agile_event_flushing]).
The engine will already do this itself at key execution points (at least once per frame). However, this can be useful in advanced cases where you want precise control over the timing of event handling.
@@ -68,7 +69,7 @@
- Returns a value between 0 and 1 representing the raw intensity of the given action, ignoring the action's deadzone. In most cases, you should use [method get_action_strength] instead.
+ Returns a value between [code]0.0[/code] and [code]1.0[/code] representing the raw intensity of the given action, ignoring the action's deadzone. In most cases, you should use [method get_action_strength] instead.
If [param exact_match] is [code]false[/code], it ignores additional input modifiers for [InputEventKey] and [InputEventMouseButton] events, and the direction for [InputEventJoypadMotion] events.
@@ -77,7 +78,7 @@
- Returns a value between 0 and 1 representing the intensity of the given action. In a joypad, for example, the further away the axis (analog sticks or L2, R2 triggers) is from the dead zone, the closer the value will be to 1. If the action is mapped to a control that has no axis such as the keyboard, the value returned will be 0 or 1.
+ Returns a value between [code]0.0[/code] and [code]1.0[/code] representing the intensity of the given action. In a joypad, for example, the further away the axis (analog sticks or L2, R2 triggers) is from the dead zone, the closer the value will be to [code]1.0[/code]. If the action is mapped to a control that has no axis such as the keyboard, the value returned will be [code]0.0[/code] or [code]1.0[/code].
If [param exact_match] is [code]false[/code], it ignores additional input modifiers for [InputEventKey] and [InputEventMouseButton] events, and the direction for [InputEventJoypadMotion] events.
@@ -86,7 +87,7 @@
- Get axis input by specifying two actions, one negative and one positive.
+ Returns axis input value by specifying two actions, one negative and one positive.
This is a shorthand for writing [code]Input.get_action_strength("positive_action") - Input.get_action_strength("negative_action")[/code].
@@ -158,7 +159,6 @@
Returns an SDL-compatible device GUID on platforms that use gamepad remapping, e.g. [code]030000004c050000c405000000010000[/code]. Returns an empty string if it cannot be found. Godot uses SDL's internal mappings, supplemented by community-contributed mappings, to determine gamepad names and mappings based on this GUID.
- On Windows, all XInput joypad GUIDs will be overridden by Godot to [code]__XINPUT_DEVICE__[/code], because their mappings are the same.
@@ -214,7 +214,7 @@
- Returns the name of the joypad at the specified device index, e.g. [code]PS4 Controller[/code]. Godot uses the [url=https://github.com/gabomdq/SDL_GameControllerDB]SDL2 game controller database[/url] to determine gamepad names.
+ Returns the name of the joypad at the specified device index, e.g. [code]PS4 Controller[/code]. Godot uses the [url=https://github.com/gabomdq/SDL_GameControllerDB]SDL game controller database[/url] to determine gamepad names.
@@ -276,9 +276,9 @@
- Gets an input vector by specifying four actions for the positive and negative X and Y axes.
- This method is useful when getting vector input, such as from a joystick, directional pad, arrows, or WASD. The vector has its length limited to 1 and has a circular deadzone, which is useful for using vector input as movement.
- By default, the deadzone is automatically calculated from the average of the action deadzones. However, you can override the deadzone to be whatever you want (on the range of 0 to 1).
+ Returns an input vector by specifying four actions for the positive and negative X and Y axes.
+ This method is useful when getting vector input, such as from a joystick, directional pad, arrows, or WASD. The vector has its length limited to [code]1.0[/code] and has a circular deadzone, which is useful for using vector input as movement.
+ By default, the deadzone is automatically calculated from the average of the action deadzones. However, you can override the deadzone to be whatever you want (on the range of [code]0.0[/code] to [code]1.0[/code]).
@@ -293,7 +293,7 @@
- Returns [code]true[/code] if the joypad has motion sensors (accelerometer and gyroscope).
+ Returns [code]true[/code] if the joypad has motion sensors (gyroscope and/or accelerometer).
[b]Note:[/b] On iOS, joypad accelerometer sensor reading is not supported due to OS limitations.
[b]Note:[/b] This feature is only supported on Windows, Linux, macOS, and iOS.
@@ -408,7 +408,7 @@
- Returns [code]true[/code] if the requested joypad has motion sensors (accelerometer and gyroscope) and they are currently enabled. See also [method set_joy_motion_sensors_enabled] and [method has_joy_motion_sensors].
+ Returns [code]true[/code] if the requested joypad has motion sensors (gyroscope and/or accelerometer) and they are currently enabled. See also [method set_joy_motion_sensors_enabled] and [method has_joy_motion_sensors].
See [method start_joy_motion_sensors_calibration] for an example on how to use joypad motion sensors and calibration in your games.
[b]Note:[/b] This feature is only supported on Windows, Linux, macOS, and iOS.
@@ -555,7 +555,7 @@
- Enables or disables the motion sensors (accelerometer and gyroscope), if available, on the specified joypad.
+ Enables or disables the motion sensors (gyroscope and/or accelerometer), if available, on the specified joypad.
See [method start_joy_motion_sensors_calibration] for an example on how to use joypad motion sensors and calibration in your games.
It's recommended to disable the motion sensors when they're no longer being used, because otherwise it might drain the controller battery faster.
[b]Note:[/b] This feature is only supported on Windows, Linux, macOS, and iOS.
@@ -574,7 +574,7 @@
- Queries whether an input device should be ignored or not. Devices can be ignored by setting the environment variable [code]SDL_GAMECONTROLLER_IGNORE_DEVICES[/code]. Read the [url=https://wiki.libsdl.org/SDL2]SDL documentation[/url] for more information.
+ Queries whether an input device should be ignored or not. Devices can be ignored by setting the environment variable [code]SDL_GAMECONTROLLER_IGNORE_DEVICES[/code]. See [url=https://wiki.libsdl.org/SDL3/SDL_HINT_GAMECONTROLLER_IGNORE_DEVICES]SDL documentation[/url] for more information.
[b]Note:[/b] Some 3rd party tools can contribute to the list of ignored devices. For example, [i]SteamInput[/i] creates virtual devices from physical devices for remapping purposes. To avoid handling the same input device twice, the original device is added to the ignore list.
@@ -693,7 +693,7 @@
- Starts to vibrate the joypad. See also [method has_joy_vibration] and [method is_joy_vibrating].
+ Starts vibrating the joypad. See also [method has_joy_vibration] and [method is_joy_vibrating].
Joypads usually come with two rumble motors, a strong and a weak one.
[param weak_magnitude] is the strength of the weak motor (between [code]0.0[/code] and [code]1.0[/code]).
[param strong_magnitude] is the strength of the strong motor (between [code]0.0[/code] and [code]1.0[/code]).
@@ -724,7 +724,7 @@
- Vibrate the handheld device for the specified duration in milliseconds.
+ Starts vibrating the handheld device for the specified duration in milliseconds.
[param amplitude] is the strength of the vibration, as a value between [code]0.0[/code] and [code]1.0[/code]. If set to [code]-1.0[/code], the default vibration strength of the device is used.
[b]Note:[/b] This method is implemented on Android, iOS, and Web. It has no effect on other platforms.
[b]Note:[/b] For Android, [method vibrate_handheld] requires enabling the [code]VIBRATE[/code] permission in the export preset. Otherwise, [method vibrate_handheld] will have no effect.