Unverified Commit 273efff0 authored by Omar Emara's avatar Omar Emara Committed by GitHub

Correct GtkKeyHelper key codes for the Meta key (#69576)

parent a40ee8a3
...@@ -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 << 28; static const int modifierMeta = 1 << 26;
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
......
...@@ -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 ? 65511 : 65512; return isLeft ? 65515 : 65516;
case GtkKeyHelper.modifierMod2: case GtkKeyHelper.modifierMod2:
return 65407; return 65407;
case GtkKeyHelper.modifierCapsLock: case GtkKeyHelper.modifierCapsLock:
......
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