Skip to content
This repository was archived by the owner on Feb 22, 2023. It is now read-only.

Commit 07bc245

Browse files
authored
Add a comment about repeat event + fix typos (#118095)
1 parent 700fe3d commit 07bc245

File tree

1 file changed

+6
-3
lines changed

1 file changed

+6
-3
lines changed

packages/flutter/lib/src/services/hardware_keyboard.dart

+6-3
Original file line numberDiff line numberDiff line change
@@ -100,7 +100,7 @@ abstract class KeyEvent with Diagnosticable {
100100
/// is a mnemonic ("keyA" is easier to remember than 0x70004), derived from the
101101
/// key's effect on a QWERTY keyboard. The name does not represent the key's
102102
/// effect whatsoever (a physical "keyA" can be the Q key on an AZERTY
103-
/// keyboard.)
103+
/// keyboard).
104104
///
105105
/// For instance, if you wanted to make a game where the key to the right of
106106
/// the CAPS LOCK key made the player move left, you would be comparing a
@@ -241,6 +241,9 @@ class KeyUpEvent extends KeyEvent {
241241
/// An event indicating that the user has been holding a key on the keyboard
242242
/// and causing repeated events.
243243
///
244+
/// Repeat events are not guaranteed and are provided only if supported by the
245+
/// underlying platform.
246+
///
244247
/// See also:
245248
///
246249
/// * [KeyDownEvent], a key event representing the user
@@ -258,7 +261,7 @@ class KeyRepeatEvent extends KeyEvent {
258261
});
259262
}
260263

261-
/// The signature for [HardwareKeyboard.addHandler], a callback to to decide whether
264+
/// The signature for [HardwareKeyboard.addHandler], a callback to decide whether
262265
/// the entire framework handles a key event.
263266
typedef KeyEventCallback = bool Function(KeyEvent event);
264267

@@ -737,7 +740,7 @@ class KeyEventManager {
737740
/// The global entrance which handles all key events sent to Flutter.
738741
///
739742
/// Typical applications use [WidgetsBinding], where this field is
740-
/// set by the focus system (see `FocusManger`) on startup to a function that
743+
/// set by the focus system (see `FocusManager`) on startup to a function that
741744
/// dispatches incoming events to the focus system, including
742745
/// `FocusNode.onKey`, `FocusNode.onKeyEvent`, and `Shortcuts`. In this case,
743746
/// the application does not need to read, assign, or invoke this value.

0 commit comments

Comments
 (0)