Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Submit feedback
Sign in
Toggle navigation
F
Front-End
Project
Project
Details
Activity
Releases
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
abdullh.alsoleman
Front-End
Commits
4b3cf9bb
Unverified
Commit
4b3cf9bb
authored
Jan 17, 2023
by
Bruno Leroux
Committed by
GitHub
Jan 17, 2023
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Add reference to HardwareKeyboard in RawKeyboard documentation (#118607)
parent
6fafbc33
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
19 additions
and
0 deletions
+19
-0
raw_keyboard.dart
packages/flutter/lib/src/services/raw_keyboard.dart
+19
-0
No files found.
packages/flutter/lib/src/services/raw_keyboard.dart
View file @
4b3cf9bb
...
...
@@ -585,6 +585,24 @@ typedef RawKeyEventHandler = bool Function(RawKeyEvent event);
/// These key events are typically only key events generated by a hardware
/// keyboard, and not those from software keyboards or input method editors.
///
/// ## Compared to [HardwareKeyboard]
///
/// [RawKeyboard] is the legacy API, and will be deprecated and removed in the
/// future. It is recommended to always use [HardwareKeyboard] and [KeyEvent]
/// APIs (such as [FocusNode.onKeyEvent]) to handle key events.
///
/// Behavior-wise, [RawKeyboard] provides a less unified, less regular
/// event model than [HardwareKeyboard]. For example:
///
/// * Down events might not be matched with an up event, and vice versa (the
/// set of pressed keys is silently updated).
/// * The logical key of the down event might not be the same as that of the up
/// event.
/// * Down events and repeat events are not easily distinguishable (must be
/// tracked manually).
/// * Lock modes (such as CapsLock) only have their "enabled" state recorded.
/// There's no way to acquire their pressing state.
///
/// See also:
///
/// * [RawKeyDownEvent] and [RawKeyUpEvent], the classes used to describe
...
...
@@ -592,6 +610,7 @@ typedef RawKeyEventHandler = bool Function(RawKeyEvent event);
/// * [RawKeyboardListener], a widget that listens for raw key events.
/// * [SystemChannels.keyEvent], the low-level channel used for receiving
/// events from the system.
/// * [HardwareKeyboard], the recommended replacement.
class
RawKeyboard
{
RawKeyboard
.
_
();
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment