From 4097cfa17b7f6f93c57a689f8ce7e831edcd284b Mon Sep 17 00:00:00 2001 From: Hugo Locurcio Date: Mon, 24 Jun 2024 19:16:45 +0200 Subject: [PATCH] Add "repeat" keyword alias for InputEvent "echo" in the class reference "echo" is an uncommon term and the action is most commonly referred to as a "repeated" key press. This also improves the documentation related to echo behavior. --- doc/classes/InputEvent.xml | 5 +++-- doc/classes/InputEventKey.xml | 5 +++-- 2 files changed, 6 insertions(+), 4 deletions(-) diff --git a/doc/classes/InputEvent.xml b/doc/classes/InputEvent.xml index 6f2e6aac204..a970f63c6eb 100644 --- a/doc/classes/InputEvent.xml +++ b/doc/classes/InputEvent.xml @@ -77,10 +77,11 @@ Returns [code]true[/code] if this input event has been canceled. - + - 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. diff --git a/doc/classes/InputEventKey.xml b/doc/classes/InputEventKey.xml index dc4872ba03b..69c447ba010 100644 --- a/doc/classes/InputEventKey.xml +++ b/doc/classes/InputEventKey.xml @@ -59,8 +59,9 @@ - - If [code]true[/code], the key was already pressed before this event. It means the user is holding the key down. + + 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. 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.