From c289c998581fd96acdb17d0fa995f8369cf9c08e Mon Sep 17 00:00:00 2001 From: Greg Spencer Date: Fri, 31 May 2019 09:41:14 -0700 Subject: [PATCH] Update the keycodes from source (#33632) Ran gen_keycodes.dart, which pulled a new keycode from the Chromium source. This PR just checks in that change. --- dev/tools/gen_keycodes/data/key_data.json | 21 +++++++++++++++++++ .../lib/src/services/keyboard_key.dart | 13 ++++++++++++ .../lib/src/services/keyboard_maps.dart | 3 +++ 3 files changed, 37 insertions(+) diff --git a/dev/tools/gen_keycodes/data/key_data.json b/dev/tools/gen_keycodes/data/key_data.json index ea6d4d9cae..8ea2f21823 100644 --- a/dev/tools/gen_keycodes/data/key_data.json +++ b/dev/tools/gen_keycodes/data/key_data.json @@ -6314,6 +6314,27 @@ "glfw": null } }, + "keyboardLayoutSelect": { + "names": { + "domkey": "KeyboardLayoutSelect", + "android": null, + "english": "Keyboard Layout Select", + "chromium": "keyboardLayoutSelect", + "glfw": null + }, + "scanCodes": { + "android": null, + "usb": 787101, + "linux": 584, + "xkb": 592, + "windows": null, + "macos": null + }, + "keyCodes": { + "android": null, + "glfw": null + } + }, "showAllWindows": { "names": { "domkey": "ShowAllWindows", diff --git a/packages/flutter/lib/src/services/keyboard_key.dart b/packages/flutter/lib/src/services/keyboard_key.dart index c5d6660e76..41b5a390d4 100644 --- a/packages/flutter/lib/src/services/keyboard_key.dart +++ b/packages/flutter/lib/src/services/keyboard_key.dart @@ -1403,6 +1403,11 @@ class LogicalKeyboardKey extends Diagnosticable { /// See the function [RawKeyEvent.logicalKey] for more information. static const LogicalKeyboardKey mailSend = LogicalKeyboardKey(0x001000c028c, debugName: kReleaseMode ? null : 'Mail Send'); + /// Represents the logical "Keyboard Layout Select" key on the keyboard. + /// + /// See the function [RawKeyEvent.logicalKey] for more information. + static const LogicalKeyboardKey keyboardLayoutSelect = LogicalKeyboardKey(0x001000c029d, debugName: kReleaseMode ? null : 'Keyboard Layout Select'); + /// Represents the logical "Show All Windows" key on the keyboard. /// /// See the function [RawKeyEvent.logicalKey] for more information. @@ -1643,6 +1648,7 @@ class LogicalKeyboardKey extends Diagnosticable { 0x01000c0289: mailReply, 0x01000c028b: mailForward, 0x01000c028c: mailSend, + 0x01000c029d: keyboardLayoutSelect, 0x01000c029f: showAllWindows, }; } @@ -3035,6 +3041,12 @@ class PhysicalKeyboardKey extends Diagnosticable { /// See the function [RawKeyEvent.physicalKey] for more information. static const PhysicalKeyboardKey mailSend = PhysicalKeyboardKey(0x000c028c, debugName: kReleaseMode ? null : 'Mail Send'); + /// Represents the location of the "Keyboard Layout Select" key on a + /// generalized keyboard. + /// + /// See the function [RawKeyEvent.physicalKey] for more information. + static const PhysicalKeyboardKey keyboardLayoutSelect = PhysicalKeyboardKey(0x000c029d, debugName: kReleaseMode ? null : 'Keyboard Layout Select'); + /// Represents the location of the "Show All Windows" key on a generalized /// keyboard. /// @@ -3276,6 +3288,7 @@ class PhysicalKeyboardKey extends Diagnosticable { 0x000c0289: mailReply, 0x000c028b: mailForward, 0x000c028c: mailSend, + 0x000c029d: keyboardLayoutSelect, 0x000c029f: showAllWindows, }; } diff --git a/packages/flutter/lib/src/services/keyboard_maps.dart b/packages/flutter/lib/src/services/keyboard_maps.dart index 21f0be593e..175e9a186b 100644 --- a/packages/flutter/lib/src/services/keyboard_maps.dart +++ b/packages/flutter/lib/src/services/keyboard_maps.dart @@ -606,6 +606,7 @@ const Map kFuchsiaToLogicalKey = kFuchsiaToPhysicalKey = kLinuxToPhysicalKey =