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
8061894f
Unverified
Commit
8061894f
authored
Jan 31, 2020
by
Alexandre Ardhuin
Committed by
GitHub
Jan 31, 2020
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
update template for gen_keycodes (#49884)
parent
8b600032
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
11 additions
and
12 deletions
+11
-12
keyboard_key.tmpl
dev/tools/gen_keycodes/data/keyboard_key.tmpl
+11
-11
keyboard_maps.tmpl
dev/tools/gen_keycodes/data/keyboard_maps.tmpl
+0
-1
No files found.
dev/tools/gen_keycodes/data/keyboard_key.tmpl
View file @
8061894f
...
...
@@ -45,7 +45,7 @@ abstract class KeyboardKey extends Diagnosticable {
/// look at the physical key to make sure that regardless of the character the
/// key produces, you got the key that is in that location on the keyboard.
///
/// {@tool s
nippet
--template=stateful_widget_scaffold}
/// {@tool s
ample
--template=stateful_widget_scaffold}
/// This example shows how to detect if the user has selected the logical "Q"
/// key.
///
...
...
@@ -127,7 +127,7 @@ class LogicalKeyboardKey extends KeyboardKey {
///
/// [keyId] must not be null.
///
/// {@tool s
ample
}
/// {@tool s
nippet
}
/// To save executable size, it is recommended that the [debugName] be null in
/// release mode. You can do this by using the [kReleaseMode] constant.
///
...
...
@@ -167,12 +167,12 @@ class LogicalKeyboardKey extends KeyboardKey {
int get hashCode => keyId.hashCode;
@override
bool operator ==(
dynamic
other) {
bool operator ==(
Object
other) {
if (other.runtimeType != runtimeType) {
return false;
}
final LogicalKeyboardKey typedOther = other;
return keyId == typedOther.
keyId;
return other is LogicalKeyboardKey
&& other.keyId ==
keyId;
}
/// Returns the [LogicalKeyboardKey] constant that matches the given ID, or
...
...
@@ -246,7 +246,7 @@ class LogicalKeyboardKey extends KeyboardKey {
/// [control], so that the question "is any control key down?" can be asked.
static Set<LogicalKeyboardKey> collapseSynonyms(Set<LogicalKeyboardKey> input) {
final Set<LogicalKeyboardKey> result = <LogicalKeyboardKey>{};
for (LogicalKeyboardKey key in input) {
for (
final
LogicalKeyboardKey key in input) {
final LogicalKeyboardKey synonym = _synonyms[key];
result.add(synonym ?? key);
}
...
...
@@ -331,7 +331,7 @@ class LogicalKeyboardKey extends KeyboardKey {
/// looking for "the key next next to the TAB key", since on a French keyboard,
/// the key next to the TAB key has an "A" on it.
///
/// {@tool s
nippet
--template=stateful_widget_scaffold}
/// {@tool s
ample
--template=stateful_widget_scaffold}
/// This example shows how to detect if the user has selected the physical key
/// to the right of the CAPS LOCK key.
///
...
...
@@ -407,7 +407,7 @@ class PhysicalKeyboardKey extends KeyboardKey {
///
/// The [usbHidUsage] must not be null.
///
/// {@tool s
ample
}
/// {@tool s
nippet
}
/// To save executable size, it is recommended that the [debugName] be null in
/// release mode. You can do this using the [kReleaseMode] constant.
///
...
...
@@ -440,12 +440,12 @@ class PhysicalKeyboardKey extends KeyboardKey {
int get hashCode => usbHidUsage.hashCode;
@override
bool operator ==(
dynamic
other) {
bool operator ==(
Object
other) {
if (other.runtimeType != runtimeType) {
return false;
}
final PhysicalKeyboardKey typedOther = other;
return usbHidUsage == typedOther.
usbHidUsage;
return other is PhysicalKeyboardKey
&& other.usbHidUsage ==
usbHidUsage;
}
@override
...
...
dev/tools/gen_keycodes/data/keyboard_maps.tmpl
View file @
8061894f
...
...
@@ -92,4 +92,3 @@ const Map<String, PhysicalKeyboardKey> kWebToPhysicalKey = <String, PhysicalKeyb
const Map<String, LogicalKeyboardKey> kWebNumPadMap = <String, LogicalKeyboardKey>{
@@@WEB_NUMPAD_MAP@@@
};
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