1
0
mirror of https://github.com/godotengine/godot.git synced 2025-11-04 12:00:25 +00:00

Clarify requirement for action match in InputEvent.is_action_pressed

This commit is contained in:
Tim Oliver
2025-03-02 14:36:36 +13:00
committed by Rémi Verschelde
parent 26df04377e
commit 15bdac4e9e

View File

@@ -51,7 +51,7 @@
<param index="1" name="allow_echo" type="bool" default="false" /> <param index="1" name="allow_echo" type="bool" default="false" />
<param index="2" name="exact_match" type="bool" default="false" /> <param index="2" name="exact_match" type="bool" default="false" />
<description> <description>
Returns [code]true[/code] if the given action is being pressed (and is not an echo event for [InputEventKey] events, unless [param allow_echo] is [code]true[/code]). Not relevant for events of type [InputEventMouseMotion] or [InputEventScreenDrag]. Returns [code]true[/code] if the given action matches this event and is being pressed (and is not an echo event for [InputEventKey] events, unless [param allow_echo] is [code]true[/code]). Not relevant for events of type [InputEventMouseMotion] or [InputEventScreenDrag].
If [param exact_match] is [code]false[/code], it ignores additional input modifiers for [InputEventKey] and [InputEventMouseButton] events, and the direction for [InputEventJoypadMotion] events. If [param exact_match] is [code]false[/code], it ignores additional input modifiers for [InputEventKey] and [InputEventMouseButton] events, and the direction for [InputEventJoypadMotion] events.
[b]Note:[/b] Due to keyboard ghosting, [method is_action_pressed] may return [code]false[/code] even if one of the action's keys is pressed. See [url=$DOCS_URL/tutorials/inputs/input_examples.html#keyboard-events]Input examples[/url] in the documentation for more information. [b]Note:[/b] Due to keyboard ghosting, [method is_action_pressed] may return [code]false[/code] even if one of the action's keys is pressed. See [url=$DOCS_URL/tutorials/inputs/input_examples.html#keyboard-events]Input examples[/url] in the documentation for more information.
</description> </description>
@@ -61,7 +61,7 @@
<param index="0" name="action" type="StringName" /> <param index="0" name="action" type="StringName" />
<param index="1" name="exact_match" type="bool" default="false" /> <param index="1" name="exact_match" type="bool" default="false" />
<description> <description>
Returns [code]true[/code] if the given action is released (i.e. not pressed). Not relevant for events of type [InputEventMouseMotion] or [InputEventScreenDrag]. Returns [code]true[/code] if the given action matches this event and is released (i.e. not pressed). Not relevant for events of type [InputEventMouseMotion] or [InputEventScreenDrag].
If [param exact_match] is [code]false[/code], it ignores additional input modifiers for [InputEventKey] and [InputEventMouseButton] events, and the direction for [InputEventJoypadMotion] events. If [param exact_match] is [code]false[/code], it ignores additional input modifiers for [InputEventKey] and [InputEventMouseButton] events, and the direction for [InputEventJoypadMotion] events.
</description> </description>
</method> </method>