Unverified Commit 857fe320 authored by Greg Spencer's avatar Greg Spencer Committed by GitHub

Update keycodes, fix a comment. (#30938)

Updates the keycodes by regenerating them using the script, and fixed a comment in the template to conform to style.
parent a18226d0
......@@ -181,31 +181,6 @@
"glfw": null
}
},
"launchAssistant": {
"names": {
"domkey": "LaunchAssistant",
"android": [
"ASSIST"
],
"english": "Launch Assistant",
"chromium": "launchAssistant",
"glfw": null
},
"scanCodes": {
"android": null,
"usb": 23,
"linux": 583,
"xkb": 591,
"windows": null,
"macos": null
},
"keyCodes": {
"android": [
219
],
"glfw": null
}
},
"sleep": {
"names": {
"domkey": "Sleep",
......@@ -260,6 +235,27 @@
"glfw": null
}
},
"displayToggleIntExt": {
"names": {
"domkey": "DisplayToggleIntExt",
"android": null,
"english": "Display Toggle Int Ext",
"chromium": "displayToggleIntExt",
"glfw": null
},
"scanCodes": {
"android": null,
"usb": 65717,
"linux": 227,
"xkb": 235,
"windows": null,
"macos": null
},
"keyCodes": {
"android": null,
"glfw": null
}
},
"usbReserved": {
"names": {
"domkey": null,
......@@ -5844,6 +5840,31 @@
"glfw": null
}
},
"launchAssistant": {
"names": {
"domkey": "LaunchAssistant",
"android": [
"ASSIST"
],
"english": "Launch Assistant",
"chromium": "launchAssistant",
"glfw": null
},
"scanCodes": {
"android": null,
"usb": 786891,
"linux": 583,
"xkb": 591,
"windows": null,
"macos": null
},
"keyCodes": {
"android": [
219
],
"glfw": null
}
},
"launchAudioBrowser": {
"names": {
"domkey": null,
......@@ -6193,8 +6214,8 @@
"scanCodes": {
"android": null,
"usb": 786994,
"linux": null,
"xkb": null,
"linux": 372,
"xkb": 380,
"windows": null,
"macos": null
},
......@@ -6292,5 +6313,26 @@
"android": null,
"glfw": null
}
},
"showAllWindows": {
"names": {
"domkey": "ShowAllWindows",
"android": null,
"english": "Show All Windows",
"chromium": "showAllWindows",
"glfw": null
},
"scanCodes": {
"android": null,
"usb": 787103,
"linux": 120,
"xkb": 128,
"windows": null,
"macos": null
},
"keyCodes": {
"android": null,
"glfw": null
}
}
}
\ No newline at end of file
......@@ -40,6 +40,8 @@ const Map<int, PhysicalKeyboardKey> kFuchsiaToPhysicalKey = <int, PhysicalKeyboa
};
/// Maps macOS-specific key code values representing [PhysicalKeyboardKey].
///
/// MacOS doesn't provide a scan code, but a virtual keycode to represent a physical key.
const Map<int, PhysicalKeyboardKey> kMacOsToPhysicalKey = <int, PhysicalKeyboardKey>{
@@@MACOS_SCAN_CODE_MAP@@@
};
......
......@@ -283,11 +283,6 @@ class LogicalKeyboardKey extends Diagnosticable {
/// See the function [RawKeyEvent.logicalKey] for more information.
static const LogicalKeyboardKey turbo = LogicalKeyboardKey(0x00100000016, debugName: kReleaseMode ? null : 'Turbo');
/// Represents the logical "Launch Assistant" key on the keyboard.
///
/// See the function [RawKeyEvent.logicalKey] for more information.
static const LogicalKeyboardKey launchAssistant = LogicalKeyboardKey(0x00100000017, debugName: kReleaseMode ? null : 'Launch Assistant');
/// Represents the logical "Sleep" key on the keyboard.
///
/// See the function [RawKeyEvent.logicalKey] for more information.
......@@ -298,6 +293,11 @@ class LogicalKeyboardKey extends Diagnosticable {
/// See the function [RawKeyEvent.logicalKey] for more information.
static const LogicalKeyboardKey wakeUp = LogicalKeyboardKey(0x00100010083, debugName: kReleaseMode ? null : 'Wake Up');
/// Represents the logical "Display Toggle Int Ext" key on the keyboard.
///
/// See the function [RawKeyEvent.logicalKey] for more information.
static const LogicalKeyboardKey displayToggleIntExt = LogicalKeyboardKey(0x001000100b5, debugName: kReleaseMode ? null : 'Display Toggle Int Ext');
/// Represents the logical "Usb Reserved" key on the keyboard.
///
/// See the function [RawKeyEvent.logicalKey] for more information.
......@@ -1303,6 +1303,11 @@ class LogicalKeyboardKey extends Diagnosticable {
/// See the function [RawKeyEvent.logicalKey] for more information.
static const LogicalKeyboardKey launchScreenSaver = LogicalKeyboardKey(0x001000c01b1, debugName: kReleaseMode ? null : 'Launch Screen Saver');
/// Represents the logical "Launch Assistant" key on the keyboard.
///
/// See the function [RawKeyEvent.logicalKey] for more information.
static const LogicalKeyboardKey launchAssistant = LogicalKeyboardKey(0x001000c01cb, debugName: kReleaseMode ? null : 'Launch Assistant');
/// Represents the logical "Launch Audio Browser" key on the keyboard.
///
/// See the function [RawKeyEvent.logicalKey] for more information.
......@@ -1398,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 "Show All Windows" key on the keyboard.
///
/// See the function [RawKeyEvent.logicalKey] for more information.
static const LogicalKeyboardKey showAllWindows = LogicalKeyboardKey(0x001000c029f, debugName: kReleaseMode ? null : 'Show All Windows');
// A list of all predefined constant LogicalKeyboardKeys so they can be
// searched.
static const Map<int, LogicalKeyboardKey> _knownLogicalKeys = <int, LogicalKeyboardKey>{
......@@ -1409,9 +1419,9 @@ class LogicalKeyboardKey extends Diagnosticable {
0x0100000014: suspend,
0x0100000015: resume,
0x0100000016: turbo,
0x0100000017: launchAssistant,
0x0100010082: sleep,
0x0100010083: wakeUp,
0x01000100b5: displayToggleIntExt,
0x0100070000: usbReserved,
0x0100070001: usbErrorRollOver,
0x0100070002: usbPostFail,
......@@ -1613,6 +1623,7 @@ class LogicalKeyboardKey extends Diagnosticable {
0x01000c01ab: spellCheck,
0x01000c01ae: launchKeyboardLayout,
0x01000c01b1: launchScreenSaver,
0x01000c01cb: launchAssistant,
0x01000c01b7: launchAudioBrowser,
0x01000c0201: newKey,
0x01000c0203: close,
......@@ -1632,6 +1643,7 @@ class LogicalKeyboardKey extends Diagnosticable {
0x01000c0289: mailReply,
0x01000c028b: mailForward,
0x01000c028c: mailSend,
0x01000c029f: showAllWindows,
};
}
......@@ -1822,12 +1834,6 @@ class PhysicalKeyboardKey extends Diagnosticable {
/// See the function [RawKeyEvent.physicalKey] for more information.
static const PhysicalKeyboardKey turbo = PhysicalKeyboardKey(0x00000016, debugName: kReleaseMode ? null : 'Turbo');
/// Represents the location of the "Launch Assistant" key on a generalized
/// keyboard.
///
/// See the function [RawKeyEvent.physicalKey] for more information.
static const PhysicalKeyboardKey launchAssistant = PhysicalKeyboardKey(0x00000017, debugName: kReleaseMode ? null : 'Launch Assistant');
/// Represents the location of the "Sleep" key on a generalized keyboard.
///
/// See the function [RawKeyEvent.physicalKey] for more information.
......@@ -1838,6 +1844,12 @@ class PhysicalKeyboardKey extends Diagnosticable {
/// See the function [RawKeyEvent.physicalKey] for more information.
static const PhysicalKeyboardKey wakeUp = PhysicalKeyboardKey(0x00010083, debugName: kReleaseMode ? null : 'Wake Up');
/// Represents the location of the "Display Toggle Int Ext" key on a
/// generalized keyboard.
///
/// See the function [RawKeyEvent.physicalKey] for more information.
static const PhysicalKeyboardKey displayToggleIntExt = PhysicalKeyboardKey(0x000100b5, debugName: kReleaseMode ? null : 'Display Toggle Int Ext');
/// Represents the location of the "Usb Reserved" key on a generalized
/// keyboard.
///
......@@ -2912,6 +2924,12 @@ class PhysicalKeyboardKey extends Diagnosticable {
/// See the function [RawKeyEvent.physicalKey] for more information.
static const PhysicalKeyboardKey launchScreenSaver = PhysicalKeyboardKey(0x000c01b1, debugName: kReleaseMode ? null : 'Launch Screen Saver');
/// Represents the location of the "Launch Assistant" key on a generalized
/// keyboard.
///
/// See the function [RawKeyEvent.physicalKey] for more information.
static const PhysicalKeyboardKey launchAssistant = PhysicalKeyboardKey(0x000c01cb, debugName: kReleaseMode ? null : 'Launch Assistant');
/// Represents the location of the "Launch Audio Browser" key on a generalized
/// keyboard.
///
......@@ -3017,6 +3035,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 "Show All Windows" key on a generalized
/// keyboard.
///
/// See the function [RawKeyEvent.physicalKey] for more information.
static const PhysicalKeyboardKey showAllWindows = PhysicalKeyboardKey(0x000c029f, debugName: kReleaseMode ? null : 'Show All Windows');
// A list of all the predefined constant PhysicalKeyboardKeys so that they
// can be searched.
static const Map<int, PhysicalKeyboardKey> _knownPhysicalKeys = <int, PhysicalKeyboardKey>{
......@@ -3028,9 +3052,9 @@ class PhysicalKeyboardKey extends Diagnosticable {
0x00000014: suspend,
0x00000015: resume,
0x00000016: turbo,
0x00000017: launchAssistant,
0x00010082: sleep,
0x00010083: wakeUp,
0x000100b5: displayToggleIntExt,
0x00070000: usbReserved,
0x00070001: usbErrorRollOver,
0x00070002: usbPostFail,
......@@ -3232,6 +3256,7 @@ class PhysicalKeyboardKey extends Diagnosticable {
0x000c01ab: spellCheck,
0x000c01ae: launchKeyboardLayout,
0x000c01b1: launchScreenSaver,
0x000c01cb: launchAssistant,
0x000c01b7: launchAudioBrowser,
0x000c0201: newKey,
0x000c0203: close,
......@@ -3251,5 +3276,6 @@ class PhysicalKeyboardKey extends Diagnosticable {
0x000c0289: mailReply,
0x000c028b: mailForward,
0x000c028c: mailSend,
0x000c029f: showAllWindows,
};
}
......@@ -15,7 +15,6 @@ import 'keyboard_key.dart';
const Map<int, LogicalKeyboardKey> kAndroidToLogicalKey = <int, LogicalKeyboardKey>{
0: LogicalKeyboardKey.none,
119: LogicalKeyboardKey.fn,
219: LogicalKeyboardKey.launchAssistant,
223: LogicalKeyboardKey.sleep,
224: LogicalKeyboardKey.wakeUp,
29: LogicalKeyboardKey.keyA,
......@@ -155,6 +154,7 @@ const Map<int, LogicalKeyboardKey> kAndroidToLogicalKey = <int, LogicalKeyboardK
65: LogicalKeyboardKey.launchMail,
207: LogicalKeyboardKey.launchContacts,
208: LogicalKeyboardKey.launchCalendar,
219: LogicalKeyboardKey.launchAssistant,
128: LogicalKeyboardKey.close,
84: LogicalKeyboardKey.browserSearch,
125: LogicalKeyboardKey.browserForward,
......@@ -382,9 +382,9 @@ const Map<int, LogicalKeyboardKey> kFuchsiaToLogicalKey = <int, LogicalKeyboardK
0x100000014: LogicalKeyboardKey.suspend,
0x100000015: LogicalKeyboardKey.resume,
0x100000016: LogicalKeyboardKey.turbo,
0x100000017: LogicalKeyboardKey.launchAssistant,
0x100010082: LogicalKeyboardKey.sleep,
0x100010083: LogicalKeyboardKey.wakeUp,
0x1000100b5: LogicalKeyboardKey.displayToggleIntExt,
0x100070000: LogicalKeyboardKey.usbReserved,
0x100070001: LogicalKeyboardKey.usbErrorRollOver,
0x100070002: LogicalKeyboardKey.usbPostFail,
......@@ -586,6 +586,7 @@ const Map<int, LogicalKeyboardKey> kFuchsiaToLogicalKey = <int, LogicalKeyboardK
0x1000c01ab: LogicalKeyboardKey.spellCheck,
0x1000c01ae: LogicalKeyboardKey.launchKeyboardLayout,
0x1000c01b1: LogicalKeyboardKey.launchScreenSaver,
0x1000c01cb: LogicalKeyboardKey.launchAssistant,
0x1000c01b7: LogicalKeyboardKey.launchAudioBrowser,
0x1000c0201: LogicalKeyboardKey.newKey,
0x1000c0203: LogicalKeyboardKey.close,
......@@ -605,6 +606,7 @@ const Map<int, LogicalKeyboardKey> kFuchsiaToLogicalKey = <int, LogicalKeyboardK
0x1000c0289: LogicalKeyboardKey.mailReply,
0x1000c028b: LogicalKeyboardKey.mailForward,
0x1000c028c: LogicalKeyboardKey.mailSend,
0x1000c029f: LogicalKeyboardKey.showAllWindows,
};
/// Maps Fuchsia-specific USB HID Usage IDs to the matching
......@@ -618,9 +620,9 @@ const Map<int, PhysicalKeyboardKey> kFuchsiaToPhysicalKey = <int, PhysicalKeyboa
0x00000014: PhysicalKeyboardKey.suspend,
0x00000015: PhysicalKeyboardKey.resume,
0x00000016: PhysicalKeyboardKey.turbo,
0x00000017: PhysicalKeyboardKey.launchAssistant,
0x00010082: PhysicalKeyboardKey.sleep,
0x00010083: PhysicalKeyboardKey.wakeUp,
0x000100b5: PhysicalKeyboardKey.displayToggleIntExt,
0x00070000: PhysicalKeyboardKey.usbReserved,
0x00070001: PhysicalKeyboardKey.usbErrorRollOver,
0x00070002: PhysicalKeyboardKey.usbPostFail,
......@@ -822,6 +824,7 @@ const Map<int, PhysicalKeyboardKey> kFuchsiaToPhysicalKey = <int, PhysicalKeyboa
0x000c01ab: PhysicalKeyboardKey.spellCheck,
0x000c01ae: PhysicalKeyboardKey.launchKeyboardLayout,
0x000c01b1: PhysicalKeyboardKey.launchScreenSaver,
0x000c01cb: PhysicalKeyboardKey.launchAssistant,
0x000c01b7: PhysicalKeyboardKey.launchAudioBrowser,
0x000c0201: PhysicalKeyboardKey.newKey,
0x000c0203: PhysicalKeyboardKey.close,
......@@ -841,9 +844,12 @@ const Map<int, PhysicalKeyboardKey> kFuchsiaToPhysicalKey = <int, PhysicalKeyboa
0x000c0289: PhysicalKeyboardKey.mailReply,
0x000c028b: PhysicalKeyboardKey.mailForward,
0x000c028c: PhysicalKeyboardKey.mailSend,
0x000c029f: PhysicalKeyboardKey.showAllWindows,
};
/// Maps macOS-specific key code values representing [PhysicalKeyboardKey].
///
/// MacOS doesn't provide a scan code, but a virtual keycode to represent a physical key.
const Map<int, PhysicalKeyboardKey> kMacOsToPhysicalKey = <int, PhysicalKeyboardKey>{
0x00000000: PhysicalKeyboardKey.keyA,
0x0000000b: PhysicalKeyboardKey.keyB,
......@@ -1127,9 +1133,9 @@ const Map<int, LogicalKeyboardKey> kGlfwNumpadMap = <int, LogicalKeyboardKey>{
/// Maps XKB specific key code values representing [PhysicalKeyboardKey].
const Map<int, PhysicalKeyboardKey> kLinuxToPhysicalKey = <int, PhysicalKeyboardKey>{
0x0000024f: PhysicalKeyboardKey.launchAssistant,
0x00000096: PhysicalKeyboardKey.sleep,
0x00000097: PhysicalKeyboardKey.wakeUp,
0x000000eb: PhysicalKeyboardKey.displayToggleIntExt,
0x00000026: PhysicalKeyboardKey.keyA,
0x00000038: PhysicalKeyboardKey.keyB,
0x00000036: PhysicalKeyboardKey.keyC,
......@@ -1317,6 +1323,7 @@ const Map<int, PhysicalKeyboardKey> kLinuxToPhysicalKey = <int, PhysicalKeyboard
0x000001b8: PhysicalKeyboardKey.spellCheck,
0x0000017e: PhysicalKeyboardKey.launchKeyboardLayout,
0x0000024d: PhysicalKeyboardKey.launchScreenSaver,
0x0000024f: PhysicalKeyboardKey.launchAssistant,
0x00000190: PhysicalKeyboardKey.launchAudioBrowser,
0x000000bd: PhysicalKeyboardKey.newKey,
0x000000d6: PhysicalKeyboardKey.close,
......@@ -1331,9 +1338,11 @@ const Map<int, PhysicalKeyboardKey> kLinuxToPhysicalKey = <int, PhysicalKeyboard
0x000000a4: PhysicalKeyboardKey.browserFavorites,
0x000001aa: PhysicalKeyboardKey.zoomIn,
0x000001ab: PhysicalKeyboardKey.zoomOut,
0x0000017c: PhysicalKeyboardKey.zoomToggle,
0x000000be: PhysicalKeyboardKey.redo,
0x000000f0: PhysicalKeyboardKey.mailReply,
0x000000f1: PhysicalKeyboardKey.mailForward,
0x000000ef: PhysicalKeyboardKey.mailSend,
0x00000080: PhysicalKeyboardKey.showAllWindows,
};
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