Skip to content

Commit 4f4fd1a

Browse files
committed
Clarify behavior of InputEvent.is_match and Shortcut.matches_event
- Shortcut: Clarifies how matches_event() method compares events - InputEvent: Clarifies is_match() method does not consider event states
1 parent 02b16d2 commit 4f4fd1a

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)