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
273efff0
Unverified
Commit
273efff0
authored
Nov 11, 2020
by
Omar Emara
Committed by
GitHub
Nov 11, 2020
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Correct GtkKeyHelper key codes for the Meta key (#69576)
parent
a40ee8a3
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
4 additions
and
4 deletions
+4
-4
raw_keyboard_linux.dart
packages/flutter/lib/src/services/raw_keyboard_linux.dart
+3
-3
raw_keyboard_test.dart
packages/flutter/test/services/raw_keyboard_test.dart
+1
-1
No files found.
packages/flutter/lib/src/services/raw_keyboard_linux.dart
View file @
273efff0
...
@@ -345,7 +345,7 @@ class GtkKeyHelper with KeyHelper {
...
@@ -345,7 +345,7 @@ class GtkKeyHelper with KeyHelper {
/// test whether one of the Meta(SUPER) modifier keys is pressed.
/// test whether one of the Meta(SUPER) modifier keys is pressed.
///
///
/// {@macro flutter.services.GtkKeyHelper.modifierShift}
/// {@macro flutter.services.GtkKeyHelper.modifierShift}
static
const
int
modifierMeta
=
1
<<
2
8
;
static
const
int
modifierMeta
=
1
<<
2
6
;
int
_mergeModifiers
({
required
int
modifiers
,
required
int
keyCode
,
required
bool
isDown
})
{
int
_mergeModifiers
({
required
int
modifiers
,
required
int
keyCode
,
required
bool
isDown
})
{
// GTK Key codes for modifier keys.
// GTK Key codes for modifier keys.
...
@@ -355,10 +355,10 @@ class GtkKeyHelper with KeyHelper {
...
@@ -355,10 +355,10 @@ class GtkKeyHelper with KeyHelper {
const
int
controlRightKeyCode
=
0xffe4
;
const
int
controlRightKeyCode
=
0xffe4
;
const
int
capsLockKeyCode
=
0xffe5
;
const
int
capsLockKeyCode
=
0xffe5
;
const
int
shiftLockKeyCode
=
0xffe6
;
const
int
shiftLockKeyCode
=
0xffe6
;
const
int
metaLeftKeyCode
=
0xffe7
;
const
int
metaRightKeyCode
=
0xffe8
;
const
int
altLeftKeyCode
=
0xffe9
;
const
int
altLeftKeyCode
=
0xffe9
;
const
int
altRightKeyCode
=
0xffea
;
const
int
altRightKeyCode
=
0xffea
;
const
int
metaLeftKeyCode
=
0xffeb
;
const
int
metaRightKeyCode
=
0xffec
;
const
int
numLockKeyCode
=
0xff7f
;
const
int
numLockKeyCode
=
0xff7f
;
// On GTK, the "modifiers" bitfield is the state as it is BEFORE this event
// On GTK, the "modifiers" bitfield is the state as it is BEFORE this event
...
...
packages/flutter/test/services/raw_keyboard_test.dart
View file @
273efff0
...
@@ -1594,7 +1594,7 @@ void main() {
...
@@ -1594,7 +1594,7 @@ void main() {
case
GtkKeyHelper
.
modifierControl
:
case
GtkKeyHelper
.
modifierControl
:
return
isLeft
?
65507
:
65508
;
return
isLeft
?
65507
:
65508
;
case
GtkKeyHelper
.
modifierMeta
:
case
GtkKeyHelper
.
modifierMeta
:
return
isLeft
?
6551
1
:
65512
;
return
isLeft
?
6551
5
:
65516
;
case
GtkKeyHelper
.
modifierMod2
:
case
GtkKeyHelper
.
modifierMod2
:
return
65407
;
return
65407
;
case
GtkKeyHelper
.
modifierCapsLock
:
case
GtkKeyHelper
.
modifierCapsLock
:
...
...
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