Skip to content

Commit 15bdac4

Browse files
TimCoraxAudioakien-mga
authored andcommitted
Clarify requirement for action match in InputEvent.is_action_pressed
1 parent 26df043 commit 15bdac4

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

doc/classes/InputEvent.xml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -51,7 +51,7 @@
5151
<param index="1" name="allow_echo" type="bool" default="false" />
5252
<param index="2" name="exact_match" type="bool" default="false" />
5353
<description>
54-
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].
54+
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].
5555
If [param exact_match] is [code]false[/code], it ignores additional input modifiers for [InputEventKey] and [InputEventMouseButton] events, and the direction for [InputEventJoypadMotion] events.
5656
[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.
5757
</description>
@@ -61,7 +61,7 @@
6161
<param index="0" name="action" type="StringName" />
6262
<param index="1" name="exact_match" type="bool" default="false" />
6363
<description>
64-
Returns [code]true[/code] if the given action is released (i.e. not pressed). Not relevant for events of type [InputEventMouseMotion] or [InputEventScreenDrag].
64+
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].
6565
If [param exact_match] is [code]false[/code], it ignores additional input modifiers for [InputEventKey] and [InputEventMouseButton] events, and the direction for [InputEventJoypadMotion] events.
6666
</description>
6767
</method>

0 commit comments

Comments
 (0)