Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add "repeat" keyword alias for InputEvent "echo" in the class reference #93562

Merged
merged 1 commit into from
Jun 25, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 3 additions & 2 deletions doc/classes/InputEvent.xml
Original file line number Diff line number Diff line change
Expand Up @@ -77,10 +77,11 @@
Returns [code]true[/code] if this input event has been canceled.
</description>
</method>
<method name="is_echo" qualifiers="const">
<method name="is_echo" qualifiers="const" keywords="is_repeat">
<return type="bool" />
<description>
Returns [code]true[/code] if this input event is an echo event (only for events of type [InputEventKey]). Any other event type returns [code]false[/code].
Returns [code]true[/code] if this input event is an echo event (only for events of type [InputEventKey]). An echo event is a repeated key event sent when the user is holding down the key. Any other event type returns [code]false[/code].
[b]Note:[/b] The rate at which echo events are sent is typically around 20 events per second (after holding down the key for roughly half a second). However, the key repeat delay/speed can be changed by the user or disabled entirely in the operating system settings. To ensure your project works correctly on all configurations, do not assume the user has a specific key repeat configuration in your project's behavior.
</description>
</method>
<method name="is_match" qualifiers="const">
Expand Down
5 changes: 3 additions & 2 deletions doc/classes/InputEventKey.xml
Original file line number Diff line number Diff line change
Expand Up @@ -59,8 +59,9 @@
</method>
</methods>
<members>
<member name="echo" type="bool" setter="set_echo" getter="is_echo" default="false">
If [code]true[/code], the key was already pressed before this event. It means the user is holding the key down.
<member name="echo" type="bool" setter="set_echo" getter="is_echo" default="false" keywords="repeat">
If [code]true[/code], the key was already pressed before this event. An echo event is a repeated key event sent when the user is holding down the key.
[b]Note:[/b] The rate at which echo events are sent is typically around 20 events per second (after holding down the key for roughly half a second). However, the key repeat delay/speed can be changed by the user or disabled entirely in the operating system settings. To ensure your project works correctly on all configurations, do not assume the user has a specific key repeat configuration in your project's behavior.
</member>
<member name="key_label" type="int" setter="set_key_label" getter="get_key_label" enum="Key" default="0">
Represents the localized label printed on the key in the current keyboard layout, which corresponds to one of the [enum Key] constants or any valid Unicode character.
Expand Down
Loading