Skip to content

Commit ac78975

Browse files
committed
Merge pull request #97106 from SkylerGoh-dev/Add-further-clarification-to-Shortcut-and-InputEvent.is_match()-method-documentation
Clarify behavior of `InputEvent.is_match` and `Shortcut.matches_event`
2 parents a9dc9c3 + 4f4fd1a commit ac78975

File tree

2 files changed

+2
-1
lines changed

2 files changed

+2
-1
lines changed

doc/classes/InputEvent.xml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -91,6 +91,7 @@
9191
<description>
9292
Returns [code]true[/code] if the specified [param event] matches this event. Only valid for action events i.e key ([InputEventKey]), button ([InputEventMouseButton] or [InputEventJoypadButton]), axis [InputEventJoypadMotion] or action ([InputEventAction]) events.
9393
If [param exact_match] is [code]false[/code], it ignores additional input modifiers for [InputEventKey] and [InputEventMouseButton] events, and the direction for [InputEventJoypadMotion] events.
94+
[b]Note:[/b] Only considers the event configuration (such as the keyboard key or joypad axis), not state information like [method is_pressed], [method is_released], [method is_echo], or [method is_canceled].
9495
</description>
9596
</method>
9697
<method name="is_pressed" qualifiers="const">

doc/classes/Shortcut.xml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -26,7 +26,7 @@
2626
<return type="bool" />
2727
<param index="0" name="event" type="InputEvent" />
2828
<description>
29-
Returns whether any [InputEvent] in [member events] equals [param event].
29+
Returns whether any [InputEvent] in [member events] equals [param event]. This uses [method InputEvent.is_match] to compare events.
3030
</description>
3131
</method>
3232
</methods>

0 commit comments

Comments
 (0)