Unverified Commit 07bc2452 authored by Bruno Leroux's avatar Bruno Leroux Committed by GitHub

Add a comment about repeat event + fix typos (#118095)

parent 700fe3d2
...@@ -100,7 +100,7 @@ abstract class KeyEvent with Diagnosticable { ...@@ -100,7 +100,7 @@ abstract class KeyEvent with Diagnosticable {
/// is a mnemonic ("keyA" is easier to remember than 0x70004), derived from the /// is a mnemonic ("keyA" is easier to remember than 0x70004), derived from the
/// key's effect on a QWERTY keyboard. The name does not represent the key's /// key's effect on a QWERTY keyboard. The name does not represent the key's
/// effect whatsoever (a physical "keyA" can be the Q key on an AZERTY /// effect whatsoever (a physical "keyA" can be the Q key on an AZERTY
/// keyboard.) /// keyboard).
/// ///
/// For instance, if you wanted to make a game where the key to the right of /// For instance, if you wanted to make a game where the key to the right of
/// the CAPS LOCK key made the player move left, you would be comparing a /// the CAPS LOCK key made the player move left, you would be comparing a
...@@ -241,6 +241,9 @@ class KeyUpEvent extends KeyEvent { ...@@ -241,6 +241,9 @@ class KeyUpEvent extends KeyEvent {
/// An event indicating that the user has been holding a key on the keyboard /// An event indicating that the user has been holding a key on the keyboard
/// and causing repeated events. /// and causing repeated events.
/// ///
/// Repeat events are not guaranteed and are provided only if supported by the
/// underlying platform.
///
/// See also: /// See also:
/// ///
/// * [KeyDownEvent], a key event representing the user /// * [KeyDownEvent], a key event representing the user
...@@ -258,7 +261,7 @@ class KeyRepeatEvent extends KeyEvent { ...@@ -258,7 +261,7 @@ class KeyRepeatEvent extends KeyEvent {
}); });
} }
/// The signature for [HardwareKeyboard.addHandler], a callback to to decide whether /// The signature for [HardwareKeyboard.addHandler], a callback to decide whether
/// the entire framework handles a key event. /// the entire framework handles a key event.
typedef KeyEventCallback = bool Function(KeyEvent event); typedef KeyEventCallback = bool Function(KeyEvent event);
...@@ -737,7 +740,7 @@ class KeyEventManager { ...@@ -737,7 +740,7 @@ class KeyEventManager {
/// The global entrance which handles all key events sent to Flutter. /// The global entrance which handles all key events sent to Flutter.
/// ///
/// Typical applications use [WidgetsBinding], where this field is /// Typical applications use [WidgetsBinding], where this field is
/// set by the focus system (see `FocusManger`) on startup to a function that /// set by the focus system (see `FocusManager`) on startup to a function that
/// dispatches incoming events to the focus system, including /// dispatches incoming events to the focus system, including
/// `FocusNode.onKey`, `FocusNode.onKeyEvent`, and `Shortcuts`. In this case, /// `FocusNode.onKey`, `FocusNode.onKeyEvent`, and `Shortcuts`. In this case,
/// the application does not need to read, assign, or invoke this value. /// the application does not need to read, assign, or invoke this value.
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment