Unverified Commit b70d260b authored by Francisco Magdaleno's avatar Francisco Magdaleno Committed by GitHub

Adds the keyboard mapping for Linux (#29993)

parent a1712dcf
...@@ -97,6 +97,11 @@ class _HardwareKeyDemoState extends State<RawKeyboardDemo> { ...@@ -97,6 +97,11 @@ class _HardwareKeyDemoState extends State<RawKeyboardDemo> {
dataText.add(Text('characters: ${data.characters}')); dataText.add(Text('characters: ${data.characters}'));
dataText.add(Text('charactersIgnoringModifiers: ${data.charactersIgnoringModifiers}')); dataText.add(Text('charactersIgnoringModifiers: ${data.charactersIgnoringModifiers}'));
dataText.add(Text('modifiers: ${data.modifiers} (${_asHex(data.modifiers)})')); dataText.add(Text('modifiers: ${data.modifiers} (${_asHex(data.modifiers)})'));
} else if (data is RawKeyEventDataLinux) {
dataText.add(Text('keyCode: ${data.keyCode} (${_asHex(data.keyCode)})'));
dataText.add(Text('scanCode: ${data.scanCode}'));
dataText.add(Text('codePoint: ${data.codePoint}'));
dataText.add(Text('modifiers: ${data.modifiers} (${_asHex(data.modifiers)})'));
} }
dataText.add(Text('logical: ${_event.logicalKey}')); dataText.add(Text('logical: ${_event.logicalKey}'));
dataText.add(Text('physical: ${_event.physicalKey}')); dataText.add(Text('physical: ${_event.physicalKey}'));
......
...@@ -38,6 +38,11 @@ Future<String> getAndroidScanCodes() async { ...@@ -38,6 +38,11 @@ Future<String> getAndroidScanCodes() async {
return utf8.decode(base64.decode(await http.read(scanCodesUri))); return utf8.decode(base64.decode(await http.read(scanCodesUri)));
} }
Future<String> getGlfwKeyCodes() async {
final Uri keyCodesUri = Uri.parse('https://raw.githubusercontent.com/glfw/glfw/master/include/GLFW/glfw3.h');
return await http.read(keyCodesUri);
}
Future<void> main(List<String> rawArguments) async { Future<void> main(List<String> rawArguments) async {
final ArgParser argParser = ArgParser(); final ArgParser argParser = ArgParser();
argParser.addOption( argParser.addOption(
...@@ -66,6 +71,19 @@ Future<void> main(List<String> rawArguments) async { ...@@ -66,6 +71,19 @@ Future<void> main(List<String> rawArguments) async {
defaultsTo: path.join(flutterRoot.path, 'dev', 'tools', 'gen_keycodes', 'data', 'key_name_to_android_name.json'), defaultsTo: path.join(flutterRoot.path, 'dev', 'tools', 'gen_keycodes', 'data', 'key_name_to_android_name.json'),
help: 'The path to where the Android keycode to DomKey mapping is.', help: 'The path to where the Android keycode to DomKey mapping is.',
); );
argParser.addOption(
'glfw-keycodes',
defaultsTo: null,
help: 'The path to where the GLFW keycodes header file should be read. '
'If --glfw-keycodes is not specified, the input will be read from the '
'correct file in the GLFW github repository.',
);
argParser.addOption(
'glfw-domkey',
defaultsTo: path.join(flutterRoot.path, 'dev', 'tools', 'gen_keycodes', 'data', 'key_name_to_glfw_name.json'),
help: 'The path to where the GLFW keycode to DomKey mapping is.',
);
argParser.addOption( argParser.addOption(
'data', 'data',
defaultsTo: path.join(flutterRoot.path, 'dev', 'tools', 'gen_keycodes', 'data', 'key_data.json'), defaultsTo: path.join(flutterRoot.path, 'dev', 'tools', 'gen_keycodes', 'data', 'key_data.json'),
...@@ -136,8 +154,17 @@ Future<void> main(List<String> rawArguments) async { ...@@ -136,8 +154,17 @@ Future<void> main(List<String> rawArguments) async {
androidScanCodes = File(parsedArguments['android-scancodes']).readAsStringSync(); androidScanCodes = File(parsedArguments['android-scancodes']).readAsStringSync();
} }
String glfwKeyCodes;
if (parsedArguments['glfw-keycodes'] == null) {
glfwKeyCodes = await getGlfwKeyCodes();
} else {
glfwKeyCodes = File(parsedArguments['glfw-keycodes']).readAsStringSync();
}
final String glfwToDomKey = File(parsedArguments['glfw-domkey']).readAsStringSync();
final String androidToDomKey = File(parsedArguments['android-domkey']).readAsStringSync(); final String androidToDomKey = File(parsedArguments['android-domkey']).readAsStringSync();
data = KeyData(hidCodes, androidScanCodes, androidKeyCodes, androidToDomKey);
data = KeyData(hidCodes, androidScanCodes, androidKeyCodes, androidToDomKey, glfwKeyCodes, glfwToDomKey);
const JsonEncoder encoder = JsonEncoder.withIndent(' '); const JsonEncoder encoder = JsonEncoder.withIndent(' ');
File(parsedArguments['data']).writeAsStringSync(encoder.convert(data.toJson())); File(parsedArguments['data']).writeAsStringSync(encoder.convert(data.toJson()));
......
...@@ -6,7 +6,8 @@ ...@@ -6,7 +6,8 @@
"UNKNOWN" "UNKNOWN"
], ],
"english": "None", "english": "None",
"chromium": "none" "chromium": "none",
"glfw": null
}, },
"scanCodes": { "scanCodes": {
"android": null, "android": null,
...@@ -19,7 +20,8 @@ ...@@ -19,7 +20,8 @@
"keyCodes": { "keyCodes": {
"android": [ "android": [
0 0
] ],
"glfw": null
} }
}, },
"hyper": { "hyper": {
...@@ -27,7 +29,8 @@ ...@@ -27,7 +29,8 @@
"domkey": "Hyper", "domkey": "Hyper",
"android": null, "android": null,
"english": "Hyper", "english": "Hyper",
"chromium": "hyper" "chromium": "hyper",
"glfw": null
}, },
"scanCodes": { "scanCodes": {
"android": null, "android": null,
...@@ -38,7 +41,8 @@ ...@@ -38,7 +41,8 @@
"macos": null "macos": null
}, },
"keyCodes": { "keyCodes": {
"android": null "android": null,
"glfw": null
} }
}, },
"superKey": { "superKey": {
...@@ -46,7 +50,8 @@ ...@@ -46,7 +50,8 @@
"domkey": "Super", "domkey": "Super",
"android": null, "android": null,
"english": "Super Key", "english": "Super Key",
"chromium": "super" "chromium": "super",
"glfw": null
}, },
"scanCodes": { "scanCodes": {
"android": null, "android": null,
...@@ -57,7 +62,8 @@ ...@@ -57,7 +62,8 @@
"macos": null "macos": null
}, },
"keyCodes": { "keyCodes": {
"android": null "android": null,
"glfw": null
} }
}, },
"fn": { "fn": {
...@@ -67,7 +73,8 @@ ...@@ -67,7 +73,8 @@
"FUNCTION" "FUNCTION"
], ],
"english": "Fn", "english": "Fn",
"chromium": "fn" "chromium": "fn",
"glfw": null
}, },
"scanCodes": { "scanCodes": {
"android": [ "android": [
...@@ -82,7 +89,8 @@ ...@@ -82,7 +89,8 @@
"keyCodes": { "keyCodes": {
"android": [ "android": [
119 119
] ],
"glfw": null
} }
}, },
"fnLock": { "fnLock": {
...@@ -90,7 +98,8 @@ ...@@ -90,7 +98,8 @@
"domkey": "FnLock", "domkey": "FnLock",
"android": null, "android": null,
"english": "Fn Lock", "english": "Fn Lock",
"chromium": "fnLock" "chromium": "fnLock",
"glfw": null
}, },
"scanCodes": { "scanCodes": {
"android": null, "android": null,
...@@ -101,7 +110,8 @@ ...@@ -101,7 +110,8 @@
"macos": null "macos": null
}, },
"keyCodes": { "keyCodes": {
"android": null "android": null,
"glfw": null
} }
}, },
"suspend": { "suspend": {
...@@ -111,7 +121,8 @@ ...@@ -111,7 +121,8 @@
"SUSPEND" "SUSPEND"
], ],
"english": "Suspend", "english": "Suspend",
"chromium": "suspend" "chromium": "suspend",
"glfw": null
}, },
"scanCodes": { "scanCodes": {
"android": [ "android": [
...@@ -124,7 +135,8 @@ ...@@ -124,7 +135,8 @@
"macos": null "macos": null
}, },
"keyCodes": { "keyCodes": {
"android": null "android": null,
"glfw": null
} }
}, },
"resume": { "resume": {
...@@ -132,7 +144,8 @@ ...@@ -132,7 +144,8 @@
"domkey": "Resume", "domkey": "Resume",
"android": null, "android": null,
"english": "Resume", "english": "Resume",
"chromium": "resume" "chromium": "resume",
"glfw": null
}, },
"scanCodes": { "scanCodes": {
"android": null, "android": null,
...@@ -143,7 +156,8 @@ ...@@ -143,7 +156,8 @@
"macos": null "macos": null
}, },
"keyCodes": { "keyCodes": {
"android": null "android": null,
"glfw": null
} }
}, },
"turbo": { "turbo": {
...@@ -151,7 +165,8 @@ ...@@ -151,7 +165,8 @@
"domkey": "Turbo", "domkey": "Turbo",
"android": null, "android": null,
"english": "Turbo", "english": "Turbo",
"chromium": "turbo" "chromium": "turbo",
"glfw": null
}, },
"scanCodes": { "scanCodes": {
"android": null, "android": null,
...@@ -162,7 +177,8 @@ ...@@ -162,7 +177,8 @@
"macos": null "macos": null
}, },
"keyCodes": { "keyCodes": {
"android": null "android": null,
"glfw": null
} }
}, },
"launchAssistant": { "launchAssistant": {
...@@ -172,7 +188,8 @@ ...@@ -172,7 +188,8 @@
"ASSIST" "ASSIST"
], ],
"english": "Launch Assistant", "english": "Launch Assistant",
"chromium": "launchAssistant" "chromium": "launchAssistant",
"glfw": null
}, },
"scanCodes": { "scanCodes": {
"android": null, "android": null,
...@@ -185,7 +202,8 @@ ...@@ -185,7 +202,8 @@
"keyCodes": { "keyCodes": {
"android": [ "android": [
219 219
] ],
"glfw": null
} }
}, },
"sleep": { "sleep": {
...@@ -195,7 +213,8 @@ ...@@ -195,7 +213,8 @@
"SLEEP" "SLEEP"
], ],
"english": "Sleep", "english": "Sleep",
"chromium": "sleep" "chromium": "sleep",
"glfw": null
}, },
"scanCodes": { "scanCodes": {
"android": [ "android": [
...@@ -210,7 +229,8 @@ ...@@ -210,7 +229,8 @@
"keyCodes": { "keyCodes": {
"android": [ "android": [
223 223
] ],
"glfw": null
} }
}, },
"wakeUp": { "wakeUp": {
...@@ -220,7 +240,8 @@ ...@@ -220,7 +240,8 @@
"WAKEUP" "WAKEUP"
], ],
"english": "Wake Up", "english": "Wake Up",
"chromium": "wakeUp" "chromium": "wakeUp",
"glfw": null
}, },
"scanCodes": { "scanCodes": {
"android": [ "android": [
...@@ -235,7 +256,8 @@ ...@@ -235,7 +256,8 @@
"keyCodes": { "keyCodes": {
"android": [ "android": [
224 224
] ],
"glfw": null
} }
}, },
"usbReserved": { "usbReserved": {
...@@ -243,7 +265,8 @@ ...@@ -243,7 +265,8 @@
"domkey": null, "domkey": null,
"android": null, "android": null,
"english": "Usb Reserved", "english": "Usb Reserved",
"chromium": "usbReserved" "chromium": "usbReserved",
"glfw": null
}, },
"scanCodes": { "scanCodes": {
"android": null, "android": null,
...@@ -254,7 +277,8 @@ ...@@ -254,7 +277,8 @@
"macos": null "macos": null
}, },
"keyCodes": { "keyCodes": {
"android": null "android": null,
"glfw": null
} }
}, },
"usbErrorRollOver": { "usbErrorRollOver": {
...@@ -262,7 +286,8 @@ ...@@ -262,7 +286,8 @@
"domkey": null, "domkey": null,
"android": null, "android": null,
"english": "Usb Error Roll Over", "english": "Usb Error Roll Over",
"chromium": "usbErrorRollOver" "chromium": "usbErrorRollOver",
"glfw": null
}, },
"scanCodes": { "scanCodes": {
"android": null, "android": null,
...@@ -273,7 +298,8 @@ ...@@ -273,7 +298,8 @@
"macos": null "macos": null
}, },
"keyCodes": { "keyCodes": {
"android": null "android": null,
"glfw": null
} }
}, },
"usbPostFail": { "usbPostFail": {
...@@ -281,7 +307,8 @@ ...@@ -281,7 +307,8 @@
"domkey": null, "domkey": null,
"android": null, "android": null,
"english": "Usb Post Fail", "english": "Usb Post Fail",
"chromium": "usbPostFail" "chromium": "usbPostFail",
"glfw": null
}, },
"scanCodes": { "scanCodes": {
"android": null, "android": null,
...@@ -292,7 +319,8 @@ ...@@ -292,7 +319,8 @@
"macos": null "macos": null
}, },
"keyCodes": { "keyCodes": {
"android": null "android": null,
"glfw": null
} }
}, },
"usbErrorUndefined": { "usbErrorUndefined": {
...@@ -300,7 +328,8 @@ ...@@ -300,7 +328,8 @@
"domkey": null, "domkey": null,
"android": null, "android": null,
"english": "Usb Error Undefined", "english": "Usb Error Undefined",
"chromium": "usbErrorUndefined" "chromium": "usbErrorUndefined",
"glfw": null
}, },
"scanCodes": { "scanCodes": {
"android": null, "android": null,
...@@ -311,7 +340,8 @@ ...@@ -311,7 +340,8 @@
"macos": null "macos": null
}, },
"keyCodes": { "keyCodes": {
"android": null "android": null,
"glfw": null
} }
}, },
"keyA": { "keyA": {
...@@ -321,7 +351,10 @@ ...@@ -321,7 +351,10 @@
"A" "A"
], ],
"english": "Key A", "english": "Key A",
"chromium": "usA" "chromium": "usA",
"glfw": [
"A"
]
}, },
"scanCodes": { "scanCodes": {
"android": [ "android": [
...@@ -336,6 +369,9 @@ ...@@ -336,6 +369,9 @@
"keyCodes": { "keyCodes": {
"android": [ "android": [
29 29
],
"glfw": [
65
] ]
} }
}, },
...@@ -346,7 +382,10 @@ ...@@ -346,7 +382,10 @@
"B" "B"
], ],
"english": "Key B", "english": "Key B",
"chromium": "usB" "chromium": "usB",
"glfw": [
"B"
]
}, },
"scanCodes": { "scanCodes": {
"android": [ "android": [
...@@ -361,6 +400,9 @@ ...@@ -361,6 +400,9 @@
"keyCodes": { "keyCodes": {
"android": [ "android": [
30 30
],
"glfw": [
66
] ]
} }
}, },
...@@ -371,7 +413,10 @@ ...@@ -371,7 +413,10 @@
"C" "C"
], ],
"english": "Key C", "english": "Key C",
"chromium": "usC" "chromium": "usC",
"glfw": [
"C"
]
}, },
"scanCodes": { "scanCodes": {
"android": [ "android": [
...@@ -386,6 +431,9 @@ ...@@ -386,6 +431,9 @@
"keyCodes": { "keyCodes": {
"android": [ "android": [
31 31
],
"glfw": [
67
] ]
} }
}, },
...@@ -396,7 +444,10 @@ ...@@ -396,7 +444,10 @@
"D" "D"
], ],
"english": "Key D", "english": "Key D",
"chromium": "usD" "chromium": "usD",
"glfw": [
"D"
]
}, },
"scanCodes": { "scanCodes": {
"android": [ "android": [
...@@ -411,6 +462,9 @@ ...@@ -411,6 +462,9 @@
"keyCodes": { "keyCodes": {
"android": [ "android": [
32 32
],
"glfw": [
68
] ]
} }
}, },
...@@ -421,7 +475,10 @@ ...@@ -421,7 +475,10 @@
"E" "E"
], ],
"english": "Key E", "english": "Key E",
"chromium": "usE" "chromium": "usE",
"glfw": [
"E"
]
}, },
"scanCodes": { "scanCodes": {
"android": [ "android": [
...@@ -436,6 +493,9 @@ ...@@ -436,6 +493,9 @@
"keyCodes": { "keyCodes": {
"android": [ "android": [
33 33
],
"glfw": [
69
] ]
} }
}, },
...@@ -446,7 +506,10 @@ ...@@ -446,7 +506,10 @@
"F" "F"
], ],
"english": "Key F", "english": "Key F",
"chromium": "usF" "chromium": "usF",
"glfw": [
"F"
]
}, },
"scanCodes": { "scanCodes": {
"android": [ "android": [
...@@ -461,6 +524,9 @@ ...@@ -461,6 +524,9 @@
"keyCodes": { "keyCodes": {
"android": [ "android": [
34 34
],
"glfw": [
70
] ]
} }
}, },
...@@ -471,7 +537,10 @@ ...@@ -471,7 +537,10 @@
"G" "G"
], ],
"english": "Key G", "english": "Key G",
"chromium": "usG" "chromium": "usG",
"glfw": [
"G"
]
}, },
"scanCodes": { "scanCodes": {
"android": [ "android": [
...@@ -486,6 +555,9 @@ ...@@ -486,6 +555,9 @@
"keyCodes": { "keyCodes": {
"android": [ "android": [
35 35
],
"glfw": [
71
] ]
} }
}, },
...@@ -496,7 +568,10 @@ ...@@ -496,7 +568,10 @@
"H" "H"
], ],
"english": "Key H", "english": "Key H",
"chromium": "usH" "chromium": "usH",
"glfw": [
"H"
]
}, },
"scanCodes": { "scanCodes": {
"android": [ "android": [
...@@ -511,6 +586,9 @@ ...@@ -511,6 +586,9 @@
"keyCodes": { "keyCodes": {
"android": [ "android": [
36 36
],
"glfw": [
72
] ]
} }
}, },
...@@ -521,7 +599,10 @@ ...@@ -521,7 +599,10 @@
"I" "I"
], ],
"english": "Key I", "english": "Key I",
"chromium": "usI" "chromium": "usI",
"glfw": [
"I"
]
}, },
"scanCodes": { "scanCodes": {
"android": [ "android": [
...@@ -536,6 +617,9 @@ ...@@ -536,6 +617,9 @@
"keyCodes": { "keyCodes": {
"android": [ "android": [
37 37
],
"glfw": [
73
] ]
} }
}, },
...@@ -546,7 +630,10 @@ ...@@ -546,7 +630,10 @@
"J" "J"
], ],
"english": "Key J", "english": "Key J",
"chromium": "usJ" "chromium": "usJ",
"glfw": [
"J"
]
}, },
"scanCodes": { "scanCodes": {
"android": [ "android": [
...@@ -561,6 +648,9 @@ ...@@ -561,6 +648,9 @@
"keyCodes": { "keyCodes": {
"android": [ "android": [
38 38
],
"glfw": [
74
] ]
} }
}, },
...@@ -571,7 +661,10 @@ ...@@ -571,7 +661,10 @@
"K" "K"
], ],
"english": "Key K", "english": "Key K",
"chromium": "usK" "chromium": "usK",
"glfw": [
"K"
]
}, },
"scanCodes": { "scanCodes": {
"android": [ "android": [
...@@ -586,6 +679,9 @@ ...@@ -586,6 +679,9 @@
"keyCodes": { "keyCodes": {
"android": [ "android": [
39 39
],
"glfw": [
75
] ]
} }
}, },
...@@ -596,7 +692,10 @@ ...@@ -596,7 +692,10 @@
"L" "L"
], ],
"english": "Key L", "english": "Key L",
"chromium": "usL" "chromium": "usL",
"glfw": [
"L"
]
}, },
"scanCodes": { "scanCodes": {
"android": [ "android": [
...@@ -611,6 +710,9 @@ ...@@ -611,6 +710,9 @@
"keyCodes": { "keyCodes": {
"android": [ "android": [
40 40
],
"glfw": [
76
] ]
} }
}, },
...@@ -621,7 +723,10 @@ ...@@ -621,7 +723,10 @@
"M" "M"
], ],
"english": "Key M", "english": "Key M",
"chromium": "usM" "chromium": "usM",
"glfw": [
"M"
]
}, },
"scanCodes": { "scanCodes": {
"android": [ "android": [
...@@ -636,6 +741,9 @@ ...@@ -636,6 +741,9 @@
"keyCodes": { "keyCodes": {
"android": [ "android": [
41 41
],
"glfw": [
77
] ]
} }
}, },
...@@ -646,7 +754,10 @@ ...@@ -646,7 +754,10 @@
"N" "N"
], ],
"english": "Key N", "english": "Key N",
"chromium": "usN" "chromium": "usN",
"glfw": [
"N"
]
}, },
"scanCodes": { "scanCodes": {
"android": [ "android": [
...@@ -661,6 +772,9 @@ ...@@ -661,6 +772,9 @@
"keyCodes": { "keyCodes": {
"android": [ "android": [
42 42
],
"glfw": [
78
] ]
} }
}, },
...@@ -671,7 +785,10 @@ ...@@ -671,7 +785,10 @@
"O" "O"
], ],
"english": "Key O", "english": "Key O",
"chromium": "usO" "chromium": "usO",
"glfw": [
"O"
]
}, },
"scanCodes": { "scanCodes": {
"android": [ "android": [
...@@ -686,6 +803,9 @@ ...@@ -686,6 +803,9 @@
"keyCodes": { "keyCodes": {
"android": [ "android": [
43 43
],
"glfw": [
79
] ]
} }
}, },
...@@ -696,7 +816,10 @@ ...@@ -696,7 +816,10 @@
"P" "P"
], ],
"english": "Key P", "english": "Key P",
"chromium": "usP" "chromium": "usP",
"glfw": [
"P"
]
}, },
"scanCodes": { "scanCodes": {
"android": [ "android": [
...@@ -711,6 +834,9 @@ ...@@ -711,6 +834,9 @@
"keyCodes": { "keyCodes": {
"android": [ "android": [
44 44
],
"glfw": [
80
] ]
} }
}, },
...@@ -721,7 +847,10 @@ ...@@ -721,7 +847,10 @@
"Q" "Q"
], ],
"english": "Key Q", "english": "Key Q",
"chromium": "usQ" "chromium": "usQ",
"glfw": [
"Q"
]
}, },
"scanCodes": { "scanCodes": {
"android": [ "android": [
...@@ -736,6 +865,9 @@ ...@@ -736,6 +865,9 @@
"keyCodes": { "keyCodes": {
"android": [ "android": [
45 45
],
"glfw": [
81
] ]
} }
}, },
...@@ -746,7 +878,10 @@ ...@@ -746,7 +878,10 @@
"R" "R"
], ],
"english": "Key R", "english": "Key R",
"chromium": "usR" "chromium": "usR",
"glfw": [
"R"
]
}, },
"scanCodes": { "scanCodes": {
"android": [ "android": [
...@@ -761,6 +896,9 @@ ...@@ -761,6 +896,9 @@
"keyCodes": { "keyCodes": {
"android": [ "android": [
46 46
],
"glfw": [
82
] ]
} }
}, },
...@@ -771,7 +909,10 @@ ...@@ -771,7 +909,10 @@
"S" "S"
], ],
"english": "Key S", "english": "Key S",
"chromium": "usS" "chromium": "usS",
"glfw": [
"S"
]
}, },
"scanCodes": { "scanCodes": {
"android": [ "android": [
...@@ -786,6 +927,9 @@ ...@@ -786,6 +927,9 @@
"keyCodes": { "keyCodes": {
"android": [ "android": [
47 47
],
"glfw": [
83
] ]
} }
}, },
...@@ -796,7 +940,10 @@ ...@@ -796,7 +940,10 @@
"T" "T"
], ],
"english": "Key T", "english": "Key T",
"chromium": "usT" "chromium": "usT",
"glfw": [
"T"
]
}, },
"scanCodes": { "scanCodes": {
"android": [ "android": [
...@@ -811,6 +958,9 @@ ...@@ -811,6 +958,9 @@
"keyCodes": { "keyCodes": {
"android": [ "android": [
48 48
],
"glfw": [
84
] ]
} }
}, },
...@@ -821,7 +971,10 @@ ...@@ -821,7 +971,10 @@
"U" "U"
], ],
"english": "Key U", "english": "Key U",
"chromium": "usU" "chromium": "usU",
"glfw": [
"U"
]
}, },
"scanCodes": { "scanCodes": {
"android": [ "android": [
...@@ -836,6 +989,9 @@ ...@@ -836,6 +989,9 @@
"keyCodes": { "keyCodes": {
"android": [ "android": [
49 49
],
"glfw": [
85
] ]
} }
}, },
...@@ -846,7 +1002,10 @@ ...@@ -846,7 +1002,10 @@
"V" "V"
], ],
"english": "Key V", "english": "Key V",
"chromium": "usV" "chromium": "usV",
"glfw": [
"V"
]
}, },
"scanCodes": { "scanCodes": {
"android": [ "android": [
...@@ -861,6 +1020,9 @@ ...@@ -861,6 +1020,9 @@
"keyCodes": { "keyCodes": {
"android": [ "android": [
50 50
],
"glfw": [
86
] ]
} }
}, },
...@@ -871,7 +1033,10 @@ ...@@ -871,7 +1033,10 @@
"W" "W"
], ],
"english": "Key W", "english": "Key W",
"chromium": "usW" "chromium": "usW",
"glfw": [
"W"
]
}, },
"scanCodes": { "scanCodes": {
"android": [ "android": [
...@@ -886,6 +1051,9 @@ ...@@ -886,6 +1051,9 @@
"keyCodes": { "keyCodes": {
"android": [ "android": [
51 51
],
"glfw": [
87
] ]
} }
}, },
...@@ -896,7 +1064,10 @@ ...@@ -896,7 +1064,10 @@
"X" "X"
], ],
"english": "Key X", "english": "Key X",
"chromium": "usX" "chromium": "usX",
"glfw": [
"X"
]
}, },
"scanCodes": { "scanCodes": {
"android": [ "android": [
...@@ -911,6 +1082,9 @@ ...@@ -911,6 +1082,9 @@
"keyCodes": { "keyCodes": {
"android": [ "android": [
52 52
],
"glfw": [
88
] ]
} }
}, },
...@@ -921,7 +1095,10 @@ ...@@ -921,7 +1095,10 @@
"Y" "Y"
], ],
"english": "Key Y", "english": "Key Y",
"chromium": "usY" "chromium": "usY",
"glfw": [
"Y"
]
}, },
"scanCodes": { "scanCodes": {
"android": [ "android": [
...@@ -936,6 +1113,9 @@ ...@@ -936,6 +1113,9 @@
"keyCodes": { "keyCodes": {
"android": [ "android": [
53 53
],
"glfw": [
89
] ]
} }
}, },
...@@ -946,7 +1126,10 @@ ...@@ -946,7 +1126,10 @@
"Z" "Z"
], ],
"english": "Key Z", "english": "Key Z",
"chromium": "usZ" "chromium": "usZ",
"glfw": [
"Z"
]
}, },
"scanCodes": { "scanCodes": {
"android": [ "android": [
...@@ -961,6 +1144,9 @@ ...@@ -961,6 +1144,9 @@
"keyCodes": { "keyCodes": {
"android": [ "android": [
54 54
],
"glfw": [
90
] ]
} }
}, },
...@@ -971,7 +1157,10 @@ ...@@ -971,7 +1157,10 @@
"1" "1"
], ],
"english": "Digit 1", "english": "Digit 1",
"chromium": "digit1" "chromium": "digit1",
"glfw": [
"1"
]
}, },
"scanCodes": { "scanCodes": {
"android": [ "android": [
...@@ -986,6 +1175,9 @@ ...@@ -986,6 +1175,9 @@
"keyCodes": { "keyCodes": {
"android": [ "android": [
8 8
],
"glfw": [
49
] ]
} }
}, },
...@@ -996,7 +1188,10 @@ ...@@ -996,7 +1188,10 @@
"2" "2"
], ],
"english": "Digit 2", "english": "Digit 2",
"chromium": "digit2" "chromium": "digit2",
"glfw": [
"2"
]
}, },
"scanCodes": { "scanCodes": {
"android": [ "android": [
...@@ -1011,6 +1206,9 @@ ...@@ -1011,6 +1206,9 @@
"keyCodes": { "keyCodes": {
"android": [ "android": [
9 9
],
"glfw": [
50
] ]
} }
}, },
...@@ -1021,7 +1219,10 @@ ...@@ -1021,7 +1219,10 @@
"3" "3"
], ],
"english": "Digit 3", "english": "Digit 3",
"chromium": "digit3" "chromium": "digit3",
"glfw": [
"3"
]
}, },
"scanCodes": { "scanCodes": {
"android": [ "android": [
...@@ -1036,6 +1237,9 @@ ...@@ -1036,6 +1237,9 @@
"keyCodes": { "keyCodes": {
"android": [ "android": [
10 10
],
"glfw": [
51
] ]
} }
}, },
...@@ -1046,7 +1250,10 @@ ...@@ -1046,7 +1250,10 @@
"4" "4"
], ],
"english": "Digit 4", "english": "Digit 4",
"chromium": "digit4" "chromium": "digit4",
"glfw": [
"4"
]
}, },
"scanCodes": { "scanCodes": {
"android": [ "android": [
...@@ -1061,6 +1268,9 @@ ...@@ -1061,6 +1268,9 @@
"keyCodes": { "keyCodes": {
"android": [ "android": [
11 11
],
"glfw": [
52
] ]
} }
}, },
...@@ -1071,7 +1281,10 @@ ...@@ -1071,7 +1281,10 @@
"5" "5"
], ],
"english": "Digit 5", "english": "Digit 5",
"chromium": "digit5" "chromium": "digit5",
"glfw": [
"5"
]
}, },
"scanCodes": { "scanCodes": {
"android": [ "android": [
...@@ -1086,6 +1299,9 @@ ...@@ -1086,6 +1299,9 @@
"keyCodes": { "keyCodes": {
"android": [ "android": [
12 12
],
"glfw": [
53
] ]
} }
}, },
...@@ -1096,7 +1312,10 @@ ...@@ -1096,7 +1312,10 @@
"6" "6"
], ],
"english": "Digit 6", "english": "Digit 6",
"chromium": "digit6" "chromium": "digit6",
"glfw": [
"6"
]
}, },
"scanCodes": { "scanCodes": {
"android": [ "android": [
...@@ -1111,6 +1330,9 @@ ...@@ -1111,6 +1330,9 @@
"keyCodes": { "keyCodes": {
"android": [ "android": [
13 13
],
"glfw": [
54
] ]
} }
}, },
...@@ -1121,7 +1343,10 @@ ...@@ -1121,7 +1343,10 @@
"7" "7"
], ],
"english": "Digit 7", "english": "Digit 7",
"chromium": "digit7" "chromium": "digit7",
"glfw": [
"7"
]
}, },
"scanCodes": { "scanCodes": {
"android": [ "android": [
...@@ -1136,6 +1361,9 @@ ...@@ -1136,6 +1361,9 @@
"keyCodes": { "keyCodes": {
"android": [ "android": [
14 14
],
"glfw": [
55
] ]
} }
}, },
...@@ -1146,7 +1374,10 @@ ...@@ -1146,7 +1374,10 @@
"8" "8"
], ],
"english": "Digit 8", "english": "Digit 8",
"chromium": "digit8" "chromium": "digit8",
"glfw": [
"8"
]
}, },
"scanCodes": { "scanCodes": {
"android": [ "android": [
...@@ -1161,6 +1392,9 @@ ...@@ -1161,6 +1392,9 @@
"keyCodes": { "keyCodes": {
"android": [ "android": [
15 15
],
"glfw": [
56
] ]
} }
}, },
...@@ -1171,7 +1405,10 @@ ...@@ -1171,7 +1405,10 @@
"9" "9"
], ],
"english": "Digit 9", "english": "Digit 9",
"chromium": "digit9" "chromium": "digit9",
"glfw": [
"9"
]
}, },
"scanCodes": { "scanCodes": {
"android": [ "android": [
...@@ -1186,6 +1423,9 @@ ...@@ -1186,6 +1423,9 @@
"keyCodes": { "keyCodes": {
"android": [ "android": [
16 16
],
"glfw": [
57
] ]
} }
}, },
...@@ -1196,7 +1436,10 @@ ...@@ -1196,7 +1436,10 @@
"0" "0"
], ],
"english": "Digit 0", "english": "Digit 0",
"chromium": "digit0" "chromium": "digit0",
"glfw": [
"0"
]
}, },
"scanCodes": { "scanCodes": {
"android": [ "android": [
...@@ -1211,6 +1454,9 @@ ...@@ -1211,6 +1454,9 @@
"keyCodes": { "keyCodes": {
"android": [ "android": [
7 7
],
"glfw": [
48
] ]
} }
}, },
...@@ -1221,7 +1467,10 @@ ...@@ -1221,7 +1467,10 @@
"ENTER" "ENTER"
], ],
"english": "Enter", "english": "Enter",
"chromium": "enter" "chromium": "enter",
"glfw": [
"ENTER"
]
}, },
"scanCodes": { "scanCodes": {
"android": [ "android": [
...@@ -1236,6 +1485,9 @@ ...@@ -1236,6 +1485,9 @@
"keyCodes": { "keyCodes": {
"android": [ "android": [
66 66
],
"glfw": [
257
] ]
} }
}, },
...@@ -1246,7 +1498,10 @@ ...@@ -1246,7 +1498,10 @@
"ESCAPE" "ESCAPE"
], ],
"english": "Escape", "english": "Escape",
"chromium": "escape" "chromium": "escape",
"glfw": [
"ESCAPE"
]
}, },
"scanCodes": { "scanCodes": {
"android": [ "android": [
...@@ -1261,6 +1516,9 @@ ...@@ -1261,6 +1516,9 @@
"keyCodes": { "keyCodes": {
"android": [ "android": [
111 111
],
"glfw": [
256
] ]
} }
}, },
...@@ -1271,7 +1529,10 @@ ...@@ -1271,7 +1529,10 @@
"DEL" "DEL"
], ],
"english": "Backspace", "english": "Backspace",
"chromium": "backspace" "chromium": "backspace",
"glfw": [
"BACKSPACE"
]
}, },
"scanCodes": { "scanCodes": {
"android": [ "android": [
...@@ -1286,6 +1547,9 @@ ...@@ -1286,6 +1547,9 @@
"keyCodes": { "keyCodes": {
"android": [ "android": [
67 67
],
"glfw": [
259
] ]
} }
}, },
...@@ -1296,7 +1560,10 @@ ...@@ -1296,7 +1560,10 @@
"TAB" "TAB"
], ],
"english": "Tab", "english": "Tab",
"chromium": "tab" "chromium": "tab",
"glfw": [
"TAB"
]
}, },
"scanCodes": { "scanCodes": {
"android": [ "android": [
...@@ -1311,6 +1578,9 @@ ...@@ -1311,6 +1578,9 @@
"keyCodes": { "keyCodes": {
"android": [ "android": [
61 61
],
"glfw": [
258
] ]
} }
}, },
...@@ -1321,7 +1591,10 @@ ...@@ -1321,7 +1591,10 @@
"SPACE" "SPACE"
], ],
"english": "Space", "english": "Space",
"chromium": "space" "chromium": "space",
"glfw": [
"SPACE"
]
}, },
"scanCodes": { "scanCodes": {
"android": [ "android": [
...@@ -1336,6 +1609,9 @@ ...@@ -1336,6 +1609,9 @@
"keyCodes": { "keyCodes": {
"android": [ "android": [
62 62
],
"glfw": [
32
] ]
} }
}, },
...@@ -1346,7 +1622,10 @@ ...@@ -1346,7 +1622,10 @@
"MINUS" "MINUS"
], ],
"english": "Minus", "english": "Minus",
"chromium": "minus" "chromium": "minus",
"glfw": [
"MINUS"
]
}, },
"scanCodes": { "scanCodes": {
"android": [ "android": [
...@@ -1361,6 +1640,9 @@ ...@@ -1361,6 +1640,9 @@
"keyCodes": { "keyCodes": {
"android": [ "android": [
69 69
],
"glfw": [
45
] ]
} }
}, },
...@@ -1371,7 +1653,10 @@ ...@@ -1371,7 +1653,10 @@
"EQUALS" "EQUALS"
], ],
"english": "Equal", "english": "Equal",
"chromium": "equal" "chromium": "equal",
"glfw": [
"EQUAL"
]
}, },
"scanCodes": { "scanCodes": {
"android": [ "android": [
...@@ -1386,6 +1671,9 @@ ...@@ -1386,6 +1671,9 @@
"keyCodes": { "keyCodes": {
"android": [ "android": [
70 70
],
"glfw": [
61
] ]
} }
}, },
...@@ -1396,7 +1684,10 @@ ...@@ -1396,7 +1684,10 @@
"LEFT_BRACKET" "LEFT_BRACKET"
], ],
"english": "Bracket Left", "english": "Bracket Left",
"chromium": "bracketLeft" "chromium": "bracketLeft",
"glfw": [
"LEFT_BRACKET"
]
}, },
"scanCodes": { "scanCodes": {
"android": [ "android": [
...@@ -1411,6 +1702,9 @@ ...@@ -1411,6 +1702,9 @@
"keyCodes": { "keyCodes": {
"android": [ "android": [
71 71
],
"glfw": [
91
] ]
} }
}, },
...@@ -1421,7 +1715,10 @@ ...@@ -1421,7 +1715,10 @@
"RIGHT_BRACKET" "RIGHT_BRACKET"
], ],
"english": "Bracket Right", "english": "Bracket Right",
"chromium": "bracketRight" "chromium": "bracketRight",
"glfw": [
"RIGHT_BRACKET"
]
}, },
"scanCodes": { "scanCodes": {
"android": [ "android": [
...@@ -1436,6 +1733,9 @@ ...@@ -1436,6 +1733,9 @@
"keyCodes": { "keyCodes": {
"android": [ "android": [
72 72
],
"glfw": [
93
] ]
} }
}, },
...@@ -1446,7 +1746,10 @@ ...@@ -1446,7 +1746,10 @@
"BACKSLASH" "BACKSLASH"
], ],
"english": "Backslash", "english": "Backslash",
"chromium": "backslash" "chromium": "backslash",
"glfw": [
"BACKSLASH"
]
}, },
"scanCodes": { "scanCodes": {
"android": [ "android": [
...@@ -1462,6 +1765,9 @@ ...@@ -1462,6 +1765,9 @@
"keyCodes": { "keyCodes": {
"android": [ "android": [
73 73
],
"glfw": [
92
] ]
} }
}, },
...@@ -1472,7 +1778,10 @@ ...@@ -1472,7 +1778,10 @@
"SEMICOLON" "SEMICOLON"
], ],
"english": "Semicolon", "english": "Semicolon",
"chromium": "semicolon" "chromium": "semicolon",
"glfw": [
"SEMICOLON"
]
}, },
"scanCodes": { "scanCodes": {
"android": [ "android": [
...@@ -1487,6 +1796,9 @@ ...@@ -1487,6 +1796,9 @@
"keyCodes": { "keyCodes": {
"android": [ "android": [
74 74
],
"glfw": [
59
] ]
} }
}, },
...@@ -1497,7 +1809,10 @@ ...@@ -1497,7 +1809,10 @@
"APOSTROPHE" "APOSTROPHE"
], ],
"english": "Quote", "english": "Quote",
"chromium": "quote" "chromium": "quote",
"glfw": [
"APOSTROPHE"
]
}, },
"scanCodes": { "scanCodes": {
"android": [ "android": [
...@@ -1512,6 +1827,9 @@ ...@@ -1512,6 +1827,9 @@
"keyCodes": { "keyCodes": {
"android": [ "android": [
75 75
],
"glfw": [
39
] ]
} }
}, },
...@@ -1522,7 +1840,10 @@ ...@@ -1522,7 +1840,10 @@
"GRAVE" "GRAVE"
], ],
"english": "Backquote", "english": "Backquote",
"chromium": "backquote" "chromium": "backquote",
"glfw": [
"GRAVE_ACCENT"
]
}, },
"scanCodes": { "scanCodes": {
"android": [ "android": [
...@@ -1537,6 +1858,9 @@ ...@@ -1537,6 +1858,9 @@
"keyCodes": { "keyCodes": {
"android": [ "android": [
68 68
],
"glfw": [
96
] ]
} }
}, },
...@@ -1547,7 +1871,10 @@ ...@@ -1547,7 +1871,10 @@
"COMMA" "COMMA"
], ],
"english": "Comma", "english": "Comma",
"chromium": "comma" "chromium": "comma",
"glfw": [
"COMMA"
]
}, },
"scanCodes": { "scanCodes": {
"android": [ "android": [
...@@ -1562,6 +1889,9 @@ ...@@ -1562,6 +1889,9 @@
"keyCodes": { "keyCodes": {
"android": [ "android": [
55 55
],
"glfw": [
44
] ]
} }
}, },
...@@ -1572,7 +1902,10 @@ ...@@ -1572,7 +1902,10 @@
"PERIOD" "PERIOD"
], ],
"english": "Period", "english": "Period",
"chromium": "period" "chromium": "period",
"glfw": [
"PERIOD"
]
}, },
"scanCodes": { "scanCodes": {
"android": [ "android": [
...@@ -1587,6 +1920,9 @@ ...@@ -1587,6 +1920,9 @@
"keyCodes": { "keyCodes": {
"android": [ "android": [
56 56
],
"glfw": [
46
] ]
} }
}, },
...@@ -1597,7 +1933,10 @@ ...@@ -1597,7 +1933,10 @@
"SLASH" "SLASH"
], ],
"english": "Slash", "english": "Slash",
"chromium": "slash" "chromium": "slash",
"glfw": [
"SLASH"
]
}, },
"scanCodes": { "scanCodes": {
"android": [ "android": [
...@@ -1612,6 +1951,9 @@ ...@@ -1612,6 +1951,9 @@
"keyCodes": { "keyCodes": {
"android": [ "android": [
76 76
],
"glfw": [
47
] ]
} }
}, },
...@@ -1622,7 +1964,10 @@ ...@@ -1622,7 +1964,10 @@
"CAPS_LOCK" "CAPS_LOCK"
], ],
"english": "Caps Lock", "english": "Caps Lock",
"chromium": "capsLock" "chromium": "capsLock",
"glfw": [
"CAPS_LOCK"
]
}, },
"scanCodes": { "scanCodes": {
"android": [ "android": [
...@@ -1637,6 +1982,9 @@ ...@@ -1637,6 +1982,9 @@
"keyCodes": { "keyCodes": {
"android": [ "android": [
115 115
],
"glfw": [
280
] ]
} }
}, },
...@@ -1647,7 +1995,10 @@ ...@@ -1647,7 +1995,10 @@
"F1" "F1"
], ],
"english": "F1", "english": "F1",
"chromium": "f1" "chromium": "f1",
"glfw": [
"F1"
]
}, },
"scanCodes": { "scanCodes": {
"android": [ "android": [
...@@ -1662,6 +2013,9 @@ ...@@ -1662,6 +2013,9 @@
"keyCodes": { "keyCodes": {
"android": [ "android": [
131 131
],
"glfw": [
290
] ]
} }
}, },
...@@ -1672,7 +2026,10 @@ ...@@ -1672,7 +2026,10 @@
"F2" "F2"
], ],
"english": "F2", "english": "F2",
"chromium": "f2" "chromium": "f2",
"glfw": [
"F2"
]
}, },
"scanCodes": { "scanCodes": {
"android": [ "android": [
...@@ -1687,6 +2044,9 @@ ...@@ -1687,6 +2044,9 @@
"keyCodes": { "keyCodes": {
"android": [ "android": [
132 132
],
"glfw": [
291
] ]
} }
}, },
...@@ -1697,7 +2057,10 @@ ...@@ -1697,7 +2057,10 @@
"F3" "F3"
], ],
"english": "F3", "english": "F3",
"chromium": "f3" "chromium": "f3",
"glfw": [
"F3"
]
}, },
"scanCodes": { "scanCodes": {
"android": [ "android": [
...@@ -1712,6 +2075,9 @@ ...@@ -1712,6 +2075,9 @@
"keyCodes": { "keyCodes": {
"android": [ "android": [
133 133
],
"glfw": [
292
] ]
} }
}, },
...@@ -1722,7 +2088,10 @@ ...@@ -1722,7 +2088,10 @@
"F4" "F4"
], ],
"english": "F4", "english": "F4",
"chromium": "f4" "chromium": "f4",
"glfw": [
"F4"
]
}, },
"scanCodes": { "scanCodes": {
"android": [ "android": [
...@@ -1737,6 +2106,9 @@ ...@@ -1737,6 +2106,9 @@
"keyCodes": { "keyCodes": {
"android": [ "android": [
134 134
],
"glfw": [
293
] ]
} }
}, },
...@@ -1747,7 +2119,10 @@ ...@@ -1747,7 +2119,10 @@
"F5" "F5"
], ],
"english": "F5", "english": "F5",
"chromium": "f5" "chromium": "f5",
"glfw": [
"F5"
]
}, },
"scanCodes": { "scanCodes": {
"android": [ "android": [
...@@ -1762,6 +2137,9 @@ ...@@ -1762,6 +2137,9 @@
"keyCodes": { "keyCodes": {
"android": [ "android": [
135 135
],
"glfw": [
294
] ]
} }
}, },
...@@ -1772,7 +2150,10 @@ ...@@ -1772,7 +2150,10 @@
"F6" "F6"
], ],
"english": "F6", "english": "F6",
"chromium": "f6" "chromium": "f6",
"glfw": [
"F6"
]
}, },
"scanCodes": { "scanCodes": {
"android": [ "android": [
...@@ -1787,6 +2168,9 @@ ...@@ -1787,6 +2168,9 @@
"keyCodes": { "keyCodes": {
"android": [ "android": [
136 136
],
"glfw": [
295
] ]
} }
}, },
...@@ -1797,7 +2181,10 @@ ...@@ -1797,7 +2181,10 @@
"F7" "F7"
], ],
"english": "F7", "english": "F7",
"chromium": "f7" "chromium": "f7",
"glfw": [
"F7"
]
}, },
"scanCodes": { "scanCodes": {
"android": [ "android": [
...@@ -1812,6 +2199,9 @@ ...@@ -1812,6 +2199,9 @@
"keyCodes": { "keyCodes": {
"android": [ "android": [
137 137
],
"glfw": [
296
] ]
} }
}, },
...@@ -1822,7 +2212,10 @@ ...@@ -1822,7 +2212,10 @@
"F8" "F8"
], ],
"english": "F8", "english": "F8",
"chromium": "f8" "chromium": "f8",
"glfw": [
"F8"
]
}, },
"scanCodes": { "scanCodes": {
"android": [ "android": [
...@@ -1837,6 +2230,9 @@ ...@@ -1837,6 +2230,9 @@
"keyCodes": { "keyCodes": {
"android": [ "android": [
138 138
],
"glfw": [
297
] ]
} }
}, },
...@@ -1847,7 +2243,10 @@ ...@@ -1847,7 +2243,10 @@
"F9" "F9"
], ],
"english": "F9", "english": "F9",
"chromium": "f9" "chromium": "f9",
"glfw": [
"F9"
]
}, },
"scanCodes": { "scanCodes": {
"android": [ "android": [
...@@ -1862,6 +2261,9 @@ ...@@ -1862,6 +2261,9 @@
"keyCodes": { "keyCodes": {
"android": [ "android": [
139 139
],
"glfw": [
298
] ]
} }
}, },
...@@ -1872,7 +2274,10 @@ ...@@ -1872,7 +2274,10 @@
"F10" "F10"
], ],
"english": "F10", "english": "F10",
"chromium": "f10" "chromium": "f10",
"glfw": [
"F10"
]
}, },
"scanCodes": { "scanCodes": {
"android": [ "android": [
...@@ -1887,6 +2292,9 @@ ...@@ -1887,6 +2292,9 @@
"keyCodes": { "keyCodes": {
"android": [ "android": [
140 140
],
"glfw": [
299
] ]
} }
}, },
...@@ -1897,7 +2305,10 @@ ...@@ -1897,7 +2305,10 @@
"F11" "F11"
], ],
"english": "F11", "english": "F11",
"chromium": "f11" "chromium": "f11",
"glfw": [
"F11"
]
}, },
"scanCodes": { "scanCodes": {
"android": [ "android": [
...@@ -1912,6 +2323,9 @@ ...@@ -1912,6 +2323,9 @@
"keyCodes": { "keyCodes": {
"android": [ "android": [
141 141
],
"glfw": [
300
] ]
} }
}, },
...@@ -1922,7 +2336,10 @@ ...@@ -1922,7 +2336,10 @@
"F12" "F12"
], ],
"english": "F12", "english": "F12",
"chromium": "f12" "chromium": "f12",
"glfw": [
"F12"
]
}, },
"scanCodes": { "scanCodes": {
"android": [ "android": [
...@@ -1937,6 +2354,9 @@ ...@@ -1937,6 +2354,9 @@
"keyCodes": { "keyCodes": {
"android": [ "android": [
142 142
],
"glfw": [
301
] ]
} }
}, },
...@@ -1947,7 +2367,10 @@ ...@@ -1947,7 +2367,10 @@
"SYSRQ" "SYSRQ"
], ],
"english": "Print Screen", "english": "Print Screen",
"chromium": "printScreen" "chromium": "printScreen",
"glfw": [
"PRINT_SCREEN"
]
}, },
"scanCodes": { "scanCodes": {
"android": [ "android": [
...@@ -1962,6 +2385,9 @@ ...@@ -1962,6 +2385,9 @@
"keyCodes": { "keyCodes": {
"android": [ "android": [
120 120
],
"glfw": [
283
] ]
} }
}, },
...@@ -1972,7 +2398,8 @@ ...@@ -1972,7 +2398,8 @@
"SCROLL_LOCK" "SCROLL_LOCK"
], ],
"english": "Scroll Lock", "english": "Scroll Lock",
"chromium": "scrollLock" "chromium": "scrollLock",
"glfw": null
}, },
"scanCodes": { "scanCodes": {
"android": [ "android": [
...@@ -1987,7 +2414,8 @@ ...@@ -1987,7 +2414,8 @@
"keyCodes": { "keyCodes": {
"android": [ "android": [
116 116
] ],
"glfw": null
} }
}, },
"pause": { "pause": {
...@@ -1997,7 +2425,10 @@ ...@@ -1997,7 +2425,10 @@
"BREAK" "BREAK"
], ],
"english": "Pause", "english": "Pause",
"chromium": "pause" "chromium": "pause",
"glfw": [
"PAUSE"
]
}, },
"scanCodes": { "scanCodes": {
"android": [ "android": [
...@@ -2013,6 +2444,9 @@ ...@@ -2013,6 +2444,9 @@
"keyCodes": { "keyCodes": {
"android": [ "android": [
121 121
],
"glfw": [
284
] ]
} }
}, },
...@@ -2023,7 +2457,10 @@ ...@@ -2023,7 +2457,10 @@
"INSERT" "INSERT"
], ],
"english": "Insert", "english": "Insert",
"chromium": "insert" "chromium": "insert",
"glfw": [
"INSERT"
]
}, },
"scanCodes": { "scanCodes": {
"android": [ "android": [
...@@ -2038,6 +2475,9 @@ ...@@ -2038,6 +2475,9 @@
"keyCodes": { "keyCodes": {
"android": [ "android": [
124 124
],
"glfw": [
260
] ]
} }
}, },
...@@ -2048,7 +2488,10 @@ ...@@ -2048,7 +2488,10 @@
"MOVE_HOME" "MOVE_HOME"
], ],
"english": "Home", "english": "Home",
"chromium": "home" "chromium": "home",
"glfw": [
"HOME"
]
}, },
"scanCodes": { "scanCodes": {
"android": [ "android": [
...@@ -2063,6 +2506,9 @@ ...@@ -2063,6 +2506,9 @@
"keyCodes": { "keyCodes": {
"android": [ "android": [
122 122
],
"glfw": [
268
] ]
} }
}, },
...@@ -2073,7 +2519,10 @@ ...@@ -2073,7 +2519,10 @@
"PAGE_UP" "PAGE_UP"
], ],
"english": "Page Up", "english": "Page Up",
"chromium": "pageUp" "chromium": "pageUp",
"glfw": [
"PAGE_UP"
]
}, },
"scanCodes": { "scanCodes": {
"android": [ "android": [
...@@ -2089,6 +2538,9 @@ ...@@ -2089,6 +2538,9 @@
"keyCodes": { "keyCodes": {
"android": [ "android": [
92 92
],
"glfw": [
266
] ]
} }
}, },
...@@ -2099,7 +2551,10 @@ ...@@ -2099,7 +2551,10 @@
"FORWARD_DEL" "FORWARD_DEL"
], ],
"english": "Delete", "english": "Delete",
"chromium": "del" "chromium": "del",
"glfw": [
"DELETE"
]
}, },
"scanCodes": { "scanCodes": {
"android": [ "android": [
...@@ -2114,6 +2569,9 @@ ...@@ -2114,6 +2569,9 @@
"keyCodes": { "keyCodes": {
"android": [ "android": [
112 112
],
"glfw": [
261
] ]
} }
}, },
...@@ -2124,7 +2582,10 @@ ...@@ -2124,7 +2582,10 @@
"MOVE_END" "MOVE_END"
], ],
"english": "End", "english": "End",
"chromium": "end" "chromium": "end",
"glfw": [
"END"
]
}, },
"scanCodes": { "scanCodes": {
"android": [ "android": [
...@@ -2139,6 +2600,9 @@ ...@@ -2139,6 +2600,9 @@
"keyCodes": { "keyCodes": {
"android": [ "android": [
123 123
],
"glfw": [
269
] ]
} }
}, },
...@@ -2149,7 +2613,10 @@ ...@@ -2149,7 +2613,10 @@
"PAGE_DOWN" "PAGE_DOWN"
], ],
"english": "Page Down", "english": "Page Down",
"chromium": "pageDown" "chromium": "pageDown",
"glfw": [
"PAGE_DOWN"
]
}, },
"scanCodes": { "scanCodes": {
"android": [ "android": [
...@@ -2165,6 +2632,9 @@ ...@@ -2165,6 +2632,9 @@
"keyCodes": { "keyCodes": {
"android": [ "android": [
93 93
],
"glfw": [
267
] ]
} }
}, },
...@@ -2175,7 +2645,10 @@ ...@@ -2175,7 +2645,10 @@
"DPAD_RIGHT" "DPAD_RIGHT"
], ],
"english": "Arrow Right", "english": "Arrow Right",
"chromium": "arrowRight" "chromium": "arrowRight",
"glfw": [
"RIGHT"
]
}, },
"scanCodes": { "scanCodes": {
"android": [ "android": [
...@@ -2190,6 +2663,9 @@ ...@@ -2190,6 +2663,9 @@
"keyCodes": { "keyCodes": {
"android": [ "android": [
22 22
],
"glfw": [
262
] ]
} }
}, },
...@@ -2200,7 +2676,10 @@ ...@@ -2200,7 +2676,10 @@
"DPAD_LEFT" "DPAD_LEFT"
], ],
"english": "Arrow Left", "english": "Arrow Left",
"chromium": "arrowLeft" "chromium": "arrowLeft",
"glfw": [
"LEFT"
]
}, },
"scanCodes": { "scanCodes": {
"android": [ "android": [
...@@ -2215,6 +2694,9 @@ ...@@ -2215,6 +2694,9 @@
"keyCodes": { "keyCodes": {
"android": [ "android": [
21 21
],
"glfw": [
263
] ]
} }
}, },
...@@ -2225,7 +2707,10 @@ ...@@ -2225,7 +2707,10 @@
"DPAD_DOWN" "DPAD_DOWN"
], ],
"english": "Arrow Down", "english": "Arrow Down",
"chromium": "arrowDown" "chromium": "arrowDown",
"glfw": [
"DOWN"
]
}, },
"scanCodes": { "scanCodes": {
"android": [ "android": [
...@@ -2240,6 +2725,9 @@ ...@@ -2240,6 +2725,9 @@
"keyCodes": { "keyCodes": {
"android": [ "android": [
20 20
],
"glfw": [
264
] ]
} }
}, },
...@@ -2250,7 +2738,10 @@ ...@@ -2250,7 +2738,10 @@
"DPAD_UP" "DPAD_UP"
], ],
"english": "Arrow Up", "english": "Arrow Up",
"chromium": "arrowUp" "chromium": "arrowUp",
"glfw": [
"UP"
]
}, },
"scanCodes": { "scanCodes": {
"android": [ "android": [
...@@ -2265,6 +2756,9 @@ ...@@ -2265,6 +2756,9 @@
"keyCodes": { "keyCodes": {
"android": [ "android": [
19 19
],
"glfw": [
265
] ]
} }
}, },
...@@ -2275,7 +2769,10 @@ ...@@ -2275,7 +2769,10 @@
"NUM_LOCK" "NUM_LOCK"
], ],
"english": "Num Lock", "english": "Num Lock",
"chromium": "numLock" "chromium": "numLock",
"glfw": [
"NUM_LOCK"
]
}, },
"scanCodes": { "scanCodes": {
"android": [ "android": [
...@@ -2290,6 +2787,9 @@ ...@@ -2290,6 +2787,9 @@
"keyCodes": { "keyCodes": {
"android": [ "android": [
143 143
],
"glfw": [
282
] ]
} }
}, },
...@@ -2300,7 +2800,10 @@ ...@@ -2300,7 +2800,10 @@
"NUMPAD_DIVIDE" "NUMPAD_DIVIDE"
], ],
"english": "Numpad Divide", "english": "Numpad Divide",
"chromium": "numpadDivide" "chromium": "numpadDivide",
"glfw": [
"KP_DIVIDE"
]
}, },
"scanCodes": { "scanCodes": {
"android": [ "android": [
...@@ -2315,6 +2818,9 @@ ...@@ -2315,6 +2818,9 @@
"keyCodes": { "keyCodes": {
"android": [ "android": [
154 154
],
"glfw": [
331
] ]
} }
}, },
...@@ -2325,7 +2831,10 @@ ...@@ -2325,7 +2831,10 @@
"NUMPAD_MULTIPLY" "NUMPAD_MULTIPLY"
], ],
"english": "Numpad Multiply", "english": "Numpad Multiply",
"chromium": "numpadMultiply" "chromium": "numpadMultiply",
"glfw": [
"KP_MULTIPLY"
]
}, },
"scanCodes": { "scanCodes": {
"android": [ "android": [
...@@ -2340,6 +2849,9 @@ ...@@ -2340,6 +2849,9 @@
"keyCodes": { "keyCodes": {
"android": [ "android": [
155 155
],
"glfw": [
332
] ]
} }
}, },
...@@ -2350,7 +2862,10 @@ ...@@ -2350,7 +2862,10 @@
"NUMPAD_SUBTRACT" "NUMPAD_SUBTRACT"
], ],
"english": "Numpad Subtract", "english": "Numpad Subtract",
"chromium": "numpadSubtract" "chromium": "numpadSubtract",
"glfw": [
"NUMPAD_SUBTRACT"
]
}, },
"scanCodes": { "scanCodes": {
"android": [ "android": [
...@@ -2365,7 +2880,8 @@ ...@@ -2365,7 +2880,8 @@
"keyCodes": { "keyCodes": {
"android": [ "android": [
156 156
] ],
"glfw": null
} }
}, },
"numpadAdd": { "numpadAdd": {
...@@ -2375,7 +2891,10 @@ ...@@ -2375,7 +2891,10 @@
"NUMPAD_ADD" "NUMPAD_ADD"
], ],
"english": "Numpad Add", "english": "Numpad Add",
"chromium": "numpadAdd" "chromium": "numpadAdd",
"glfw": [
"KP_ADD"
]
}, },
"scanCodes": { "scanCodes": {
"android": [ "android": [
...@@ -2390,6 +2909,9 @@ ...@@ -2390,6 +2909,9 @@
"keyCodes": { "keyCodes": {
"android": [ "android": [
157 157
],
"glfw": [
334
] ]
} }
}, },
...@@ -2400,7 +2922,10 @@ ...@@ -2400,7 +2922,10 @@
"NUMPAD_ENTER" "NUMPAD_ENTER"
], ],
"english": "Numpad Enter", "english": "Numpad Enter",
"chromium": "numpadEnter" "chromium": "numpadEnter",
"glfw": [
"KP_ENTER"
]
}, },
"scanCodes": { "scanCodes": {
"android": [ "android": [
...@@ -2415,6 +2940,9 @@ ...@@ -2415,6 +2940,9 @@
"keyCodes": { "keyCodes": {
"android": [ "android": [
160 160
],
"glfw": [
335
] ]
} }
}, },
...@@ -2425,7 +2953,10 @@ ...@@ -2425,7 +2953,10 @@
"NUMPAD_1" "NUMPAD_1"
], ],
"english": "Numpad 1", "english": "Numpad 1",
"chromium": "numpad1" "chromium": "numpad1",
"glfw": [
"KP_1"
]
}, },
"scanCodes": { "scanCodes": {
"android": [ "android": [
...@@ -2440,6 +2971,9 @@ ...@@ -2440,6 +2971,9 @@
"keyCodes": { "keyCodes": {
"android": [ "android": [
145 145
],
"glfw": [
321
] ]
} }
}, },
...@@ -2450,7 +2984,10 @@ ...@@ -2450,7 +2984,10 @@
"NUMPAD_2" "NUMPAD_2"
], ],
"english": "Numpad 2", "english": "Numpad 2",
"chromium": "numpad2" "chromium": "numpad2",
"glfw": [
"KP_2"
]
}, },
"scanCodes": { "scanCodes": {
"android": [ "android": [
...@@ -2465,6 +3002,9 @@ ...@@ -2465,6 +3002,9 @@
"keyCodes": { "keyCodes": {
"android": [ "android": [
146 146
],
"glfw": [
322
] ]
} }
}, },
...@@ -2475,7 +3015,10 @@ ...@@ -2475,7 +3015,10 @@
"NUMPAD_3" "NUMPAD_3"
], ],
"english": "Numpad 3", "english": "Numpad 3",
"chromium": "numpad3" "chromium": "numpad3",
"glfw": [
"KP_3"
]
}, },
"scanCodes": { "scanCodes": {
"android": [ "android": [
...@@ -2490,6 +3033,9 @@ ...@@ -2490,6 +3033,9 @@
"keyCodes": { "keyCodes": {
"android": [ "android": [
147 147
],
"glfw": [
323
] ]
} }
}, },
...@@ -2500,7 +3046,10 @@ ...@@ -2500,7 +3046,10 @@
"NUMPAD_4" "NUMPAD_4"
], ],
"english": "Numpad 4", "english": "Numpad 4",
"chromium": "numpad4" "chromium": "numpad4",
"glfw": [
"KP_4"
]
}, },
"scanCodes": { "scanCodes": {
"android": [ "android": [
...@@ -2515,6 +3064,9 @@ ...@@ -2515,6 +3064,9 @@
"keyCodes": { "keyCodes": {
"android": [ "android": [
148 148
],
"glfw": [
324
] ]
} }
}, },
...@@ -2525,7 +3077,10 @@ ...@@ -2525,7 +3077,10 @@
"NUMPAD_5" "NUMPAD_5"
], ],
"english": "Numpad 5", "english": "Numpad 5",
"chromium": "numpad5" "chromium": "numpad5",
"glfw": [
"KP_5"
]
}, },
"scanCodes": { "scanCodes": {
"android": [ "android": [
...@@ -2540,6 +3095,9 @@ ...@@ -2540,6 +3095,9 @@
"keyCodes": { "keyCodes": {
"android": [ "android": [
149 149
],
"glfw": [
325
] ]
} }
}, },
...@@ -2550,7 +3108,10 @@ ...@@ -2550,7 +3108,10 @@
"NUMPAD_6" "NUMPAD_6"
], ],
"english": "Numpad 6", "english": "Numpad 6",
"chromium": "numpad6" "chromium": "numpad6",
"glfw": [
"KP_6"
]
}, },
"scanCodes": { "scanCodes": {
"android": [ "android": [
...@@ -2565,6 +3126,9 @@ ...@@ -2565,6 +3126,9 @@
"keyCodes": { "keyCodes": {
"android": [ "android": [
150 150
],
"glfw": [
326
] ]
} }
}, },
...@@ -2575,7 +3139,10 @@ ...@@ -2575,7 +3139,10 @@
"NUMPAD_7" "NUMPAD_7"
], ],
"english": "Numpad 7", "english": "Numpad 7",
"chromium": "numpad7" "chromium": "numpad7",
"glfw": [
"KP_7"
]
}, },
"scanCodes": { "scanCodes": {
"android": [ "android": [
...@@ -2590,6 +3157,9 @@ ...@@ -2590,6 +3157,9 @@
"keyCodes": { "keyCodes": {
"android": [ "android": [
151 151
],
"glfw": [
327
] ]
} }
}, },
...@@ -2600,7 +3170,10 @@ ...@@ -2600,7 +3170,10 @@
"NUMPAD_8" "NUMPAD_8"
], ],
"english": "Numpad 8", "english": "Numpad 8",
"chromium": "numpad8" "chromium": "numpad8",
"glfw": [
"KP_8"
]
}, },
"scanCodes": { "scanCodes": {
"android": [ "android": [
...@@ -2615,6 +3188,9 @@ ...@@ -2615,6 +3188,9 @@
"keyCodes": { "keyCodes": {
"android": [ "android": [
152 152
],
"glfw": [
328
] ]
} }
}, },
...@@ -2625,7 +3201,10 @@ ...@@ -2625,7 +3201,10 @@
"NUMPAD_9" "NUMPAD_9"
], ],
"english": "Numpad 9", "english": "Numpad 9",
"chromium": "numpad9" "chromium": "numpad9",
"glfw": [
"KP_9"
]
}, },
"scanCodes": { "scanCodes": {
"android": [ "android": [
...@@ -2640,6 +3219,9 @@ ...@@ -2640,6 +3219,9 @@
"keyCodes": { "keyCodes": {
"android": [ "android": [
153 153
],
"glfw": [
329
] ]
} }
}, },
...@@ -2650,7 +3232,10 @@ ...@@ -2650,7 +3232,10 @@
"NUMPAD_0" "NUMPAD_0"
], ],
"english": "Numpad 0", "english": "Numpad 0",
"chromium": "numpad0" "chromium": "numpad0",
"glfw": [
"KP_0"
]
}, },
"scanCodes": { "scanCodes": {
"android": [ "android": [
...@@ -2665,6 +3250,9 @@ ...@@ -2665,6 +3250,9 @@
"keyCodes": { "keyCodes": {
"android": [ "android": [
144 144
],
"glfw": [
320
] ]
} }
}, },
...@@ -2675,7 +3263,10 @@ ...@@ -2675,7 +3263,10 @@
"NUMPAD_DOT" "NUMPAD_DOT"
], ],
"english": "Numpad Decimal", "english": "Numpad Decimal",
"chromium": "numpadDecimal" "chromium": "numpadDecimal",
"glfw": [
"KP_DECIMAL"
]
}, },
"scanCodes": { "scanCodes": {
"android": [ "android": [
...@@ -2690,6 +3281,9 @@ ...@@ -2690,6 +3281,9 @@
"keyCodes": { "keyCodes": {
"android": [ "android": [
158 158
],
"glfw": [
330
] ]
} }
}, },
...@@ -2698,7 +3292,8 @@ ...@@ -2698,7 +3292,8 @@
"domkey": "IntlBackslash", "domkey": "IntlBackslash",
"android": null, "android": null,
"english": "Intl Backslash", "english": "Intl Backslash",
"chromium": "intlBackslash" "chromium": "intlBackslash",
"glfw": null
}, },
"scanCodes": { "scanCodes": {
"android": null, "android": null,
...@@ -2709,7 +3304,8 @@ ...@@ -2709,7 +3304,8 @@
"macos": 10 "macos": 10
}, },
"keyCodes": { "keyCodes": {
"android": null "android": null,
"glfw": null
} }
}, },
"contextMenu": { "contextMenu": {
...@@ -2719,7 +3315,10 @@ ...@@ -2719,7 +3315,10 @@
"MENU" "MENU"
], ],
"english": "Context Menu", "english": "Context Menu",
"chromium": "contextMenu" "chromium": "contextMenu",
"glfw": [
"MENU"
]
}, },
"scanCodes": { "scanCodes": {
"android": [ "android": [
...@@ -2735,6 +3334,9 @@ ...@@ -2735,6 +3334,9 @@
"keyCodes": { "keyCodes": {
"android": [ "android": [
82 82
],
"glfw": [
348
] ]
} }
}, },
...@@ -2745,7 +3347,8 @@ ...@@ -2745,7 +3347,8 @@
"POWER" "POWER"
], ],
"english": "Power", "english": "Power",
"chromium": "power" "chromium": "power",
"glfw": null
}, },
"scanCodes": { "scanCodes": {
"android": [ "android": [
...@@ -2761,7 +3364,8 @@ ...@@ -2761,7 +3364,8 @@
"keyCodes": { "keyCodes": {
"android": [ "android": [
26 26
] ],
"glfw": null
} }
}, },
"numpadEqual": { "numpadEqual": {
...@@ -2771,7 +3375,10 @@ ...@@ -2771,7 +3375,10 @@
"NUMPAD_EQUALS" "NUMPAD_EQUALS"
], ],
"english": "Numpad Equal", "english": "Numpad Equal",
"chromium": "numpadEqual" "chromium": "numpadEqual",
"glfw": [
"KP_EQUAL"
]
}, },
"scanCodes": { "scanCodes": {
"android": [ "android": [
...@@ -2786,6 +3393,9 @@ ...@@ -2786,6 +3393,9 @@
"keyCodes": { "keyCodes": {
"android": [ "android": [
161 161
],
"glfw": [
336
] ]
} }
}, },
...@@ -2796,7 +3406,10 @@ ...@@ -2796,7 +3406,10 @@
"F13" "F13"
], ],
"english": "F13", "english": "F13",
"chromium": "f13" "chromium": "f13",
"glfw": [
"F13"
]
}, },
"scanCodes": { "scanCodes": {
"android": [ "android": [
...@@ -2809,7 +3422,10 @@ ...@@ -2809,7 +3422,10 @@
"macos": 105 "macos": 105
}, },
"keyCodes": { "keyCodes": {
"android": null "android": null,
"glfw": [
302
]
} }
}, },
"f14": { "f14": {
...@@ -2819,7 +3435,10 @@ ...@@ -2819,7 +3435,10 @@
"F14" "F14"
], ],
"english": "F14", "english": "F14",
"chromium": "f14" "chromium": "f14",
"glfw": [
"F14"
]
}, },
"scanCodes": { "scanCodes": {
"android": [ "android": [
...@@ -2832,7 +3451,10 @@ ...@@ -2832,7 +3451,10 @@
"macos": 107 "macos": 107
}, },
"keyCodes": { "keyCodes": {
"android": null "android": null,
"glfw": [
303
]
} }
}, },
"f15": { "f15": {
...@@ -2842,7 +3464,10 @@ ...@@ -2842,7 +3464,10 @@
"F15" "F15"
], ],
"english": "F15", "english": "F15",
"chromium": "f15" "chromium": "f15",
"glfw": [
"F15"
]
}, },
"scanCodes": { "scanCodes": {
"android": [ "android": [
...@@ -2855,7 +3480,10 @@ ...@@ -2855,7 +3480,10 @@
"macos": 113 "macos": 113
}, },
"keyCodes": { "keyCodes": {
"android": null "android": null,
"glfw": [
304
]
} }
}, },
"f16": { "f16": {
...@@ -2865,7 +3493,10 @@ ...@@ -2865,7 +3493,10 @@
"F16" "F16"
], ],
"english": "F16", "english": "F16",
"chromium": "f16" "chromium": "f16",
"glfw": [
"F16"
]
}, },
"scanCodes": { "scanCodes": {
"android": [ "android": [
...@@ -2878,7 +3509,10 @@ ...@@ -2878,7 +3509,10 @@
"macos": 106 "macos": 106
}, },
"keyCodes": { "keyCodes": {
"android": null "android": null,
"glfw": [
305
]
} }
}, },
"f17": { "f17": {
...@@ -2888,7 +3522,10 @@ ...@@ -2888,7 +3522,10 @@
"F17" "F17"
], ],
"english": "F17", "english": "F17",
"chromium": "f17" "chromium": "f17",
"glfw": [
"F17"
]
}, },
"scanCodes": { "scanCodes": {
"android": [ "android": [
...@@ -2901,7 +3538,10 @@ ...@@ -2901,7 +3538,10 @@
"macos": 64 "macos": 64
}, },
"keyCodes": { "keyCodes": {
"android": null "android": null,
"glfw": [
306
]
} }
}, },
"f18": { "f18": {
...@@ -2911,7 +3551,10 @@ ...@@ -2911,7 +3551,10 @@
"F18" "F18"
], ],
"english": "F18", "english": "F18",
"chromium": "f18" "chromium": "f18",
"glfw": [
"F18"
]
}, },
"scanCodes": { "scanCodes": {
"android": [ "android": [
...@@ -2924,7 +3567,10 @@ ...@@ -2924,7 +3567,10 @@
"macos": 79 "macos": 79
}, },
"keyCodes": { "keyCodes": {
"android": null "android": null,
"glfw": [
307
]
} }
}, },
"f19": { "f19": {
...@@ -2934,7 +3580,10 @@ ...@@ -2934,7 +3580,10 @@
"F19" "F19"
], ],
"english": "F19", "english": "F19",
"chromium": "f19" "chromium": "f19",
"glfw": [
"F19"
]
}, },
"scanCodes": { "scanCodes": {
"android": [ "android": [
...@@ -2947,7 +3596,10 @@ ...@@ -2947,7 +3596,10 @@
"macos": 80 "macos": 80
}, },
"keyCodes": { "keyCodes": {
"android": null "android": null,
"glfw": [
308
]
} }
}, },
"f20": { "f20": {
...@@ -2957,7 +3609,10 @@ ...@@ -2957,7 +3609,10 @@
"F20" "F20"
], ],
"english": "F20", "english": "F20",
"chromium": "f20" "chromium": "f20",
"glfw": [
"F20"
]
}, },
"scanCodes": { "scanCodes": {
"android": [ "android": [
...@@ -2970,7 +3625,10 @@ ...@@ -2970,7 +3625,10 @@
"macos": 90 "macos": 90
}, },
"keyCodes": { "keyCodes": {
"android": null "android": null,
"glfw": [
309
]
} }
}, },
"f21": { "f21": {
...@@ -2980,7 +3638,10 @@ ...@@ -2980,7 +3638,10 @@
"F21" "F21"
], ],
"english": "F21", "english": "F21",
"chromium": "f21" "chromium": "f21",
"glfw": [
"F21"
]
}, },
"scanCodes": { "scanCodes": {
"android": [ "android": [
...@@ -2993,7 +3654,10 @@ ...@@ -2993,7 +3654,10 @@
"macos": null "macos": null
}, },
"keyCodes": { "keyCodes": {
"android": null "android": null,
"glfw": [
310
]
} }
}, },
"f22": { "f22": {
...@@ -3003,7 +3667,10 @@ ...@@ -3003,7 +3667,10 @@
"F22" "F22"
], ],
"english": "F22", "english": "F22",
"chromium": "f22" "chromium": "f22",
"glfw": [
"F22"
]
}, },
"scanCodes": { "scanCodes": {
"android": [ "android": [
...@@ -3016,7 +3683,10 @@ ...@@ -3016,7 +3683,10 @@
"macos": null "macos": null
}, },
"keyCodes": { "keyCodes": {
"android": null "android": null,
"glfw": [
311
]
} }
}, },
"f23": { "f23": {
...@@ -3026,7 +3696,10 @@ ...@@ -3026,7 +3696,10 @@
"F23" "F23"
], ],
"english": "F23", "english": "F23",
"chromium": "f23" "chromium": "f23",
"glfw": [
"F23"
]
}, },
"scanCodes": { "scanCodes": {
"android": [ "android": [
...@@ -3039,7 +3712,10 @@ ...@@ -3039,7 +3712,10 @@
"macos": null "macos": null
}, },
"keyCodes": { "keyCodes": {
"android": null "android": null,
"glfw": [
312
]
} }
}, },
"f24": { "f24": {
...@@ -3049,7 +3725,8 @@ ...@@ -3049,7 +3725,8 @@
"F24" "F24"
], ],
"english": "F24", "english": "F24",
"chromium": "f24" "chromium": "f24",
"glfw": null
}, },
"scanCodes": { "scanCodes": {
"android": [ "android": [
...@@ -3062,7 +3739,8 @@ ...@@ -3062,7 +3739,8 @@
"macos": null "macos": null
}, },
"keyCodes": { "keyCodes": {
"android": null "android": null,
"glfw": null
} }
}, },
"open": { "open": {
...@@ -3072,7 +3750,8 @@ ...@@ -3072,7 +3750,8 @@
"OPEN" "OPEN"
], ],
"english": "Open", "english": "Open",
"chromium": "open" "chromium": "open",
"glfw": null
}, },
"scanCodes": { "scanCodes": {
"android": [ "android": [
...@@ -3085,7 +3764,8 @@ ...@@ -3085,7 +3764,8 @@
"macos": null "macos": null
}, },
"keyCodes": { "keyCodes": {
"android": null "android": null,
"glfw": null
} }
}, },
"help": { "help": {
...@@ -3095,7 +3775,8 @@ ...@@ -3095,7 +3775,8 @@
"HELP" "HELP"
], ],
"english": "Help", "english": "Help",
"chromium": "help" "chromium": "help",
"glfw": null
}, },
"scanCodes": { "scanCodes": {
"android": [ "android": [
...@@ -3110,7 +3791,8 @@ ...@@ -3110,7 +3791,8 @@
"keyCodes": { "keyCodes": {
"android": [ "android": [
259 259
] ],
"glfw": null
} }
}, },
"select": { "select": {
...@@ -3118,7 +3800,8 @@ ...@@ -3118,7 +3800,8 @@
"domkey": "Select", "domkey": "Select",
"android": null, "android": null,
"english": "Select", "english": "Select",
"chromium": "select" "chromium": "select",
"glfw": null
}, },
"scanCodes": { "scanCodes": {
"android": null, "android": null,
...@@ -3129,7 +3812,8 @@ ...@@ -3129,7 +3812,8 @@
"macos": null "macos": null
}, },
"keyCodes": { "keyCodes": {
"android": null "android": null,
"glfw": null
} }
}, },
"again": { "again": {
...@@ -3139,7 +3823,8 @@ ...@@ -3139,7 +3823,8 @@
"AGAIN" "AGAIN"
], ],
"english": "Again", "english": "Again",
"chromium": "again" "chromium": "again",
"glfw": null
}, },
"scanCodes": { "scanCodes": {
"android": [ "android": [
...@@ -3152,7 +3837,8 @@ ...@@ -3152,7 +3837,8 @@
"macos": null "macos": null
}, },
"keyCodes": { "keyCodes": {
"android": null "android": null,
"glfw": null
} }
}, },
"undo": { "undo": {
...@@ -3162,7 +3848,8 @@ ...@@ -3162,7 +3848,8 @@
"UNDO" "UNDO"
], ],
"english": "Undo", "english": "Undo",
"chromium": "undo" "chromium": "undo",
"glfw": null
}, },
"scanCodes": { "scanCodes": {
"android": [ "android": [
...@@ -3175,7 +3862,8 @@ ...@@ -3175,7 +3862,8 @@
"macos": null "macos": null
}, },
"keyCodes": { "keyCodes": {
"android": null "android": null,
"glfw": null
} }
}, },
"cut": { "cut": {
...@@ -3185,7 +3873,8 @@ ...@@ -3185,7 +3873,8 @@
"CUT" "CUT"
], ],
"english": "Cut", "english": "Cut",
"chromium": "cut" "chromium": "cut",
"glfw": null
}, },
"scanCodes": { "scanCodes": {
"android": [ "android": [
...@@ -3200,7 +3889,8 @@ ...@@ -3200,7 +3889,8 @@
"keyCodes": { "keyCodes": {
"android": [ "android": [
277 277
] ],
"glfw": null
} }
}, },
"copy": { "copy": {
...@@ -3210,7 +3900,8 @@ ...@@ -3210,7 +3900,8 @@
"COPY" "COPY"
], ],
"english": "Copy", "english": "Copy",
"chromium": "copy" "chromium": "copy",
"glfw": null
}, },
"scanCodes": { "scanCodes": {
"android": [ "android": [
...@@ -3225,7 +3916,8 @@ ...@@ -3225,7 +3916,8 @@
"keyCodes": { "keyCodes": {
"android": [ "android": [
278 278
] ],
"glfw": null
} }
}, },
"paste": { "paste": {
...@@ -3235,7 +3927,8 @@ ...@@ -3235,7 +3927,8 @@
"PASTE" "PASTE"
], ],
"english": "Paste", "english": "Paste",
"chromium": "paste" "chromium": "paste",
"glfw": null
}, },
"scanCodes": { "scanCodes": {
"android": [ "android": [
...@@ -3250,7 +3943,8 @@ ...@@ -3250,7 +3943,8 @@
"keyCodes": { "keyCodes": {
"android": [ "android": [
279 279
] ],
"glfw": null
} }
}, },
"find": { "find": {
...@@ -3260,7 +3954,8 @@ ...@@ -3260,7 +3954,8 @@
"FIND" "FIND"
], ],
"english": "Find", "english": "Find",
"chromium": "find" "chromium": "find",
"glfw": null
}, },
"scanCodes": { "scanCodes": {
"android": [ "android": [
...@@ -3273,7 +3968,8 @@ ...@@ -3273,7 +3968,8 @@
"macos": null "macos": null
}, },
"keyCodes": { "keyCodes": {
"android": null "android": null,
"glfw": null
} }
}, },
"audioVolumeMute": { "audioVolumeMute": {
...@@ -3283,7 +3979,8 @@ ...@@ -3283,7 +3979,8 @@
"VOLUME_MUTE" "VOLUME_MUTE"
], ],
"english": "Audio Volume Mute", "english": "Audio Volume Mute",
"chromium": "volumeMute" "chromium": "volumeMute",
"glfw": null
}, },
"scanCodes": { "scanCodes": {
"android": [ "android": [
...@@ -3298,7 +3995,8 @@ ...@@ -3298,7 +3995,8 @@
"keyCodes": { "keyCodes": {
"android": [ "android": [
164 164
] ],
"glfw": null
} }
}, },
"audioVolumeUp": { "audioVolumeUp": {
...@@ -3308,7 +4006,8 @@ ...@@ -3308,7 +4006,8 @@
"VOLUME_UP" "VOLUME_UP"
], ],
"english": "Audio Volume Up", "english": "Audio Volume Up",
"chromium": "volumeUp" "chromium": "volumeUp",
"glfw": null
}, },
"scanCodes": { "scanCodes": {
"android": [ "android": [
...@@ -3323,7 +4022,8 @@ ...@@ -3323,7 +4022,8 @@
"keyCodes": { "keyCodes": {
"android": [ "android": [
24 24
] ],
"glfw": null
} }
}, },
"audioVolumeDown": { "audioVolumeDown": {
...@@ -3333,7 +4033,8 @@ ...@@ -3333,7 +4033,8 @@
"VOLUME_DOWN" "VOLUME_DOWN"
], ],
"english": "Audio Volume Down", "english": "Audio Volume Down",
"chromium": "volumeDown" "chromium": "volumeDown",
"glfw": null
}, },
"scanCodes": { "scanCodes": {
"android": [ "android": [
...@@ -3348,7 +4049,8 @@ ...@@ -3348,7 +4049,8 @@
"keyCodes": { "keyCodes": {
"android": [ "android": [
25 25
] ],
"glfw": null
} }
}, },
"numpadComma": { "numpadComma": {
...@@ -3358,7 +4060,8 @@ ...@@ -3358,7 +4060,8 @@
"NUMPAD_COMMA" "NUMPAD_COMMA"
], ],
"english": "Numpad Comma", "english": "Numpad Comma",
"chromium": "numpadComma" "chromium": "numpadComma",
"glfw": null
}, },
"scanCodes": { "scanCodes": {
"android": [ "android": [
...@@ -3374,7 +4077,8 @@ ...@@ -3374,7 +4077,8 @@
"keyCodes": { "keyCodes": {
"android": [ "android": [
159 159
] ],
"glfw": null
} }
}, },
"intlRo": { "intlRo": {
...@@ -3382,7 +4086,8 @@ ...@@ -3382,7 +4086,8 @@
"domkey": "IntlRo", "domkey": "IntlRo",
"android": null, "android": null,
"english": "Intl Ro", "english": "Intl Ro",
"chromium": "intlRo" "chromium": "intlRo",
"glfw": null
}, },
"scanCodes": { "scanCodes": {
"android": null, "android": null,
...@@ -3393,7 +4098,8 @@ ...@@ -3393,7 +4098,8 @@
"macos": 94 "macos": 94
}, },
"keyCodes": { "keyCodes": {
"android": null "android": null,
"glfw": null
} }
}, },
"kanaMode": { "kanaMode": {
...@@ -3401,7 +4107,8 @@ ...@@ -3401,7 +4107,8 @@
"domkey": "KanaMode", "domkey": "KanaMode",
"android": null, "android": null,
"english": "Kana Mode", "english": "Kana Mode",
"chromium": "kanaMode" "chromium": "kanaMode",
"glfw": null
}, },
"scanCodes": { "scanCodes": {
"android": null, "android": null,
...@@ -3412,7 +4119,8 @@ ...@@ -3412,7 +4119,8 @@
"macos": 104 "macos": 104
}, },
"keyCodes": { "keyCodes": {
"android": null "android": null,
"glfw": null
} }
}, },
"intlYen": { "intlYen": {
...@@ -3420,7 +4128,8 @@ ...@@ -3420,7 +4128,8 @@
"domkey": "IntlYen", "domkey": "IntlYen",
"android": null, "android": null,
"english": "Intl Yen", "english": "Intl Yen",
"chromium": "intlYen" "chromium": "intlYen",
"glfw": null
}, },
"scanCodes": { "scanCodes": {
"android": null, "android": null,
...@@ -3431,7 +4140,8 @@ ...@@ -3431,7 +4140,8 @@
"macos": 93 "macos": 93
}, },
"keyCodes": { "keyCodes": {
"android": null "android": null,
"glfw": null
} }
}, },
"convert": { "convert": {
...@@ -3441,7 +4151,8 @@ ...@@ -3441,7 +4151,8 @@
"HENKAN" "HENKAN"
], ],
"english": "Convert", "english": "Convert",
"chromium": "convert" "chromium": "convert",
"glfw": null
}, },
"scanCodes": { "scanCodes": {
"android": [ "android": [
...@@ -3456,7 +4167,8 @@ ...@@ -3456,7 +4167,8 @@
"keyCodes": { "keyCodes": {
"android": [ "android": [
214 214
] ],
"glfw": null
} }
}, },
"nonConvert": { "nonConvert": {
...@@ -3466,7 +4178,8 @@ ...@@ -3466,7 +4178,8 @@
"MUHENKAN" "MUHENKAN"
], ],
"english": "Non Convert", "english": "Non Convert",
"chromium": "nonConvert" "chromium": "nonConvert",
"glfw": null
}, },
"scanCodes": { "scanCodes": {
"android": [ "android": [
...@@ -3481,7 +4194,8 @@ ...@@ -3481,7 +4194,8 @@
"keyCodes": { "keyCodes": {
"android": [ "android": [
213 213
] ],
"glfw": null
} }
}, },
"lang1": { "lang1": {
...@@ -3489,7 +4203,8 @@ ...@@ -3489,7 +4203,8 @@
"domkey": "Lang1", "domkey": "Lang1",
"android": null, "android": null,
"english": "Lang 1", "english": "Lang 1",
"chromium": "lang1" "chromium": "lang1",
"glfw": null
}, },
"scanCodes": { "scanCodes": {
"android": null, "android": null,
...@@ -3500,7 +4215,8 @@ ...@@ -3500,7 +4215,8 @@
"macos": null "macos": null
}, },
"keyCodes": { "keyCodes": {
"android": null "android": null,
"glfw": null
} }
}, },
"lang2": { "lang2": {
...@@ -3508,7 +4224,8 @@ ...@@ -3508,7 +4224,8 @@
"domkey": "Lang2", "domkey": "Lang2",
"android": null, "android": null,
"english": "Lang 2", "english": "Lang 2",
"chromium": "lang2" "chromium": "lang2",
"glfw": null
}, },
"scanCodes": { "scanCodes": {
"android": null, "android": null,
...@@ -3519,7 +4236,8 @@ ...@@ -3519,7 +4236,8 @@
"macos": null "macos": null
}, },
"keyCodes": { "keyCodes": {
"android": null "android": null,
"glfw": null
} }
}, },
"lang3": { "lang3": {
...@@ -3529,7 +4247,8 @@ ...@@ -3529,7 +4247,8 @@
"KATAKANA" "KATAKANA"
], ],
"english": "Lang 3", "english": "Lang 3",
"chromium": "lang3" "chromium": "lang3",
"glfw": null
}, },
"scanCodes": { "scanCodes": {
"android": [ "android": [
...@@ -3542,7 +4261,8 @@ ...@@ -3542,7 +4261,8 @@
"macos": null "macos": null
}, },
"keyCodes": { "keyCodes": {
"android": null "android": null,
"glfw": null
} }
}, },
"lang4": { "lang4": {
...@@ -3552,7 +4272,8 @@ ...@@ -3552,7 +4272,8 @@
"HIRAGANA" "HIRAGANA"
], ],
"english": "Lang 4", "english": "Lang 4",
"chromium": "lang4" "chromium": "lang4",
"glfw": null
}, },
"scanCodes": { "scanCodes": {
"android": [ "android": [
...@@ -3565,7 +4286,8 @@ ...@@ -3565,7 +4286,8 @@
"macos": null "macos": null
}, },
"keyCodes": { "keyCodes": {
"android": null "android": null,
"glfw": null
} }
}, },
"lang5": { "lang5": {
...@@ -3573,7 +4295,8 @@ ...@@ -3573,7 +4295,8 @@
"domkey": "Lang5", "domkey": "Lang5",
"android": null, "android": null,
"english": "Lang 5", "english": "Lang 5",
"chromium": "lang5" "chromium": "lang5",
"glfw": null
}, },
"scanCodes": { "scanCodes": {
"android": null, "android": null,
...@@ -3584,7 +4307,8 @@ ...@@ -3584,7 +4307,8 @@
"macos": null "macos": null
}, },
"keyCodes": { "keyCodes": {
"android": null "android": null,
"glfw": null
} }
}, },
"abort": { "abort": {
...@@ -3592,7 +4316,8 @@ ...@@ -3592,7 +4316,8 @@
"domkey": "Abort", "domkey": "Abort",
"android": null, "android": null,
"english": "Abort", "english": "Abort",
"chromium": "abort" "chromium": "abort",
"glfw": null
}, },
"scanCodes": { "scanCodes": {
"android": null, "android": null,
...@@ -3603,7 +4328,8 @@ ...@@ -3603,7 +4328,8 @@
"macos": null "macos": null
}, },
"keyCodes": { "keyCodes": {
"android": null "android": null,
"glfw": null
} }
}, },
"props": { "props": {
...@@ -3613,7 +4339,8 @@ ...@@ -3613,7 +4339,8 @@
"PROPS" "PROPS"
], ],
"english": "Props", "english": "Props",
"chromium": "props" "chromium": "props",
"glfw": null
}, },
"scanCodes": { "scanCodes": {
"android": [ "android": [
...@@ -3626,7 +4353,8 @@ ...@@ -3626,7 +4353,8 @@
"macos": null "macos": null
}, },
"keyCodes": { "keyCodes": {
"android": null "android": null,
"glfw": null
} }
}, },
"numpadParenLeft": { "numpadParenLeft": {
...@@ -3636,7 +4364,8 @@ ...@@ -3636,7 +4364,8 @@
"NUMPAD_LEFT_PAREN" "NUMPAD_LEFT_PAREN"
], ],
"english": "Numpad Paren Left", "english": "Numpad Paren Left",
"chromium": "numpadParenLeft" "chromium": "numpadParenLeft",
"glfw": null
}, },
"scanCodes": { "scanCodes": {
"android": [ "android": [
...@@ -3651,7 +4380,8 @@ ...@@ -3651,7 +4380,8 @@
"keyCodes": { "keyCodes": {
"android": [ "android": [
162 162
] ],
"glfw": null
} }
}, },
"numpadParenRight": { "numpadParenRight": {
...@@ -3661,7 +4391,8 @@ ...@@ -3661,7 +4391,8 @@
"NUMPAD_RIGHT_PAREN" "NUMPAD_RIGHT_PAREN"
], ],
"english": "Numpad Paren Right", "english": "Numpad Paren Right",
"chromium": "numpadParenRight" "chromium": "numpadParenRight",
"glfw": null
}, },
"scanCodes": { "scanCodes": {
"android": [ "android": [
...@@ -3676,7 +4407,8 @@ ...@@ -3676,7 +4407,8 @@
"keyCodes": { "keyCodes": {
"android": [ "android": [
163 163
] ],
"glfw": null
} }
}, },
"numpadBackspace": { "numpadBackspace": {
...@@ -3684,7 +4416,8 @@ ...@@ -3684,7 +4416,8 @@
"domkey": "NumpadBackspace", "domkey": "NumpadBackspace",
"android": null, "android": null,
"english": "Numpad Backspace", "english": "Numpad Backspace",
"chromium": "numpadBackspace" "chromium": "numpadBackspace",
"glfw": null
}, },
"scanCodes": { "scanCodes": {
"android": null, "android": null,
...@@ -3695,7 +4428,8 @@ ...@@ -3695,7 +4428,8 @@
"macos": null "macos": null
}, },
"keyCodes": { "keyCodes": {
"android": null "android": null,
"glfw": null
} }
}, },
"numpadMemoryStore": { "numpadMemoryStore": {
...@@ -3703,7 +4437,8 @@ ...@@ -3703,7 +4437,8 @@
"domkey": "NumpadMemoryStore", "domkey": "NumpadMemoryStore",
"android": null, "android": null,
"english": "Numpad Memory Store", "english": "Numpad Memory Store",
"chromium": "numpadMemoryStore" "chromium": "numpadMemoryStore",
"glfw": null
}, },
"scanCodes": { "scanCodes": {
"android": null, "android": null,
...@@ -3714,7 +4449,8 @@ ...@@ -3714,7 +4449,8 @@
"macos": null "macos": null
}, },
"keyCodes": { "keyCodes": {
"android": null "android": null,
"glfw": null
} }
}, },
"numpadMemoryRecall": { "numpadMemoryRecall": {
...@@ -3722,7 +4458,8 @@ ...@@ -3722,7 +4458,8 @@
"domkey": "NumpadMemoryRecall", "domkey": "NumpadMemoryRecall",
"android": null, "android": null,
"english": "Numpad Memory Recall", "english": "Numpad Memory Recall",
"chromium": "numpadMemoryRecall" "chromium": "numpadMemoryRecall",
"glfw": null
}, },
"scanCodes": { "scanCodes": {
"android": null, "android": null,
...@@ -3733,7 +4470,8 @@ ...@@ -3733,7 +4470,8 @@
"macos": null "macos": null
}, },
"keyCodes": { "keyCodes": {
"android": null "android": null,
"glfw": null
} }
}, },
"numpadMemoryClear": { "numpadMemoryClear": {
...@@ -3741,7 +4479,8 @@ ...@@ -3741,7 +4479,8 @@
"domkey": "NumpadMemoryClear", "domkey": "NumpadMemoryClear",
"android": null, "android": null,
"english": "Numpad Memory Clear", "english": "Numpad Memory Clear",
"chromium": "numpadMemoryClear" "chromium": "numpadMemoryClear",
"glfw": null
}, },
"scanCodes": { "scanCodes": {
"android": null, "android": null,
...@@ -3752,7 +4491,8 @@ ...@@ -3752,7 +4491,8 @@
"macos": null "macos": null
}, },
"keyCodes": { "keyCodes": {
"android": null "android": null,
"glfw": null
} }
}, },
"numpadMemoryAdd": { "numpadMemoryAdd": {
...@@ -3760,7 +4500,8 @@ ...@@ -3760,7 +4500,8 @@
"domkey": "NumpadMemoryAdd", "domkey": "NumpadMemoryAdd",
"android": null, "android": null,
"english": "Numpad Memory Add", "english": "Numpad Memory Add",
"chromium": "numpadMemoryAdd" "chromium": "numpadMemoryAdd",
"glfw": null
}, },
"scanCodes": { "scanCodes": {
"android": null, "android": null,
...@@ -3771,7 +4512,8 @@ ...@@ -3771,7 +4512,8 @@
"macos": null "macos": null
}, },
"keyCodes": { "keyCodes": {
"android": null "android": null,
"glfw": null
} }
}, },
"numpadMemorySubtract": { "numpadMemorySubtract": {
...@@ -3779,7 +4521,8 @@ ...@@ -3779,7 +4521,8 @@
"domkey": "NumpadMemorySubtract", "domkey": "NumpadMemorySubtract",
"android": null, "android": null,
"english": "Numpad Memory Subtract", "english": "Numpad Memory Subtract",
"chromium": "numpadMemorySubtract" "chromium": "numpadMemorySubtract",
"glfw": null
}, },
"scanCodes": { "scanCodes": {
"android": null, "android": null,
...@@ -3790,7 +4533,8 @@ ...@@ -3790,7 +4533,8 @@
"macos": null "macos": null
}, },
"keyCodes": { "keyCodes": {
"android": null "android": null,
"glfw": null
} }
}, },
"numpadSignChange": { "numpadSignChange": {
...@@ -3798,7 +4542,8 @@ ...@@ -3798,7 +4542,8 @@
"domkey": null, "domkey": null,
"android": null, "android": null,
"english": "Numpad Sign Change", "english": "Numpad Sign Change",
"chromium": "numpadSignChange" "chromium": "numpadSignChange",
"glfw": null
}, },
"scanCodes": { "scanCodes": {
"android": null, "android": null,
...@@ -3809,7 +4554,8 @@ ...@@ -3809,7 +4554,8 @@
"macos": null "macos": null
}, },
"keyCodes": { "keyCodes": {
"android": null "android": null,
"glfw": null
} }
}, },
"numpadClear": { "numpadClear": {
...@@ -3817,7 +4563,8 @@ ...@@ -3817,7 +4563,8 @@
"domkey": "NumpadClear", "domkey": "NumpadClear",
"android": null, "android": null,
"english": "Numpad Clear", "english": "Numpad Clear",
"chromium": "numpadClear" "chromium": "numpadClear",
"glfw": null
}, },
"scanCodes": { "scanCodes": {
"android": null, "android": null,
...@@ -3828,7 +4575,8 @@ ...@@ -3828,7 +4575,8 @@
"macos": null "macos": null
}, },
"keyCodes": { "keyCodes": {
"android": null "android": null,
"glfw": null
} }
}, },
"numpadClearEntry": { "numpadClearEntry": {
...@@ -3836,7 +4584,8 @@ ...@@ -3836,7 +4584,8 @@
"domkey": "NumpadClearEntry", "domkey": "NumpadClearEntry",
"android": null, "android": null,
"english": "Numpad Clear Entry", "english": "Numpad Clear Entry",
"chromium": "numpadClearEntry" "chromium": "numpadClearEntry",
"glfw": null
}, },
"scanCodes": { "scanCodes": {
"android": null, "android": null,
...@@ -3847,7 +4596,8 @@ ...@@ -3847,7 +4596,8 @@
"macos": null "macos": null
}, },
"keyCodes": { "keyCodes": {
"android": null "android": null,
"glfw": null
} }
}, },
"controlLeft": { "controlLeft": {
...@@ -3857,7 +4607,10 @@ ...@@ -3857,7 +4607,10 @@
"CTRL_LEFT" "CTRL_LEFT"
], ],
"english": "Control Left", "english": "Control Left",
"chromium": "controlLeft" "chromium": "controlLeft",
"glfw": [
"LEFT_CONTROL"
]
}, },
"scanCodes": { "scanCodes": {
"android": [ "android": [
...@@ -3872,6 +4625,9 @@ ...@@ -3872,6 +4625,9 @@
"keyCodes": { "keyCodes": {
"android": [ "android": [
113 113
],
"glfw": [
341
] ]
} }
}, },
...@@ -3882,7 +4638,10 @@ ...@@ -3882,7 +4638,10 @@
"SHIFT_LEFT" "SHIFT_LEFT"
], ],
"english": "Shift Left", "english": "Shift Left",
"chromium": "shiftLeft" "chromium": "shiftLeft",
"glfw": [
"LEFT_SHIFT"
]
}, },
"scanCodes": { "scanCodes": {
"android": [ "android": [
...@@ -3897,6 +4656,9 @@ ...@@ -3897,6 +4656,9 @@
"keyCodes": { "keyCodes": {
"android": [ "android": [
59 59
],
"glfw": [
340
] ]
} }
}, },
...@@ -3907,7 +4669,10 @@ ...@@ -3907,7 +4669,10 @@
"ALT_LEFT" "ALT_LEFT"
], ],
"english": "Alt Left", "english": "Alt Left",
"chromium": "altLeft" "chromium": "altLeft",
"glfw": [
"LEFT_ALT"
]
}, },
"scanCodes": { "scanCodes": {
"android": [ "android": [
...@@ -3922,6 +4687,9 @@ ...@@ -3922,6 +4687,9 @@
"keyCodes": { "keyCodes": {
"android": [ "android": [
57 57
],
"glfw": [
342
] ]
} }
}, },
...@@ -3932,7 +4700,8 @@ ...@@ -3932,7 +4700,8 @@
"META_LEFT" "META_LEFT"
], ],
"english": "Meta Left", "english": "Meta Left",
"chromium": "metaLeft" "chromium": "metaLeft",
"glfw": null
}, },
"scanCodes": { "scanCodes": {
"android": [ "android": [
...@@ -3947,7 +4716,8 @@ ...@@ -3947,7 +4716,8 @@
"keyCodes": { "keyCodes": {
"android": [ "android": [
117 117
] ],
"glfw": null
} }
}, },
"controlRight": { "controlRight": {
...@@ -3957,7 +4727,10 @@ ...@@ -3957,7 +4727,10 @@
"CTRL_RIGHT" "CTRL_RIGHT"
], ],
"english": "Control Right", "english": "Control Right",
"chromium": "controlRight" "chromium": "controlRight",
"glfw": [
"RIGHT_CONTROL"
]
}, },
"scanCodes": { "scanCodes": {
"android": [ "android": [
...@@ -3972,6 +4745,9 @@ ...@@ -3972,6 +4745,9 @@
"keyCodes": { "keyCodes": {
"android": [ "android": [
114 114
],
"glfw": [
345
] ]
} }
}, },
...@@ -3982,7 +4758,10 @@ ...@@ -3982,7 +4758,10 @@
"SHIFT_RIGHT" "SHIFT_RIGHT"
], ],
"english": "Shift Right", "english": "Shift Right",
"chromium": "shiftRight" "chromium": "shiftRight",
"glfw": [
"RIGHT_SHIFT"
]
}, },
"scanCodes": { "scanCodes": {
"android": [ "android": [
...@@ -3997,6 +4776,9 @@ ...@@ -3997,6 +4776,9 @@
"keyCodes": { "keyCodes": {
"android": [ "android": [
60 60
],
"glfw": [
344
] ]
} }
}, },
...@@ -4007,7 +4789,10 @@ ...@@ -4007,7 +4789,10 @@
"ALT_RIGHT" "ALT_RIGHT"
], ],
"english": "Alt Right", "english": "Alt Right",
"chromium": "altRight" "chromium": "altRight",
"glfw": [
"RIGHT_ALT"
]
}, },
"scanCodes": { "scanCodes": {
"android": [ "android": [
...@@ -4022,6 +4807,9 @@ ...@@ -4022,6 +4807,9 @@
"keyCodes": { "keyCodes": {
"android": [ "android": [
58 58
],
"glfw": [
346
] ]
} }
}, },
...@@ -4032,7 +4820,8 @@ ...@@ -4032,7 +4820,8 @@
"META_RIGHT" "META_RIGHT"
], ],
"english": "Meta Right", "english": "Meta Right",
"chromium": "metaRight" "chromium": "metaRight",
"glfw": null
}, },
"scanCodes": { "scanCodes": {
"android": [ "android": [
...@@ -4047,7 +4836,8 @@ ...@@ -4047,7 +4836,8 @@
"keyCodes": { "keyCodes": {
"android": [ "android": [
118 118
] ],
"glfw": null
} }
}, },
"info": { "info": {
...@@ -4057,7 +4847,8 @@ ...@@ -4057,7 +4847,8 @@
"INFO" "INFO"
], ],
"english": "Info", "english": "Info",
"chromium": "info" "chromium": "info",
"glfw": null
}, },
"scanCodes": { "scanCodes": {
"android": [ "android": [
...@@ -4072,7 +4863,8 @@ ...@@ -4072,7 +4863,8 @@
"keyCodes": { "keyCodes": {
"android": [ "android": [
165 165
] ],
"glfw": null
} }
}, },
"closedCaptionToggle": { "closedCaptionToggle": {
...@@ -4082,7 +4874,8 @@ ...@@ -4082,7 +4874,8 @@
"CAPTIONS" "CAPTIONS"
], ],
"english": "Closed Caption Toggle", "english": "Closed Caption Toggle",
"chromium": "closedCaptionToggle" "chromium": "closedCaptionToggle",
"glfw": null
}, },
"scanCodes": { "scanCodes": {
"android": null, "android": null,
...@@ -4095,7 +4888,8 @@ ...@@ -4095,7 +4888,8 @@
"keyCodes": { "keyCodes": {
"android": [ "android": [
175 175
] ],
"glfw": null
} }
}, },
"brightnessUp": { "brightnessUp": {
...@@ -4105,7 +4899,8 @@ ...@@ -4105,7 +4899,8 @@
"BRIGHTNESS_UP" "BRIGHTNESS_UP"
], ],
"english": "Brightness Up", "english": "Brightness Up",
"chromium": "brightnessUp" "chromium": "brightnessUp",
"glfw": null
}, },
"scanCodes": { "scanCodes": {
"android": [ "android": [
...@@ -4120,7 +4915,8 @@ ...@@ -4120,7 +4915,8 @@
"keyCodes": { "keyCodes": {
"android": [ "android": [
221 221
] ],
"glfw": null
} }
}, },
"brightnessDown": { "brightnessDown": {
...@@ -4130,7 +4926,8 @@ ...@@ -4130,7 +4926,8 @@
"BRIGHTNESS_DOWN" "BRIGHTNESS_DOWN"
], ],
"english": "Brightness Down", "english": "Brightness Down",
"chromium": "brightnessDown" "chromium": "brightnessDown",
"glfw": null
}, },
"scanCodes": { "scanCodes": {
"android": [ "android": [
...@@ -4145,7 +4942,8 @@ ...@@ -4145,7 +4942,8 @@
"keyCodes": { "keyCodes": {
"android": [ "android": [
220 220
] ],
"glfw": null
} }
}, },
"brightnessToggle": { "brightnessToggle": {
...@@ -4153,7 +4951,8 @@ ...@@ -4153,7 +4951,8 @@
"domkey": null, "domkey": null,
"android": null, "android": null,
"english": "Brightness Toggle", "english": "Brightness Toggle",
"chromium": "brightnessToggle" "chromium": "brightnessToggle",
"glfw": null
}, },
"scanCodes": { "scanCodes": {
"android": null, "android": null,
...@@ -4164,7 +4963,8 @@ ...@@ -4164,7 +4963,8 @@
"macos": null "macos": null
}, },
"keyCodes": { "keyCodes": {
"android": null "android": null,
"glfw": null
} }
}, },
"brightnessMinimum": { "brightnessMinimum": {
...@@ -4172,7 +4972,8 @@ ...@@ -4172,7 +4972,8 @@
"domkey": null, "domkey": null,
"android": null, "android": null,
"english": "Brightness Minimum", "english": "Brightness Minimum",
"chromium": "brightnessMinimum" "chromium": "brightnessMinimum",
"glfw": null
}, },
"scanCodes": { "scanCodes": {
"android": null, "android": null,
...@@ -4183,7 +4984,8 @@ ...@@ -4183,7 +4984,8 @@
"macos": null "macos": null
}, },
"keyCodes": { "keyCodes": {
"android": null "android": null,
"glfw": null
} }
}, },
"brightnessMaximum": { "brightnessMaximum": {
...@@ -4191,7 +4993,8 @@ ...@@ -4191,7 +4993,8 @@
"domkey": null, "domkey": null,
"android": null, "android": null,
"english": "Brightness Maximum", "english": "Brightness Maximum",
"chromium": "brightnessMaximum" "chromium": "brightnessMaximum",
"glfw": null
}, },
"scanCodes": { "scanCodes": {
"android": null, "android": null,
...@@ -4202,7 +5005,8 @@ ...@@ -4202,7 +5005,8 @@
"macos": null "macos": null
}, },
"keyCodes": { "keyCodes": {
"android": null "android": null,
"glfw": null
} }
}, },
"brightnessAuto": { "brightnessAuto": {
...@@ -4210,7 +5014,8 @@ ...@@ -4210,7 +5014,8 @@
"domkey": null, "domkey": null,
"android": null, "android": null,
"english": "Brightness Auto", "english": "Brightness Auto",
"chromium": "brightnessAuto" "chromium": "brightnessAuto",
"glfw": null
}, },
"scanCodes": { "scanCodes": {
"android": null, "android": null,
...@@ -4221,7 +5026,8 @@ ...@@ -4221,7 +5026,8 @@
"macos": null "macos": null
}, },
"keyCodes": { "keyCodes": {
"android": null "android": null,
"glfw": null
} }
}, },
"mediaLast": { "mediaLast": {
...@@ -4231,7 +5037,8 @@ ...@@ -4231,7 +5037,8 @@
"LAST_CHANNEL" "LAST_CHANNEL"
], ],
"english": "Media Last", "english": "Media Last",
"chromium": "mediaLast" "chromium": "mediaLast",
"glfw": null
}, },
"scanCodes": { "scanCodes": {
"android": null, "android": null,
...@@ -4244,7 +5051,8 @@ ...@@ -4244,7 +5051,8 @@
"keyCodes": { "keyCodes": {
"android": [ "android": [
229 229
] ],
"glfw": null
} }
}, },
"launchPhone": { "launchPhone": {
...@@ -4252,7 +5060,8 @@ ...@@ -4252,7 +5060,8 @@
"domkey": null, "domkey": null,
"android": null, "android": null,
"english": "Launch Phone", "english": "Launch Phone",
"chromium": "launchPhone" "chromium": "launchPhone",
"glfw": null
}, },
"scanCodes": { "scanCodes": {
"android": null, "android": null,
...@@ -4263,7 +5072,8 @@ ...@@ -4263,7 +5072,8 @@
"macos": null "macos": null
}, },
"keyCodes": { "keyCodes": {
"android": null "android": null,
"glfw": null
} }
}, },
"programGuide": { "programGuide": {
...@@ -4271,7 +5081,8 @@ ...@@ -4271,7 +5081,8 @@
"domkey": null, "domkey": null,
"android": null, "android": null,
"english": "Program Guide", "english": "Program Guide",
"chromium": "programGuide" "chromium": "programGuide",
"glfw": null
}, },
"scanCodes": { "scanCodes": {
"android": null, "android": null,
...@@ -4282,7 +5093,8 @@ ...@@ -4282,7 +5093,8 @@
"macos": null "macos": null
}, },
"keyCodes": { "keyCodes": {
"android": null "android": null,
"glfw": null
} }
}, },
"exit": { "exit": {
...@@ -4292,7 +5104,8 @@ ...@@ -4292,7 +5104,8 @@
"EXIT" "EXIT"
], ],
"english": "Exit", "english": "Exit",
"chromium": "exit" "chromium": "exit",
"glfw": null
}, },
"scanCodes": { "scanCodes": {
"android": [ "android": [
...@@ -4305,7 +5118,8 @@ ...@@ -4305,7 +5118,8 @@
"macos": null "macos": null
}, },
"keyCodes": { "keyCodes": {
"android": null "android": null,
"glfw": null
} }
}, },
"channelUp": { "channelUp": {
...@@ -4315,7 +5129,8 @@ ...@@ -4315,7 +5129,8 @@
"CHANNEL_UP" "CHANNEL_UP"
], ],
"english": "Channel Up", "english": "Channel Up",
"chromium": "channelUp" "chromium": "channelUp",
"glfw": null
}, },
"scanCodes": { "scanCodes": {
"android": [ "android": [
...@@ -4330,7 +5145,8 @@ ...@@ -4330,7 +5145,8 @@
"keyCodes": { "keyCodes": {
"android": [ "android": [
166 166
] ],
"glfw": null
} }
}, },
"channelDown": { "channelDown": {
...@@ -4340,7 +5156,8 @@ ...@@ -4340,7 +5156,8 @@
"CHANNEL_DOWN" "CHANNEL_DOWN"
], ],
"english": "Channel Down", "english": "Channel Down",
"chromium": "channelDown" "chromium": "channelDown",
"glfw": null
}, },
"scanCodes": { "scanCodes": {
"android": [ "android": [
...@@ -4355,7 +5172,8 @@ ...@@ -4355,7 +5172,8 @@
"keyCodes": { "keyCodes": {
"android": [ "android": [
167 167
] ],
"glfw": null
} }
}, },
"mediaPlay": { "mediaPlay": {
...@@ -4365,7 +5183,8 @@ ...@@ -4365,7 +5183,8 @@
"MEDIA_PLAY" "MEDIA_PLAY"
], ],
"english": "Media Play", "english": "Media Play",
"chromium": "mediaPlay" "chromium": "mediaPlay",
"glfw": null
}, },
"scanCodes": { "scanCodes": {
"android": [ "android": [
...@@ -4381,7 +5200,8 @@ ...@@ -4381,7 +5200,8 @@
"keyCodes": { "keyCodes": {
"android": [ "android": [
126 126
] ],
"glfw": null
} }
}, },
"mediaRecord": { "mediaRecord": {
...@@ -4391,7 +5211,8 @@ ...@@ -4391,7 +5211,8 @@
"MEDIA_RECORD" "MEDIA_RECORD"
], ],
"english": "Media Record", "english": "Media Record",
"chromium": "mediaRecord" "chromium": "mediaRecord",
"glfw": null
}, },
"scanCodes": { "scanCodes": {
"android": [ "android": [
...@@ -4406,7 +5227,8 @@ ...@@ -4406,7 +5227,8 @@
"keyCodes": { "keyCodes": {
"android": [ "android": [
130 130
] ],
"glfw": null
} }
}, },
"mediaFastForward": { "mediaFastForward": {
...@@ -4416,7 +5238,8 @@ ...@@ -4416,7 +5238,8 @@
"MEDIA_FAST_FORWARD" "MEDIA_FAST_FORWARD"
], ],
"english": "Media Fast Forward", "english": "Media Fast Forward",
"chromium": "mediaFastForward" "chromium": "mediaFastForward",
"glfw": null
}, },
"scanCodes": { "scanCodes": {
"android": [ "android": [
...@@ -4431,7 +5254,8 @@ ...@@ -4431,7 +5254,8 @@
"keyCodes": { "keyCodes": {
"android": [ "android": [
90 90
] ],
"glfw": null
} }
}, },
"mediaRewind": { "mediaRewind": {
...@@ -4441,7 +5265,8 @@ ...@@ -4441,7 +5265,8 @@
"MEDIA_REWIND" "MEDIA_REWIND"
], ],
"english": "Media Rewind", "english": "Media Rewind",
"chromium": "mediaRewind" "chromium": "mediaRewind",
"glfw": null
}, },
"scanCodes": { "scanCodes": {
"android": [ "android": [
...@@ -4456,7 +5281,8 @@ ...@@ -4456,7 +5281,8 @@
"keyCodes": { "keyCodes": {
"android": [ "android": [
89 89
] ],
"glfw": null
} }
}, },
"mediaTrackNext": { "mediaTrackNext": {
...@@ -4466,7 +5292,8 @@ ...@@ -4466,7 +5292,8 @@
"MEDIA_NEXT" "MEDIA_NEXT"
], ],
"english": "Media Track Next", "english": "Media Track Next",
"chromium": "mediaTrackNext" "chromium": "mediaTrackNext",
"glfw": null
}, },
"scanCodes": { "scanCodes": {
"android": [ "android": [
...@@ -4481,7 +5308,8 @@ ...@@ -4481,7 +5308,8 @@
"keyCodes": { "keyCodes": {
"android": [ "android": [
87 87
] ],
"glfw": null
} }
}, },
"mediaTrackPrevious": { "mediaTrackPrevious": {
...@@ -4491,7 +5319,8 @@ ...@@ -4491,7 +5319,8 @@
"MEDIA_PREVIOUS" "MEDIA_PREVIOUS"
], ],
"english": "Media Track Previous", "english": "Media Track Previous",
"chromium": "mediaTrackPrevious" "chromium": "mediaTrackPrevious",
"glfw": null
}, },
"scanCodes": { "scanCodes": {
"android": [ "android": [
...@@ -4506,7 +5335,8 @@ ...@@ -4506,7 +5335,8 @@
"keyCodes": { "keyCodes": {
"android": [ "android": [
88 88
] ],
"glfw": null
} }
}, },
"mediaStop": { "mediaStop": {
...@@ -4516,7 +5346,8 @@ ...@@ -4516,7 +5346,8 @@
"MEDIA_STOP" "MEDIA_STOP"
], ],
"english": "Media Stop", "english": "Media Stop",
"chromium": "mediaStop" "chromium": "mediaStop",
"glfw": null
}, },
"scanCodes": { "scanCodes": {
"android": [ "android": [
...@@ -4532,7 +5363,8 @@ ...@@ -4532,7 +5363,8 @@
"keyCodes": { "keyCodes": {
"android": [ "android": [
86 86
] ],
"glfw": null
} }
}, },
"eject": { "eject": {
...@@ -4542,7 +5374,8 @@ ...@@ -4542,7 +5374,8 @@
"MEDIA_EJECT" "MEDIA_EJECT"
], ],
"english": "Eject", "english": "Eject",
"chromium": "eject" "chromium": "eject",
"glfw": null
}, },
"scanCodes": { "scanCodes": {
"android": [ "android": [
...@@ -4558,7 +5391,8 @@ ...@@ -4558,7 +5391,8 @@
"keyCodes": { "keyCodes": {
"android": [ "android": [
129 129
] ],
"glfw": null
} }
}, },
"mediaPlayPause": { "mediaPlayPause": {
...@@ -4568,7 +5402,8 @@ ...@@ -4568,7 +5402,8 @@
"MEDIA_PLAY_PAUSE" "MEDIA_PLAY_PAUSE"
], ],
"english": "Media Play Pause", "english": "Media Play Pause",
"chromium": "mediaPlayPause" "chromium": "mediaPlayPause",
"glfw": null
}, },
"scanCodes": { "scanCodes": {
"android": [ "android": [
...@@ -4583,7 +5418,8 @@ ...@@ -4583,7 +5418,8 @@
"keyCodes": { "keyCodes": {
"android": [ "android": [
85 85
] ],
"glfw": null
} }
}, },
"speechInputToggle": { "speechInputToggle": {
...@@ -4591,7 +5427,8 @@ ...@@ -4591,7 +5427,8 @@
"domkey": null, "domkey": null,
"android": null, "android": null,
"english": "Speech Input Toggle", "english": "Speech Input Toggle",
"chromium": "speechInputToggle" "chromium": "speechInputToggle",
"glfw": null
}, },
"scanCodes": { "scanCodes": {
"android": null, "android": null,
...@@ -4602,7 +5439,8 @@ ...@@ -4602,7 +5439,8 @@
"macos": null "macos": null
}, },
"keyCodes": { "keyCodes": {
"android": null "android": null,
"glfw": null
} }
}, },
"bassBoost": { "bassBoost": {
...@@ -4612,7 +5450,8 @@ ...@@ -4612,7 +5450,8 @@
"BASSBOOST" "BASSBOOST"
], ],
"english": "Bass Boost", "english": "Bass Boost",
"chromium": "bassBoost" "chromium": "bassBoost",
"glfw": null
}, },
"scanCodes": { "scanCodes": {
"android": [ "android": [
...@@ -4625,7 +5464,8 @@ ...@@ -4625,7 +5464,8 @@
"macos": null "macos": null
}, },
"keyCodes": { "keyCodes": {
"android": null "android": null,
"glfw": null
} }
}, },
"mediaSelect": { "mediaSelect": {
...@@ -4633,7 +5473,8 @@ ...@@ -4633,7 +5473,8 @@
"domkey": "MediaSelect", "domkey": "MediaSelect",
"android": null, "android": null,
"english": "Media Select", "english": "Media Select",
"chromium": "mediaSelect" "chromium": "mediaSelect",
"glfw": null
}, },
"scanCodes": { "scanCodes": {
"android": null, "android": null,
...@@ -4644,7 +5485,8 @@ ...@@ -4644,7 +5485,8 @@
"macos": null "macos": null
}, },
"keyCodes": { "keyCodes": {
"android": null "android": null,
"glfw": null
} }
}, },
"launchWordProcessor": { "launchWordProcessor": {
...@@ -4652,7 +5494,8 @@ ...@@ -4652,7 +5494,8 @@
"domkey": null, "domkey": null,
"android": null, "android": null,
"english": "Launch Word Processor", "english": "Launch Word Processor",
"chromium": "launchWordProcessor" "chromium": "launchWordProcessor",
"glfw": null
}, },
"scanCodes": { "scanCodes": {
"android": null, "android": null,
...@@ -4663,7 +5506,8 @@ ...@@ -4663,7 +5506,8 @@
"macos": null "macos": null
}, },
"keyCodes": { "keyCodes": {
"android": null "android": null,
"glfw": null
} }
}, },
"launchSpreadsheet": { "launchSpreadsheet": {
...@@ -4671,7 +5515,8 @@ ...@@ -4671,7 +5515,8 @@
"domkey": null, "domkey": null,
"android": null, "android": null,
"english": "Launch Spreadsheet", "english": "Launch Spreadsheet",
"chromium": "launchSpreadsheet" "chromium": "launchSpreadsheet",
"glfw": null
}, },
"scanCodes": { "scanCodes": {
"android": null, "android": null,
...@@ -4682,7 +5527,8 @@ ...@@ -4682,7 +5527,8 @@
"macos": null "macos": null
}, },
"keyCodes": { "keyCodes": {
"android": null "android": null,
"glfw": null
} }
}, },
"launchMail": { "launchMail": {
...@@ -4692,7 +5538,8 @@ ...@@ -4692,7 +5538,8 @@
"ENVELOPE" "ENVELOPE"
], ],
"english": "Launch Mail", "english": "Launch Mail",
"chromium": "launchMail" "chromium": "launchMail",
"glfw": null
}, },
"scanCodes": { "scanCodes": {
"android": [ "android": [
...@@ -4708,7 +5555,8 @@ ...@@ -4708,7 +5555,8 @@
"keyCodes": { "keyCodes": {
"android": [ "android": [
65 65
] ],
"glfw": null
} }
}, },
"launchContacts": { "launchContacts": {
...@@ -4718,7 +5566,8 @@ ...@@ -4718,7 +5566,8 @@
"CONTACTS" "CONTACTS"
], ],
"english": "Launch Contacts", "english": "Launch Contacts",
"chromium": "launchContacts" "chromium": "launchContacts",
"glfw": null
}, },
"scanCodes": { "scanCodes": {
"android": [ "android": [
...@@ -4733,7 +5582,8 @@ ...@@ -4733,7 +5582,8 @@
"keyCodes": { "keyCodes": {
"android": [ "android": [
207 207
] ],
"glfw": null
} }
}, },
"launchCalendar": { "launchCalendar": {
...@@ -4743,7 +5593,8 @@ ...@@ -4743,7 +5593,8 @@
"CALENDAR" "CALENDAR"
], ],
"english": "Launch Calendar", "english": "Launch Calendar",
"chromium": "launchCalendar" "chromium": "launchCalendar",
"glfw": null
}, },
"scanCodes": { "scanCodes": {
"android": [ "android": [
...@@ -4758,7 +5609,8 @@ ...@@ -4758,7 +5609,8 @@
"keyCodes": { "keyCodes": {
"android": [ "android": [
208 208
] ],
"glfw": null
} }
}, },
"launchApp2": { "launchApp2": {
...@@ -4766,7 +5618,8 @@ ...@@ -4766,7 +5618,8 @@
"domkey": "LaunchApp2", "domkey": "LaunchApp2",
"android": null, "android": null,
"english": "Launch App2", "english": "Launch App2",
"chromium": "launchApp2" "chromium": "launchApp2",
"glfw": null
}, },
"scanCodes": { "scanCodes": {
"android": null, "android": null,
...@@ -4777,7 +5630,8 @@ ...@@ -4777,7 +5630,8 @@
"macos": null "macos": null
}, },
"keyCodes": { "keyCodes": {
"android": null "android": null,
"glfw": null
} }
}, },
"launchApp1": { "launchApp1": {
...@@ -4785,7 +5639,8 @@ ...@@ -4785,7 +5639,8 @@
"domkey": "LaunchApp1", "domkey": "LaunchApp1",
"android": null, "android": null,
"english": "Launch App1", "english": "Launch App1",
"chromium": "launchApp1" "chromium": "launchApp1",
"glfw": null
}, },
"scanCodes": { "scanCodes": {
"android": null, "android": null,
...@@ -4796,7 +5651,8 @@ ...@@ -4796,7 +5651,8 @@
"macos": null "macos": null
}, },
"keyCodes": { "keyCodes": {
"android": null "android": null,
"glfw": null
} }
}, },
"launchInternetBrowser": { "launchInternetBrowser": {
...@@ -4804,7 +5660,8 @@ ...@@ -4804,7 +5660,8 @@
"domkey": null, "domkey": null,
"android": null, "android": null,
"english": "Launch Internet Browser", "english": "Launch Internet Browser",
"chromium": "launchInternetBrowser" "chromium": "launchInternetBrowser",
"glfw": null
}, },
"scanCodes": { "scanCodes": {
"android": null, "android": null,
...@@ -4815,7 +5672,8 @@ ...@@ -4815,7 +5672,8 @@
"macos": null "macos": null
}, },
"keyCodes": { "keyCodes": {
"android": null "android": null,
"glfw": null
} }
}, },
"logOff": { "logOff": {
...@@ -4823,7 +5681,8 @@ ...@@ -4823,7 +5681,8 @@
"domkey": null, "domkey": null,
"android": null, "android": null,
"english": "Log Off", "english": "Log Off",
"chromium": "logOff" "chromium": "logOff",
"glfw": null
}, },
"scanCodes": { "scanCodes": {
"android": null, "android": null,
...@@ -4834,7 +5693,8 @@ ...@@ -4834,7 +5693,8 @@
"macos": null "macos": null
}, },
"keyCodes": { "keyCodes": {
"android": null "android": null,
"glfw": null
} }
}, },
"lockScreen": { "lockScreen": {
...@@ -4842,7 +5702,8 @@ ...@@ -4842,7 +5702,8 @@
"domkey": null, "domkey": null,
"android": null, "android": null,
"english": "Lock Screen", "english": "Lock Screen",
"chromium": "lockScreen" "chromium": "lockScreen",
"glfw": null
}, },
"scanCodes": { "scanCodes": {
"android": null, "android": null,
...@@ -4853,7 +5714,8 @@ ...@@ -4853,7 +5714,8 @@
"macos": null "macos": null
}, },
"keyCodes": { "keyCodes": {
"android": null "android": null,
"glfw": null
} }
}, },
"launchControlPanel": { "launchControlPanel": {
...@@ -4861,7 +5723,8 @@ ...@@ -4861,7 +5723,8 @@
"domkey": "LaunchControlPanel", "domkey": "LaunchControlPanel",
"android": null, "android": null,
"english": "Launch Control Panel", "english": "Launch Control Panel",
"chromium": "launchControlPanel" "chromium": "launchControlPanel",
"glfw": null
}, },
"scanCodes": { "scanCodes": {
"android": null, "android": null,
...@@ -4872,7 +5735,8 @@ ...@@ -4872,7 +5735,8 @@
"macos": null "macos": null
}, },
"keyCodes": { "keyCodes": {
"android": null "android": null,
"glfw": null
} }
}, },
"selectTask": { "selectTask": {
...@@ -4880,7 +5744,8 @@ ...@@ -4880,7 +5744,8 @@
"domkey": "SelectTask", "domkey": "SelectTask",
"android": null, "android": null,
"english": "Select Task", "english": "Select Task",
"chromium": "selectTask" "chromium": "selectTask",
"glfw": null
}, },
"scanCodes": { "scanCodes": {
"android": null, "android": null,
...@@ -4891,7 +5756,8 @@ ...@@ -4891,7 +5756,8 @@
"macos": null "macos": null
}, },
"keyCodes": { "keyCodes": {
"android": null "android": null,
"glfw": null
} }
}, },
"launchDocuments": { "launchDocuments": {
...@@ -4899,7 +5765,8 @@ ...@@ -4899,7 +5765,8 @@
"domkey": null, "domkey": null,
"android": null, "android": null,
"english": "Launch Documents", "english": "Launch Documents",
"chromium": "launchDocuments" "chromium": "launchDocuments",
"glfw": null
}, },
"scanCodes": { "scanCodes": {
"android": null, "android": null,
...@@ -4910,7 +5777,8 @@ ...@@ -4910,7 +5777,8 @@
"macos": null "macos": null
}, },
"keyCodes": { "keyCodes": {
"android": null "android": null,
"glfw": null
} }
}, },
"spellCheck": { "spellCheck": {
...@@ -4918,7 +5786,8 @@ ...@@ -4918,7 +5786,8 @@
"domkey": null, "domkey": null,
"android": null, "android": null,
"english": "Spell Check", "english": "Spell Check",
"chromium": "spellCheck" "chromium": "spellCheck",
"glfw": null
}, },
"scanCodes": { "scanCodes": {
"android": null, "android": null,
...@@ -4929,7 +5798,8 @@ ...@@ -4929,7 +5798,8 @@
"macos": null "macos": null
}, },
"keyCodes": { "keyCodes": {
"android": null "android": null,
"glfw": null
} }
}, },
"launchKeyboardLayout": { "launchKeyboardLayout": {
...@@ -4937,7 +5807,8 @@ ...@@ -4937,7 +5807,8 @@
"domkey": null, "domkey": null,
"android": null, "android": null,
"english": "Launch Keyboard Layout", "english": "Launch Keyboard Layout",
"chromium": "launchKeyboardLayout" "chromium": "launchKeyboardLayout",
"glfw": null
}, },
"scanCodes": { "scanCodes": {
"android": null, "android": null,
...@@ -4948,7 +5819,8 @@ ...@@ -4948,7 +5819,8 @@
"macos": null "macos": null
}, },
"keyCodes": { "keyCodes": {
"android": null "android": null,
"glfw": null
} }
}, },
"launchScreenSaver": { "launchScreenSaver": {
...@@ -4956,7 +5828,8 @@ ...@@ -4956,7 +5828,8 @@
"domkey": "LaunchScreenSaver", "domkey": "LaunchScreenSaver",
"android": null, "android": null,
"english": "Launch Screen Saver", "english": "Launch Screen Saver",
"chromium": "launchScreenSaver" "chromium": "launchScreenSaver",
"glfw": null
}, },
"scanCodes": { "scanCodes": {
"android": null, "android": null,
...@@ -4967,7 +5840,8 @@ ...@@ -4967,7 +5840,8 @@
"macos": null "macos": null
}, },
"keyCodes": { "keyCodes": {
"android": null "android": null,
"glfw": null
} }
}, },
"launchAudioBrowser": { "launchAudioBrowser": {
...@@ -4975,7 +5849,8 @@ ...@@ -4975,7 +5849,8 @@
"domkey": null, "domkey": null,
"android": null, "android": null,
"english": "Launch Audio Browser", "english": "Launch Audio Browser",
"chromium": "launchAudioBrowser" "chromium": "launchAudioBrowser",
"glfw": null
}, },
"scanCodes": { "scanCodes": {
"android": null, "android": null,
...@@ -4986,7 +5861,8 @@ ...@@ -4986,7 +5861,8 @@
"macos": null "macos": null
}, },
"keyCodes": { "keyCodes": {
"android": null "android": null,
"glfw": null
} }
}, },
"newKey": { "newKey": {
...@@ -4996,7 +5872,8 @@ ...@@ -4996,7 +5872,8 @@
"NEW" "NEW"
], ],
"english": "New Key", "english": "New Key",
"chromium": "new" "chromium": "new",
"glfw": null
}, },
"scanCodes": { "scanCodes": {
"android": [ "android": [
...@@ -5009,7 +5886,8 @@ ...@@ -5009,7 +5886,8 @@
"macos": null "macos": null
}, },
"keyCodes": { "keyCodes": {
"android": null "android": null,
"glfw": null
} }
}, },
"close": { "close": {
...@@ -5020,7 +5898,8 @@ ...@@ -5020,7 +5898,8 @@
"CLOSE" "CLOSE"
], ],
"english": "Close", "english": "Close",
"chromium": "close" "chromium": "close",
"glfw": null
}, },
"scanCodes": { "scanCodes": {
"android": [ "android": [
...@@ -5036,7 +5915,8 @@ ...@@ -5036,7 +5915,8 @@
"keyCodes": { "keyCodes": {
"android": [ "android": [
128 128
] ],
"glfw": null
} }
}, },
"save": { "save": {
...@@ -5044,7 +5924,8 @@ ...@@ -5044,7 +5924,8 @@
"domkey": null, "domkey": null,
"android": null, "android": null,
"english": "Save", "english": "Save",
"chromium": "save" "chromium": "save",
"glfw": null
}, },
"scanCodes": { "scanCodes": {
"android": null, "android": null,
...@@ -5055,7 +5936,8 @@ ...@@ -5055,7 +5936,8 @@
"macos": null "macos": null
}, },
"keyCodes": { "keyCodes": {
"android": null "android": null,
"glfw": null
} }
}, },
"print": { "print": {
...@@ -5065,7 +5947,8 @@ ...@@ -5065,7 +5947,8 @@
"PRINT" "PRINT"
], ],
"english": "Print", "english": "Print",
"chromium": "print" "chromium": "print",
"glfw": null
}, },
"scanCodes": { "scanCodes": {
"android": [ "android": [
...@@ -5078,7 +5961,8 @@ ...@@ -5078,7 +5961,8 @@
"macos": null "macos": null
}, },
"keyCodes": { "keyCodes": {
"android": null "android": null,
"glfw": null
} }
}, },
"browserSearch": { "browserSearch": {
...@@ -5088,7 +5972,8 @@ ...@@ -5088,7 +5972,8 @@
"SEARCH" "SEARCH"
], ],
"english": "Browser Search", "english": "Browser Search",
"chromium": "browserSearch" "chromium": "browserSearch",
"glfw": null
}, },
"scanCodes": { "scanCodes": {
"android": [ "android": [
...@@ -5103,7 +5988,8 @@ ...@@ -5103,7 +5988,8 @@
"keyCodes": { "keyCodes": {
"android": [ "android": [
84 84
] ],
"glfw": null
} }
}, },
"browserHome": { "browserHome": {
...@@ -5111,7 +5997,8 @@ ...@@ -5111,7 +5997,8 @@
"domkey": "BrowserHome", "domkey": "BrowserHome",
"android": null, "android": null,
"english": "Browser Home", "english": "Browser Home",
"chromium": "browserHome" "chromium": "browserHome",
"glfw": null
}, },
"scanCodes": { "scanCodes": {
"android": null, "android": null,
...@@ -5122,7 +6009,8 @@ ...@@ -5122,7 +6009,8 @@
"macos": null "macos": null
}, },
"keyCodes": { "keyCodes": {
"android": null "android": null,
"glfw": null
} }
}, },
"browserBack": { "browserBack": {
...@@ -5130,7 +6018,8 @@ ...@@ -5130,7 +6018,8 @@
"domkey": "BrowserBack", "domkey": "BrowserBack",
"android": null, "android": null,
"english": "Browser Back", "english": "Browser Back",
"chromium": "browserBack" "chromium": "browserBack",
"glfw": null
}, },
"scanCodes": { "scanCodes": {
"android": null, "android": null,
...@@ -5141,7 +6030,8 @@ ...@@ -5141,7 +6030,8 @@
"macos": null "macos": null
}, },
"keyCodes": { "keyCodes": {
"android": null "android": null,
"glfw": null
} }
}, },
"browserForward": { "browserForward": {
...@@ -5151,7 +6041,8 @@ ...@@ -5151,7 +6041,8 @@
"FORWARD" "FORWARD"
], ],
"english": "Browser Forward", "english": "Browser Forward",
"chromium": "browserForward" "chromium": "browserForward",
"glfw": null
}, },
"scanCodes": { "scanCodes": {
"android": [ "android": [
...@@ -5166,7 +6057,8 @@ ...@@ -5166,7 +6057,8 @@
"keyCodes": { "keyCodes": {
"android": [ "android": [
125 125
] ],
"glfw": null
} }
}, },
"browserStop": { "browserStop": {
...@@ -5174,7 +6066,8 @@ ...@@ -5174,7 +6066,8 @@
"domkey": "BrowserStop", "domkey": "BrowserStop",
"android": null, "android": null,
"english": "Browser Stop", "english": "Browser Stop",
"chromium": "browserStop" "chromium": "browserStop",
"glfw": null
}, },
"scanCodes": { "scanCodes": {
"android": null, "android": null,
...@@ -5185,7 +6078,8 @@ ...@@ -5185,7 +6078,8 @@
"macos": null "macos": null
}, },
"keyCodes": { "keyCodes": {
"android": null "android": null,
"glfw": null
} }
}, },
"browserRefresh": { "browserRefresh": {
...@@ -5193,7 +6087,8 @@ ...@@ -5193,7 +6087,8 @@
"domkey": "BrowserRefresh", "domkey": "BrowserRefresh",
"android": null, "android": null,
"english": "Browser Refresh", "english": "Browser Refresh",
"chromium": "browserRefresh" "chromium": "browserRefresh",
"glfw": null
}, },
"scanCodes": { "scanCodes": {
"android": null, "android": null,
...@@ -5204,7 +6099,8 @@ ...@@ -5204,7 +6099,8 @@
"macos": null "macos": null
}, },
"keyCodes": { "keyCodes": {
"android": null "android": null,
"glfw": null
} }
}, },
"browserFavorites": { "browserFavorites": {
...@@ -5214,7 +6110,8 @@ ...@@ -5214,7 +6110,8 @@
"BOOKMARK" "BOOKMARK"
], ],
"english": "Browser Favorites", "english": "Browser Favorites",
"chromium": "browserFavorites" "chromium": "browserFavorites",
"glfw": null
}, },
"scanCodes": { "scanCodes": {
"android": [ "android": [
...@@ -5229,7 +6126,8 @@ ...@@ -5229,7 +6126,8 @@
"keyCodes": { "keyCodes": {
"android": [ "android": [
174 174
] ],
"glfw": null
} }
}, },
"zoomIn": { "zoomIn": {
...@@ -5239,7 +6137,8 @@ ...@@ -5239,7 +6137,8 @@
"ZOOM_IN" "ZOOM_IN"
], ],
"english": "Zoom In", "english": "Zoom In",
"chromium": "zoomIn" "chromium": "zoomIn",
"glfw": null
}, },
"scanCodes": { "scanCodes": {
"android": null, "android": null,
...@@ -5252,7 +6151,8 @@ ...@@ -5252,7 +6151,8 @@
"keyCodes": { "keyCodes": {
"android": [ "android": [
168 168
] ],
"glfw": null
} }
}, },
"zoomOut": { "zoomOut": {
...@@ -5262,7 +6162,8 @@ ...@@ -5262,7 +6162,8 @@
"ZOOM_OUT" "ZOOM_OUT"
], ],
"english": "Zoom Out", "english": "Zoom Out",
"chromium": "zoomOut" "chromium": "zoomOut",
"glfw": null
}, },
"scanCodes": { "scanCodes": {
"android": null, "android": null,
...@@ -5275,7 +6176,8 @@ ...@@ -5275,7 +6176,8 @@
"keyCodes": { "keyCodes": {
"android": [ "android": [
169 169
] ],
"glfw": null
} }
}, },
"zoomToggle": { "zoomToggle": {
...@@ -5285,7 +6187,8 @@ ...@@ -5285,7 +6187,8 @@
"TV_ZOOM_MODE" "TV_ZOOM_MODE"
], ],
"english": "Zoom Toggle", "english": "Zoom Toggle",
"chromium": "zoomToggle" "chromium": "zoomToggle",
"glfw": null
}, },
"scanCodes": { "scanCodes": {
"android": null, "android": null,
...@@ -5298,7 +6201,8 @@ ...@@ -5298,7 +6201,8 @@
"keyCodes": { "keyCodes": {
"android": [ "android": [
255 255
] ],
"glfw": null
} }
}, },
"redo": { "redo": {
...@@ -5308,7 +6212,8 @@ ...@@ -5308,7 +6212,8 @@
"REDO" "REDO"
], ],
"english": "Redo", "english": "Redo",
"chromium": "redo" "chromium": "redo",
"glfw": null
}, },
"scanCodes": { "scanCodes": {
"android": [ "android": [
...@@ -5321,7 +6226,8 @@ ...@@ -5321,7 +6226,8 @@
"macos": null "macos": null
}, },
"keyCodes": { "keyCodes": {
"android": null "android": null,
"glfw": null
} }
}, },
"mailReply": { "mailReply": {
...@@ -5329,7 +6235,8 @@ ...@@ -5329,7 +6235,8 @@
"domkey": "MailReply", "domkey": "MailReply",
"android": null, "android": null,
"english": "Mail Reply", "english": "Mail Reply",
"chromium": "mailReply" "chromium": "mailReply",
"glfw": null
}, },
"scanCodes": { "scanCodes": {
"android": null, "android": null,
...@@ -5340,7 +6247,8 @@ ...@@ -5340,7 +6247,8 @@
"macos": null "macos": null
}, },
"keyCodes": { "keyCodes": {
"android": null "android": null,
"glfw": null
} }
}, },
"mailForward": { "mailForward": {
...@@ -5348,7 +6256,8 @@ ...@@ -5348,7 +6256,8 @@
"domkey": "MailForward", "domkey": "MailForward",
"android": null, "android": null,
"english": "Mail Forward", "english": "Mail Forward",
"chromium": "mailForward" "chromium": "mailForward",
"glfw": null
}, },
"scanCodes": { "scanCodes": {
"android": null, "android": null,
...@@ -5359,7 +6268,8 @@ ...@@ -5359,7 +6268,8 @@
"macos": null "macos": null
}, },
"keyCodes": { "keyCodes": {
"android": null "android": null,
"glfw": null
} }
}, },
"mailSend": { "mailSend": {
...@@ -5367,7 +6277,8 @@ ...@@ -5367,7 +6277,8 @@
"domkey": "MailSend", "domkey": "MailSend",
"android": null, "android": null,
"english": "Mail Send", "english": "Mail Send",
"chromium": "mailSend" "chromium": "mailSend",
"glfw": null
}, },
"scanCodes": { "scanCodes": {
"android": null, "android": null,
...@@ -5378,7 +6289,8 @@ ...@@ -5378,7 +6289,8 @@
"macos": null "macos": null
}, },
"keyCodes": { "keyCodes": {
"android": null "android": null,
"glfw": null
} }
} }
} }
\ No newline at end of file
{
"altLeft": ["LEFT_ALT"],
"altRight": ["RIGHT_ALT"],
"arrowDown": ["DOWN"],
"arrowLeft": ["LEFT"],
"arrowRight": ["RIGHT"],
"arrowUp": ["UP"],
"backquote": ["GRAVE_ACCENT"],
"backslash": ["BACKSLASH"],
"backspace": ["BACKSPACE"],
"bracketLeft": ["LEFT_BRACKET"],
"bracketRight": ["RIGHT_BRACKET"],
"capsLock": ["CAPS_LOCK"],
"controlLeft": ["LEFT_CONTROL"],
"controlRight": ["RIGHT_CONTROL"],
"contextMenu": ["MENU"],
"comma": ["COMMA"],
"delete": ["DELETE"],
"digit0": ["0"],
"digit1": ["1"],
"digit2": ["2"],
"digit3": ["3"],
"digit4": ["4"],
"digit5": ["5"],
"digit6": ["6"],
"digit7": ["7"],
"digit8": ["8"],
"digit9": ["9"],
"end": ["END"],
"enter": ["ENTER"],
"equal": ["EQUAL"],
"escape": ["ESCAPE"],
"f1": ["F1"],
"f2": ["F2"],
"f3": ["F3"],
"f4": ["F4"],
"f5": ["F5"],
"f6": ["F6"],
"f7": ["F7"],
"f8": ["F8"],
"f9": ["F9"],
"f10": ["F10"],
"f11": ["F11"],
"f12": ["F12"],
"f13": ["F13"],
"f14": ["F14"],
"f15": ["F15"],
"f16": ["F16"],
"f17": ["F17"],
"f18": ["F18"],
"f19": ["F19"],
"f20": ["F20"],
"f21": ["F21"],
"f22": ["F22"],
"f23": ["F23"],
"f25": ["F25"],
"home": ["HOME"],
"insert": ["INSERT"],
"keyA": ["A"],
"keyB": ["B"],
"keyC": ["C"],
"keyD": ["D"],
"keyE": ["E"],
"keyF": ["F"],
"keyG": ["G"],
"keyH": ["H"],
"keyI": ["I"],
"keyJ": ["J"],
"keyK": ["K"],
"keyL": ["L"],
"keyM": ["M"],
"keyN": ["N"],
"keyO": ["O"],
"keyP": ["P"],
"keyQ": ["Q"],
"keyR": ["R"],
"keyS": ["S"],
"keyT": ["T"],
"keyU": ["U"],
"keyV": ["V"],
"keyW": ["W"],
"keyX": ["X"],
"keyY": ["Y"],
"keyZ": ["Z"],
"minus": ["MINUS"],
"numLock": ["NUM_LOCK"],
"numpad0": ["KP_0"],
"numpad1": ["KP_1"],
"numpad2": ["KP_2"],
"numpad3": ["KP_3"],
"numpad4": ["KP_4"],
"numpad5": ["KP_5"],
"numpad6": ["KP_6"],
"numpad7": ["KP_7"],
"numpad8": ["KP_8"],
"numpad9": ["KP_9"],
"numpadDecimal": ["KP_DECIMAL"],
"numpadDivide": ["KP_DIVIDE"],
"numpadMultiply": ["KP_MULTIPLY"],
"numpadSubtract": ["NUMPAD_SUBTRACT"],
"numpadAdd": ["KP_ADD"],
"numpadEnter": ["KP_ENTER"],
"numpadEqual": ["KP_EQUAL"],
"pageDown": ["PAGE_DOWN"],
"pageUp": ["PAGE_UP"],
"pause": ["PAUSE"],
"printScreen": ["PRINT_SCREEN"],
"quote": ["APOSTROPHE"],
"period": ["PERIOD"],
"semicolon": ["SEMICOLON"],
"slash": ["SLASH"],
"space": ["SPACE"],
"shiftLeft": ["LEFT_SHIFT"],
"shiftRight": ["RIGHT_SHIFT"],
"tab": ["TAB"]
}
...@@ -50,3 +50,21 @@ const Map<int, PhysicalKeyboardKey> kMacOsToPhysicalKey = <int, PhysicalKeyboard ...@@ -50,3 +50,21 @@ const Map<int, PhysicalKeyboardKey> kMacOsToPhysicalKey = <int, PhysicalKeyboard
const Map<int, LogicalKeyboardKey> kMacOsNumPadMap = <int, LogicalKeyboardKey>{ const Map<int, LogicalKeyboardKey> kMacOsNumPadMap = <int, LogicalKeyboardKey>{
@@@MACOS_NUMPAD_MAP@@@ @@@MACOS_NUMPAD_MAP@@@
}; };
/// Maps GLFW-specific key codes to the matching [LogicalKeyboardKey].
const Map<int, LogicalKeyboardKey> kGlfwToLogicalKey = <int, LogicalKeyboardKey>{
@@@GLFW_KEY_CODE_MAP@@@
};
/// A map of GLFW key codes which have printable representations, but appear
/// on the number pad. Used to provide different key objects for keys like
/// KEY_EQUALS and NUMPAD_EQUALS.
const Map<int, LogicalKeyboardKey> kGlfwNumpadMap = <int, LogicalKeyboardKey>{
@@@GLFW_NUMPAD_MAP@@@
};
/// Maps XKB specific key code values representing [PhysicalKeyboardKey].
const Map<int, PhysicalKeyboardKey> kLinuxToPhysicalKey = <int, PhysicalKeyboardKey>{
@@@XKB_SCAN_CODE_MAP@@@
};
...@@ -93,6 +93,46 @@ $otherComments static const LogicalKeyboardKey ${entry.constantName} = LogicalK ...@@ -93,6 +93,46 @@ $otherComments static const LogicalKeyboardKey ${entry.constantName} = LogicalK
return keyCodeMap.toString().trimRight(); return keyCodeMap.toString().trimRight();
} }
/// This generates the map of GLFW number pad key codes to logical keys.
String get glfwNumpadMap {
final StringBuffer glfwNumpadMap = StringBuffer();
final List<Key> onlyNumpads = keyData.data.where((Key entry) {
return entry.constantName.startsWith('numpad') && entry.keyLabel != null;
}).toList();
for (Key entry in onlyNumpads) {
if (entry.glfwKeyCodes != null) {
for (int code in entry.glfwKeyCodes.cast<int>()) {
glfwNumpadMap.writeln(' $code: LogicalKeyboardKey.${entry.constantName},');
}
}
}
return glfwNumpadMap.toString().trimRight();
}
/// This generates the map of GLFW key codes to logical keys.
String get glfwKeyCodeMap {
final StringBuffer glfwKeyCodeMap = StringBuffer();
for (Key entry in keyData.data) {
if (entry.glfwKeyCodes != null) {
for (int code in entry.glfwKeyCodes.cast<int>()) {
glfwKeyCodeMap.writeln(' $code: LogicalKeyboardKey.${entry.constantName},');
}
}
}
return glfwKeyCodeMap.toString().trimRight();
}
/// This generates the map of XKB USB HID codes to physical keys.
String get xkbScanCodeMap {
final StringBuffer xkbScanCodeMap = StringBuffer();
for (Key entry in keyData.data) {
if (entry.xKbScanCode != null) {
xkbScanCodeMap.writeln(' ${toHex(entry.xKbScanCode)}: PhysicalKeyboardKey.${entry.constantName},');
}
}
return xkbScanCodeMap.toString().trimRight();
}
/// This generates the map of Android key codes to logical keys. /// This generates the map of Android key codes to logical keys.
String get androidKeyCodeMap { String get androidKeyCodeMap {
final StringBuffer androidKeyCodeMap = StringBuffer(); final StringBuffer androidKeyCodeMap = StringBuffer();
...@@ -210,6 +250,9 @@ $otherComments static const LogicalKeyboardKey ${entry.constantName} = LogicalK ...@@ -210,6 +250,9 @@ $otherComments static const LogicalKeyboardKey ${entry.constantName} = LogicalK
'FUCHSIA_KEY_CODE_MAP': fuchsiaKeyCodeMap, 'FUCHSIA_KEY_CODE_MAP': fuchsiaKeyCodeMap,
'MACOS_SCAN_CODE_MAP': macOsScanCodeMap, 'MACOS_SCAN_CODE_MAP': macOsScanCodeMap,
'MACOS_NUMPAD_MAP': macOsNumpadMap, 'MACOS_NUMPAD_MAP': macOsNumpadMap,
'GLFW_KEY_CODE_MAP': glfwKeyCodeMap,
'GLFW_NUMPAD_MAP': glfwNumpadMap,
'XKB_SCAN_CODE_MAP': xkbScanCodeMap,
}; };
final String template = File(path.join(flutterRoot.path, 'dev', 'tools', 'gen_keycodes', 'data', 'keyboard_maps.tmpl')).readAsStringSync(); final String template = File(path.join(flutterRoot.path, 'dev', 'tools', 'gen_keycodes', 'data', 'keyboard_maps.tmpl')).readAsStringSync();
......
...@@ -26,14 +26,25 @@ class KeyData { ...@@ -26,14 +26,25 @@ class KeyData {
String androidKeyboardLayout, String androidKeyboardLayout,
String androidKeyCodeHeader, String androidKeyCodeHeader,
String androidNameMap, String androidNameMap,
String glfwKeyCodeHeader,
String glfwNameMap
) : assert(chromiumHidCodes != null), ) : assert(chromiumHidCodes != null),
assert(androidKeyboardLayout != null), assert(androidKeyboardLayout != null),
assert(androidKeyCodeHeader != null), assert(androidKeyCodeHeader != null),
assert(androidNameMap != null) { assert(androidNameMap != null),
assert(glfwKeyCodeHeader != null),
assert(glfwNameMap != null) {
_nameToAndroidScanCodes = _readAndroidScanCodes(androidKeyboardLayout); _nameToAndroidScanCodes = _readAndroidScanCodes(androidKeyboardLayout);
_nameToAndroidKeyCode = _readAndroidKeyCodes(androidKeyCodeHeader); _nameToAndroidKeyCode = _readAndroidKeyCodes(androidKeyCodeHeader);
final Map<String, List<dynamic>> dynamicNames = json.decode(androidNameMap).cast<String, List<dynamic>>(); _nameToGlfwKeyCode = _readGlfwKeyCodes(glfwKeyCodeHeader);
_nameToAndroidName = dynamicNames.map<String, List<String>>((String key, List<dynamic> value) { // Cast Android dom map
final Map<String, List<dynamic>> dynamicAndroidNames = json.decode(androidNameMap).cast<String, List<dynamic>>();
_nameToAndroidName = dynamicAndroidNames.map<String, List<String>>((String key, List<dynamic> value) {
return MapEntry<String, List<String>>(key, value.cast<String>());
});
// Cast GLFW dom map
final Map<String, List<dynamic>> dynamicGlfwNames = json.decode(glfwNameMap).cast<String, List<dynamic>>();
_nameToGlfwName = dynamicGlfwNames.map<String, List<String>>((String key, List<dynamic> value) {
return MapEntry<String, List<String>>(key, value.cast<String>()); return MapEntry<String, List<String>>(key, value.cast<String>());
}); });
data = _readHidEntries(chromiumHidCodes); data = _readHidEntries(chromiumHidCodes);
...@@ -51,6 +62,7 @@ class KeyData { ...@@ -51,6 +62,7 @@ class KeyData {
/// [KeyData.fromJson]. /// [KeyData.fromJson].
Map<String, dynamic> toJson() { Map<String, dynamic> toJson() {
for (Key entry in data) { for (Key entry in data) {
// Android Key names
entry.androidKeyNames = _nameToAndroidName[entry.constantName]?.cast<String>(); entry.androidKeyNames = _nameToAndroidName[entry.constantName]?.cast<String>();
if (entry.androidKeyNames != null && entry.androidKeyNames.isNotEmpty) { if (entry.androidKeyNames != null && entry.androidKeyNames.isNotEmpty) {
for (String androidKeyName in entry.androidKeyNames) { for (String androidKeyName in entry.androidKeyNames) {
...@@ -64,6 +76,17 @@ class KeyData { ...@@ -64,6 +76,17 @@ class KeyData {
} }
} }
} }
// GLFW key names
entry.glfwKeyNames = _nameToGlfwName[entry.constantName]?.cast<String>();
if (entry.glfwKeyNames != null && entry.glfwKeyNames.isNotEmpty) {
for (String glfwKeyName in entry.glfwKeyNames) {
if (_nameToGlfwKeyCode[glfwKeyName] != null) {
entry.glfwKeyCodes ??= <int>[];
entry.glfwKeyCodes.add(_nameToGlfwKeyCode[glfwKeyName]);
}
}
}
} }
final Map<String, dynamic> outputMap = <String, dynamic>{}; final Map<String, dynamic> outputMap = <String, dynamic>{};
...@@ -83,6 +106,13 @@ class KeyData { ...@@ -83,6 +106,13 @@ class KeyData {
/// JSON. /// JSON.
Map<String, List<String>> _nameToAndroidName; Map<String, List<String>> _nameToAndroidName;
/// The mapping from the Flutter name (e.g. "eject") to the GLFW name (e.g.
/// "GLFW_MEDIA_EJECT").
///
/// Only populated if data is parsed from the source files, not if parsed from
/// JSON.
Map<String, List<String>> _nameToGlfwName;
/// The mapping from the Android name (e.g. "MEDIA_EJECT") to the integer scan /// The mapping from the Android name (e.g. "MEDIA_EJECT") to the integer scan
/// code (physical location) of the key. /// code (physical location) of the key.
/// ///
...@@ -97,6 +127,13 @@ class KeyData { ...@@ -97,6 +127,13 @@ class KeyData {
/// JSON. /// JSON.
Map<String, int> _nameToAndroidKeyCode; Map<String, int> _nameToAndroidKeyCode;
/// The mapping from GLFW name (e.g. "GLFW_KEY_COMMA") to the integer key code
/// (logical meaning) of the key.
///
/// Only populated if data is parsed from the source files, not if parsed from
/// JSON.
Map<String, int> _nameToGlfwKeyCode;
/// Parses entries from Androids Generic.kl scan code data file. /// Parses entries from Androids Generic.kl scan code data file.
/// ///
/// Lines in this file look like this (without the ///): /// Lines in this file look like this (without the ///):
...@@ -147,6 +184,30 @@ class KeyData { ...@@ -147,6 +184,30 @@ class KeyData {
return result; return result;
} }
/// Parses entries from GLFW's keycodes.h key code data file.
///
/// Lines in this file look like this (without the ///):
/// /** Space key. */
/// #define GLFW_KEY_SPACE 32,
Map<String, int> _readGlfwKeyCodes(String headerFile) {
// Only get the KEY definitions, ignore the rest (mouse, joystick, etc).
final RegExp enumEntry = RegExp(r'''define GLFW_KEY_([A-Z0-9_]+)\s*([A-Z0-9_]+),?''');
final Map<String, dynamic> replaced = <String, dynamic>{};
headerFile.replaceAllMapped(enumEntry, (Match match) {
replaced[match.group(1)] = int.tryParse(match.group(2)) ?? match.group(2).replaceAll('GLFW_KEY_', '');
});
final Map<String, int> result = <String, int>{};
replaced.forEach((String key, dynamic value) {
// Some definition values point to other definitions (e.g #define GLFW_KEY_LAST GLFW_KEY_MENU).
if (value is String) {
result[key] = replaced[value];
} else {
result[key] = value;
}
});
return result;
}
/// Parses entries from Chromium's HID code mapping header file. /// Parses entries from Chromium's HID code mapping header file.
/// ///
/// Lines in this file look like this (without the ///): /// Lines in this file look like this (without the ///):
...@@ -211,6 +272,8 @@ class Key { ...@@ -211,6 +272,8 @@ class Key {
this.androidKeyNames, this.androidKeyNames,
this.androidScanCodes, this.androidScanCodes,
this.androidKeyCodes, this.androidKeyCodes,
this.glfwKeyNames,
this.glfwKeyCodes,
}) : assert(usbHidCode != null), }) : assert(usbHidCode != null),
assert(chromiumName != null), assert(chromiumName != null),
_constantName = enumName; _constantName = enumName;
...@@ -261,6 +324,15 @@ class Key { ...@@ -261,6 +324,15 @@ class Key {
/// code value. /// code value.
List<int> androidScanCodes; List<int> androidScanCodes;
/// The list of names that GFLW gives to this key (symbol names minus the
/// prefix).
List<String> glfwKeyNames;
/// The list of GLFW key codes matching this key, created by looking up the
/// Linux name in the Chromium data, and substituting the GLFW key code
/// value.
List<int> glfwKeyCodes;
/// Creates a JSON map from the key data. /// Creates a JSON map from the key data.
Map<String, dynamic> toJson() { Map<String, dynamic> toJson() {
return <String, dynamic>{ return <String, dynamic>{
...@@ -269,6 +341,7 @@ class Key { ...@@ -269,6 +341,7 @@ class Key {
'android': androidKeyNames, 'android': androidKeyNames,
'english': commentName, 'english': commentName,
'chromium': chromiumName, 'chromium': chromiumName,
'glfw': glfwKeyNames,
}, },
'scanCodes': <String, dynamic>{ 'scanCodes': <String, dynamic>{
'android': androidScanCodes, 'android': androidScanCodes,
...@@ -280,6 +353,7 @@ class Key { ...@@ -280,6 +353,7 @@ class Key {
}, },
'keyCodes': <String, List<int>>{ 'keyCodes': <String, List<int>>{
'android': androidKeyCodes, 'android': androidKeyCodes,
'glfw': glfwKeyCodes,
}, },
}; };
} }
...@@ -337,8 +411,8 @@ class Key { ...@@ -337,8 +411,8 @@ class Key {
@override @override
String toString() { String toString() {
return """'$constantName': (name: "$name", usbHidCode: ${toHex(usbHidCode)}, """ return """'$constantName': (name: "$name", usbHidCode: ${toHex(usbHidCode)}, """
'''linuxKeyCode: ${toHex(linuxScanCode)}, xKbKeyCode: ${toHex(xKbScanCode)}, ''' '''linuxScanCode: ${toHex(linuxScanCode)}, xKbScanCode: ${toHex(xKbScanCode)}, '''
'''windowsKeyCode: ${toHex(windowsScanCode)}, macOsKeyCode: ${toHex(macOsScanCode)}, ''' '''windowsKeyCode: ${toHex(windowsScanCode)}, macOsScanCode: ${toHex(macOsScanCode)}, '''
'''chromiumSymbolName: $chromiumName'''; '''chromiumSymbolName: $chromiumName''';
} }
......
...@@ -24,6 +24,7 @@ export 'src/services/platform_views.dart'; ...@@ -24,6 +24,7 @@ export 'src/services/platform_views.dart';
export 'src/services/raw_keyboard.dart'; export 'src/services/raw_keyboard.dart';
export 'src/services/raw_keyboard_android.dart'; export 'src/services/raw_keyboard_android.dart';
export 'src/services/raw_keyboard_fuchsia.dart'; export 'src/services/raw_keyboard_fuchsia.dart';
export 'src/services/raw_keyboard_linux.dart';
export 'src/services/raw_keyboard_macos.dart'; export 'src/services/raw_keyboard_macos.dart';
export 'src/services/system_channels.dart'; export 'src/services/system_channels.dart';
export 'src/services/system_chrome.dart'; export 'src/services/system_chrome.dart';
......
...@@ -843,9 +843,7 @@ const Map<int, PhysicalKeyboardKey> kFuchsiaToPhysicalKey = <int, PhysicalKeyboa ...@@ -843,9 +843,7 @@ const Map<int, PhysicalKeyboardKey> kFuchsiaToPhysicalKey = <int, PhysicalKeyboa
0x000c028c: PhysicalKeyboardKey.mailSend, 0x000c028c: PhysicalKeyboardKey.mailSend,
}; };
/// Maps macOS-specific key code values representing [PhysicalKeyboardKey]. /// 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>{ const Map<int, PhysicalKeyboardKey> kMacOsToPhysicalKey = <int, PhysicalKeyboardKey>{
0x00000000: PhysicalKeyboardKey.keyA, 0x00000000: PhysicalKeyboardKey.keyA,
0x0000000b: PhysicalKeyboardKey.keyB, 0x0000000b: PhysicalKeyboardKey.keyB,
...@@ -989,3 +987,353 @@ const Map<int, LogicalKeyboardKey> kMacOsNumPadMap = <int, LogicalKeyboardKey>{ ...@@ -989,3 +987,353 @@ const Map<int, LogicalKeyboardKey> kMacOsNumPadMap = <int, LogicalKeyboardKey>{
0x00000051: LogicalKeyboardKey.numpadEqual, 0x00000051: LogicalKeyboardKey.numpadEqual,
0x0000005f: LogicalKeyboardKey.numpadComma, 0x0000005f: LogicalKeyboardKey.numpadComma,
}; };
/// Maps GLFW-specific key codes to the matching [LogicalKeyboardKey].
const Map<int, LogicalKeyboardKey> kGlfwToLogicalKey = <int, LogicalKeyboardKey>{
65: LogicalKeyboardKey.keyA,
66: LogicalKeyboardKey.keyB,
67: LogicalKeyboardKey.keyC,
68: LogicalKeyboardKey.keyD,
69: LogicalKeyboardKey.keyE,
70: LogicalKeyboardKey.keyF,
71: LogicalKeyboardKey.keyG,
72: LogicalKeyboardKey.keyH,
73: LogicalKeyboardKey.keyI,
74: LogicalKeyboardKey.keyJ,
75: LogicalKeyboardKey.keyK,
76: LogicalKeyboardKey.keyL,
77: LogicalKeyboardKey.keyM,
78: LogicalKeyboardKey.keyN,
79: LogicalKeyboardKey.keyO,
80: LogicalKeyboardKey.keyP,
81: LogicalKeyboardKey.keyQ,
82: LogicalKeyboardKey.keyR,
83: LogicalKeyboardKey.keyS,
84: LogicalKeyboardKey.keyT,
85: LogicalKeyboardKey.keyU,
86: LogicalKeyboardKey.keyV,
87: LogicalKeyboardKey.keyW,
88: LogicalKeyboardKey.keyX,
89: LogicalKeyboardKey.keyY,
90: LogicalKeyboardKey.keyZ,
49: LogicalKeyboardKey.digit1,
50: LogicalKeyboardKey.digit2,
51: LogicalKeyboardKey.digit3,
52: LogicalKeyboardKey.digit4,
53: LogicalKeyboardKey.digit5,
54: LogicalKeyboardKey.digit6,
55: LogicalKeyboardKey.digit7,
56: LogicalKeyboardKey.digit8,
57: LogicalKeyboardKey.digit9,
48: LogicalKeyboardKey.digit0,
257: LogicalKeyboardKey.enter,
256: LogicalKeyboardKey.escape,
259: LogicalKeyboardKey.backspace,
258: LogicalKeyboardKey.tab,
32: LogicalKeyboardKey.space,
45: LogicalKeyboardKey.minus,
61: LogicalKeyboardKey.equal,
91: LogicalKeyboardKey.bracketLeft,
93: LogicalKeyboardKey.bracketRight,
92: LogicalKeyboardKey.backslash,
59: LogicalKeyboardKey.semicolon,
39: LogicalKeyboardKey.quote,
96: LogicalKeyboardKey.backquote,
44: LogicalKeyboardKey.comma,
46: LogicalKeyboardKey.period,
47: LogicalKeyboardKey.slash,
280: LogicalKeyboardKey.capsLock,
290: LogicalKeyboardKey.f1,
291: LogicalKeyboardKey.f2,
292: LogicalKeyboardKey.f3,
293: LogicalKeyboardKey.f4,
294: LogicalKeyboardKey.f5,
295: LogicalKeyboardKey.f6,
296: LogicalKeyboardKey.f7,
297: LogicalKeyboardKey.f8,
298: LogicalKeyboardKey.f9,
299: LogicalKeyboardKey.f10,
300: LogicalKeyboardKey.f11,
301: LogicalKeyboardKey.f12,
283: LogicalKeyboardKey.printScreen,
284: LogicalKeyboardKey.pause,
260: LogicalKeyboardKey.insert,
268: LogicalKeyboardKey.home,
266: LogicalKeyboardKey.pageUp,
261: LogicalKeyboardKey.delete,
269: LogicalKeyboardKey.end,
267: LogicalKeyboardKey.pageDown,
262: LogicalKeyboardKey.arrowRight,
263: LogicalKeyboardKey.arrowLeft,
264: LogicalKeyboardKey.arrowDown,
265: LogicalKeyboardKey.arrowUp,
282: LogicalKeyboardKey.numLock,
331: LogicalKeyboardKey.numpadDivide,
332: LogicalKeyboardKey.numpadMultiply,
334: LogicalKeyboardKey.numpadAdd,
335: LogicalKeyboardKey.numpadEnter,
321: LogicalKeyboardKey.numpad1,
322: LogicalKeyboardKey.numpad2,
323: LogicalKeyboardKey.numpad3,
324: LogicalKeyboardKey.numpad4,
325: LogicalKeyboardKey.numpad5,
326: LogicalKeyboardKey.numpad6,
327: LogicalKeyboardKey.numpad7,
328: LogicalKeyboardKey.numpad8,
329: LogicalKeyboardKey.numpad9,
320: LogicalKeyboardKey.numpad0,
330: LogicalKeyboardKey.numpadDecimal,
348: LogicalKeyboardKey.contextMenu,
336: LogicalKeyboardKey.numpadEqual,
302: LogicalKeyboardKey.f13,
303: LogicalKeyboardKey.f14,
304: LogicalKeyboardKey.f15,
305: LogicalKeyboardKey.f16,
306: LogicalKeyboardKey.f17,
307: LogicalKeyboardKey.f18,
308: LogicalKeyboardKey.f19,
309: LogicalKeyboardKey.f20,
310: LogicalKeyboardKey.f21,
311: LogicalKeyboardKey.f22,
312: LogicalKeyboardKey.f23,
341: LogicalKeyboardKey.controlLeft,
340: LogicalKeyboardKey.shiftLeft,
342: LogicalKeyboardKey.altLeft,
345: LogicalKeyboardKey.controlRight,
344: LogicalKeyboardKey.shiftRight,
346: LogicalKeyboardKey.altRight,
};
/// A map of GLFW key codes which have printable representations, but appear
/// on the number pad. Used to provide different key objects for keys like
/// KEY_EQUALS and NUMPAD_EQUALS.
const Map<int, LogicalKeyboardKey> kGlfwNumpadMap = <int, LogicalKeyboardKey>{
331: LogicalKeyboardKey.numpadDivide,
332: LogicalKeyboardKey.numpadMultiply,
334: LogicalKeyboardKey.numpadAdd,
321: LogicalKeyboardKey.numpad1,
322: LogicalKeyboardKey.numpad2,
323: LogicalKeyboardKey.numpad3,
324: LogicalKeyboardKey.numpad4,
325: LogicalKeyboardKey.numpad5,
326: LogicalKeyboardKey.numpad6,
327: LogicalKeyboardKey.numpad7,
328: LogicalKeyboardKey.numpad8,
329: LogicalKeyboardKey.numpad9,
320: LogicalKeyboardKey.numpad0,
330: LogicalKeyboardKey.numpadDecimal,
336: LogicalKeyboardKey.numpadEqual,
};
/// Maps XKB specific key code values representing [PhysicalKeyboardKey].
const Map<int, PhysicalKeyboardKey> kLinuxToPhysicalKey = <int, PhysicalKeyboardKey>{
0x0000024f: PhysicalKeyboardKey.launchAssistant,
0x00000096: PhysicalKeyboardKey.sleep,
0x00000097: PhysicalKeyboardKey.wakeUp,
0x00000026: PhysicalKeyboardKey.keyA,
0x00000038: PhysicalKeyboardKey.keyB,
0x00000036: PhysicalKeyboardKey.keyC,
0x00000028: PhysicalKeyboardKey.keyD,
0x0000001a: PhysicalKeyboardKey.keyE,
0x00000029: PhysicalKeyboardKey.keyF,
0x0000002a: PhysicalKeyboardKey.keyG,
0x0000002b: PhysicalKeyboardKey.keyH,
0x0000001f: PhysicalKeyboardKey.keyI,
0x0000002c: PhysicalKeyboardKey.keyJ,
0x0000002d: PhysicalKeyboardKey.keyK,
0x0000002e: PhysicalKeyboardKey.keyL,
0x0000003a: PhysicalKeyboardKey.keyM,
0x00000039: PhysicalKeyboardKey.keyN,
0x00000020: PhysicalKeyboardKey.keyO,
0x00000021: PhysicalKeyboardKey.keyP,
0x00000018: PhysicalKeyboardKey.keyQ,
0x0000001b: PhysicalKeyboardKey.keyR,
0x00000027: PhysicalKeyboardKey.keyS,
0x0000001c: PhysicalKeyboardKey.keyT,
0x0000001e: PhysicalKeyboardKey.keyU,
0x00000037: PhysicalKeyboardKey.keyV,
0x00000019: PhysicalKeyboardKey.keyW,
0x00000035: PhysicalKeyboardKey.keyX,
0x0000001d: PhysicalKeyboardKey.keyY,
0x00000034: PhysicalKeyboardKey.keyZ,
0x0000000a: PhysicalKeyboardKey.digit1,
0x0000000b: PhysicalKeyboardKey.digit2,
0x0000000c: PhysicalKeyboardKey.digit3,
0x0000000d: PhysicalKeyboardKey.digit4,
0x0000000e: PhysicalKeyboardKey.digit5,
0x0000000f: PhysicalKeyboardKey.digit6,
0x00000010: PhysicalKeyboardKey.digit7,
0x00000011: PhysicalKeyboardKey.digit8,
0x00000012: PhysicalKeyboardKey.digit9,
0x00000013: PhysicalKeyboardKey.digit0,
0x00000024: PhysicalKeyboardKey.enter,
0x00000009: PhysicalKeyboardKey.escape,
0x00000016: PhysicalKeyboardKey.backspace,
0x00000017: PhysicalKeyboardKey.tab,
0x00000041: PhysicalKeyboardKey.space,
0x00000014: PhysicalKeyboardKey.minus,
0x00000015: PhysicalKeyboardKey.equal,
0x00000022: PhysicalKeyboardKey.bracketLeft,
0x00000023: PhysicalKeyboardKey.bracketRight,
0x00000033: PhysicalKeyboardKey.backslash,
0x0000002f: PhysicalKeyboardKey.semicolon,
0x00000030: PhysicalKeyboardKey.quote,
0x00000031: PhysicalKeyboardKey.backquote,
0x0000003b: PhysicalKeyboardKey.comma,
0x0000003c: PhysicalKeyboardKey.period,
0x0000003d: PhysicalKeyboardKey.slash,
0x00000042: PhysicalKeyboardKey.capsLock,
0x00000043: PhysicalKeyboardKey.f1,
0x00000044: PhysicalKeyboardKey.f2,
0x00000045: PhysicalKeyboardKey.f3,
0x00000046: PhysicalKeyboardKey.f4,
0x00000047: PhysicalKeyboardKey.f5,
0x00000048: PhysicalKeyboardKey.f6,
0x00000049: PhysicalKeyboardKey.f7,
0x0000004a: PhysicalKeyboardKey.f8,
0x0000004b: PhysicalKeyboardKey.f9,
0x0000004c: PhysicalKeyboardKey.f10,
0x0000005f: PhysicalKeyboardKey.f11,
0x00000060: PhysicalKeyboardKey.f12,
0x0000006b: PhysicalKeyboardKey.printScreen,
0x0000004e: PhysicalKeyboardKey.scrollLock,
0x0000007f: PhysicalKeyboardKey.pause,
0x00000076: PhysicalKeyboardKey.insert,
0x0000006e: PhysicalKeyboardKey.home,
0x00000070: PhysicalKeyboardKey.pageUp,
0x00000077: PhysicalKeyboardKey.delete,
0x00000073: PhysicalKeyboardKey.end,
0x00000075: PhysicalKeyboardKey.pageDown,
0x00000072: PhysicalKeyboardKey.arrowRight,
0x00000071: PhysicalKeyboardKey.arrowLeft,
0x00000074: PhysicalKeyboardKey.arrowDown,
0x0000006f: PhysicalKeyboardKey.arrowUp,
0x0000004d: PhysicalKeyboardKey.numLock,
0x0000006a: PhysicalKeyboardKey.numpadDivide,
0x0000003f: PhysicalKeyboardKey.numpadMultiply,
0x00000052: PhysicalKeyboardKey.numpadSubtract,
0x00000056: PhysicalKeyboardKey.numpadAdd,
0x00000068: PhysicalKeyboardKey.numpadEnter,
0x00000057: PhysicalKeyboardKey.numpad1,
0x00000058: PhysicalKeyboardKey.numpad2,
0x00000059: PhysicalKeyboardKey.numpad3,
0x00000053: PhysicalKeyboardKey.numpad4,
0x00000054: PhysicalKeyboardKey.numpad5,
0x00000055: PhysicalKeyboardKey.numpad6,
0x0000004f: PhysicalKeyboardKey.numpad7,
0x00000050: PhysicalKeyboardKey.numpad8,
0x00000051: PhysicalKeyboardKey.numpad9,
0x0000005a: PhysicalKeyboardKey.numpad0,
0x0000005b: PhysicalKeyboardKey.numpadDecimal,
0x0000005e: PhysicalKeyboardKey.intlBackslash,
0x00000087: PhysicalKeyboardKey.contextMenu,
0x0000007c: PhysicalKeyboardKey.power,
0x0000007d: PhysicalKeyboardKey.numpadEqual,
0x000000bf: PhysicalKeyboardKey.f13,
0x000000c0: PhysicalKeyboardKey.f14,
0x000000c1: PhysicalKeyboardKey.f15,
0x000000c2: PhysicalKeyboardKey.f16,
0x000000c3: PhysicalKeyboardKey.f17,
0x000000c4: PhysicalKeyboardKey.f18,
0x000000c5: PhysicalKeyboardKey.f19,
0x000000c6: PhysicalKeyboardKey.f20,
0x000000c7: PhysicalKeyboardKey.f21,
0x000000c8: PhysicalKeyboardKey.f22,
0x000000c9: PhysicalKeyboardKey.f23,
0x000000ca: PhysicalKeyboardKey.f24,
0x0000008e: PhysicalKeyboardKey.open,
0x00000092: PhysicalKeyboardKey.help,
0x0000008c: PhysicalKeyboardKey.select,
0x00000089: PhysicalKeyboardKey.again,
0x0000008b: PhysicalKeyboardKey.undo,
0x00000091: PhysicalKeyboardKey.cut,
0x0000008d: PhysicalKeyboardKey.copy,
0x0000008f: PhysicalKeyboardKey.paste,
0x00000090: PhysicalKeyboardKey.find,
0x00000079: PhysicalKeyboardKey.audioVolumeMute,
0x0000007b: PhysicalKeyboardKey.audioVolumeUp,
0x0000007a: PhysicalKeyboardKey.audioVolumeDown,
0x00000081: PhysicalKeyboardKey.numpadComma,
0x00000061: PhysicalKeyboardKey.intlRo,
0x00000065: PhysicalKeyboardKey.kanaMode,
0x00000084: PhysicalKeyboardKey.intlYen,
0x00000064: PhysicalKeyboardKey.convert,
0x00000066: PhysicalKeyboardKey.nonConvert,
0x00000082: PhysicalKeyboardKey.lang1,
0x00000083: PhysicalKeyboardKey.lang2,
0x00000062: PhysicalKeyboardKey.lang3,
0x00000063: PhysicalKeyboardKey.lang4,
0x0000005d: PhysicalKeyboardKey.lang5,
0x000000bb: PhysicalKeyboardKey.numpadParenLeft,
0x000000bc: PhysicalKeyboardKey.numpadParenRight,
0x0000007e: PhysicalKeyboardKey.numpadSignChange,
0x00000025: PhysicalKeyboardKey.controlLeft,
0x00000032: PhysicalKeyboardKey.shiftLeft,
0x00000040: PhysicalKeyboardKey.altLeft,
0x00000085: PhysicalKeyboardKey.metaLeft,
0x00000069: PhysicalKeyboardKey.controlRight,
0x0000003e: PhysicalKeyboardKey.shiftRight,
0x0000006c: PhysicalKeyboardKey.altRight,
0x00000086: PhysicalKeyboardKey.metaRight,
0x0000016e: PhysicalKeyboardKey.info,
0x0000017a: PhysicalKeyboardKey.closedCaptionToggle,
0x000000e9: PhysicalKeyboardKey.brightnessUp,
0x000000e8: PhysicalKeyboardKey.brightnessDown,
0x000001b7: PhysicalKeyboardKey.brightnessToggle,
0x00000258: PhysicalKeyboardKey.brightnessMinimum,
0x00000259: PhysicalKeyboardKey.brightnessMaximum,
0x000000fc: PhysicalKeyboardKey.brightnessAuto,
0x0000019d: PhysicalKeyboardKey.mediaLast,
0x000000b1: PhysicalKeyboardKey.launchPhone,
0x00000172: PhysicalKeyboardKey.programGuide,
0x000000b6: PhysicalKeyboardKey.exit,
0x000001a2: PhysicalKeyboardKey.channelUp,
0x000001a3: PhysicalKeyboardKey.channelDown,
0x000000d7: PhysicalKeyboardKey.mediaPlay,
0x000000af: PhysicalKeyboardKey.mediaRecord,
0x000000d8: PhysicalKeyboardKey.mediaFastForward,
0x000000b0: PhysicalKeyboardKey.mediaRewind,
0x000000ab: PhysicalKeyboardKey.mediaTrackNext,
0x000000ad: PhysicalKeyboardKey.mediaTrackPrevious,
0x000000ae: PhysicalKeyboardKey.mediaStop,
0x000000a9: PhysicalKeyboardKey.eject,
0x000000ac: PhysicalKeyboardKey.mediaPlayPause,
0x0000024e: PhysicalKeyboardKey.speechInputToggle,
0x000000d9: PhysicalKeyboardKey.bassBoost,
0x000000b3: PhysicalKeyboardKey.mediaSelect,
0x000001ad: PhysicalKeyboardKey.launchWordProcessor,
0x000001af: PhysicalKeyboardKey.launchSpreadsheet,
0x000000a3: PhysicalKeyboardKey.launchMail,
0x000001b5: PhysicalKeyboardKey.launchContacts,
0x00000195: PhysicalKeyboardKey.launchCalendar,
0x00000094: PhysicalKeyboardKey.launchApp2,
0x00000098: PhysicalKeyboardKey.launchApp1,
0x0000009e: PhysicalKeyboardKey.launchInternetBrowser,
0x000001b9: PhysicalKeyboardKey.logOff,
0x000000a0: PhysicalKeyboardKey.lockScreen,
0x0000024b: PhysicalKeyboardKey.launchControlPanel,
0x0000024c: PhysicalKeyboardKey.selectTask,
0x000000f3: PhysicalKeyboardKey.launchDocuments,
0x000001b8: PhysicalKeyboardKey.spellCheck,
0x0000017e: PhysicalKeyboardKey.launchKeyboardLayout,
0x0000024d: PhysicalKeyboardKey.launchScreenSaver,
0x00000190: PhysicalKeyboardKey.launchAudioBrowser,
0x000000bd: PhysicalKeyboardKey.newKey,
0x000000d6: PhysicalKeyboardKey.close,
0x000000f2: PhysicalKeyboardKey.save,
0x000000da: PhysicalKeyboardKey.print,
0x000000e1: PhysicalKeyboardKey.browserSearch,
0x000000b4: PhysicalKeyboardKey.browserHome,
0x000000a6: PhysicalKeyboardKey.browserBack,
0x000000a7: PhysicalKeyboardKey.browserForward,
0x00000088: PhysicalKeyboardKey.browserStop,
0x000000b5: PhysicalKeyboardKey.browserRefresh,
0x000000a4: PhysicalKeyboardKey.browserFavorites,
0x000001aa: PhysicalKeyboardKey.zoomIn,
0x000001ab: PhysicalKeyboardKey.zoomOut,
0x000000be: PhysicalKeyboardKey.redo,
0x000000f0: PhysicalKeyboardKey.mailReply,
0x000000f1: PhysicalKeyboardKey.mailForward,
0x000000ef: PhysicalKeyboardKey.mailSend,
};
...@@ -9,6 +9,7 @@ import 'package:flutter/foundation.dart'; ...@@ -9,6 +9,7 @@ import 'package:flutter/foundation.dart';
import 'keyboard_key.dart'; import 'keyboard_key.dart';
import 'raw_keyboard_android.dart'; import 'raw_keyboard_android.dart';
import 'raw_keyboard_fuchsia.dart'; import 'raw_keyboard_fuchsia.dart';
import 'raw_keyboard_linux.dart';
import 'raw_keyboard_macos.dart'; import 'raw_keyboard_macos.dart';
import 'system_channels.dart'; import 'system_channels.dart';
...@@ -272,6 +273,14 @@ abstract class RawKeyEvent { ...@@ -272,6 +273,14 @@ abstract class RawKeyEvent {
keyCode: message['keyCode'] ?? 0, keyCode: message['keyCode'] ?? 0,
modifiers: message['modifiers'] ?? 0); modifiers: message['modifiers'] ?? 0);
break; break;
case 'linux':
data = RawKeyEventDataLinux(
keyHelper: KeyHelper(message['toolkit'] ?? ''),
codePoint: message['codePoint'] ?? 0,
keyCode: message['keyCode'] ?? 0,
scanCode: message['scanCode'] ?? 0,
modifiers: message['modifiers'] ?? 0);
break;
default: default:
// We don't yet implement raw key events on iOS or other platforms, but // We don't yet implement raw key events on iOS or other platforms, but
// we don't hit this exception because the engine never sends us these // we don't hit this exception because the engine never sends us these
......
// Copyright 2019 The Chromium Authors. All rights reserved.
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.
import 'package:flutter/foundation.dart';
import 'keyboard_key.dart';
import 'keyboard_maps.dart';
import 'raw_keyboard.dart';
/// Platform-specific key event data for Linux.
///
/// Different window toolkit implementations can map to different key codes. This class
/// will use the correct mapping depending on the [toolkit] provided.
///
/// See also:
///
/// * [RawKeyboard], which uses this interface to expose key data.
class RawKeyEventDataLinux extends RawKeyEventData {
/// Creates a key event data structure specific for macOS.
///
/// The [toolkit], [scanCode], [codePoint], [keyCode], and [modifiers], arguments
/// must not be null.
const RawKeyEventDataLinux({
@required this.keyHelper,
this.scanCode = 0,
this.codePoint = 0,
this.keyCode = 0,
this.modifiers = 0,
}) : assert(scanCode != null),
assert(codePoint != null),
assert(keyCode != null),
assert(modifiers != null),
assert(keyHelper != null);
/// A helper class that abstracts the fetching of the toolkit-specific mappings.
///
/// There is no real concept of a "native" window toolkit on Linux, and each implementation
/// (GLFW, GTK, QT, etc) may have a different key code mapping.
final KeyHelper keyHelper;
/// The hardware scan code id corresponding to this key event.
///
/// These values are not reliable and vary from device to device, so this
/// information is mainly useful for debugging.
final int scanCode;
/// The Unicode code point represented by the key event, if any.
///
/// If there is no Unicode code point, this value is zero.
///
/// Dead keys are represented as Unicode combining characters.
final int codePoint;
/// The hardware key code corresponding to this key event.
///
/// This is the physical key that was pressed, not the Unicode character.
/// See [codePoint] for the Unicode character. This value may be different depending
/// on the window toolkit used (See [toolkit]).
final int keyCode;
/// A mask of the current modifiers using the values in Modifier Flags.
/// This value may be different depending on the window toolkit used (See [toolkit]).
final int modifiers;
@override
String get keyLabel => codePoint == 0 ? null : String.fromCharCode(codePoint);
@override
PhysicalKeyboardKey get physicalKey => kLinuxToPhysicalKey[scanCode] ?? PhysicalKeyboardKey.none;
@override
LogicalKeyboardKey get logicalKey {
// Look to see if the keyCode is a printable number pad key, so that a
// difference between regular keys (e.g. "=") and the number pad version
// (e.g. the "=" on the number pad) can be determined.
final LogicalKeyboardKey numPadKey = keyHelper.numpadKey(keyCode);
if (numPadKey != null) {
return numPadKey;
}
// If it has a non-control-character label, then either return the existing
// constant, or construct a new Unicode-based key from it. Don't mark it as
// autogenerated, since the label uniquely identifies an ID from the Unicode
// plane.
if (keyLabel != null &&
!LogicalKeyboardKey.isControlCharacter(keyLabel)) {
final int keyId = LogicalKeyboardKey.unicodePlane | (codePoint & LogicalKeyboardKey.valueMask);
return LogicalKeyboardKey.findKeyByKeyId(keyId) ?? LogicalKeyboardKey(
keyId,
keyLabel: keyLabel,
debugName: kReleaseMode ? null : 'Key ${keyLabel.toUpperCase()}',
);
}
// Look to see if the keyCode is one we know about and have a mapping for.
LogicalKeyboardKey newKey = keyHelper.logicalKey(keyCode);
if (newKey != null) {
return newKey;
}
const int linuxKeyIdPlane = 0x00600000000;
// This is a non-printable key that we don't know about, so we mint a new
// code with the autogenerated bit set.
newKey ??= LogicalKeyboardKey(
linuxKeyIdPlane | keyCode | LogicalKeyboardKey.autogeneratedMask,
debugName: kReleaseMode ? null : 'Unknown key code $keyCode',
);
return newKey;
}
@override
bool isModifierPressed(ModifierKey key, {KeyboardSide side = KeyboardSide.any}) {
return keyHelper.isModifierPressed(key, modifiers, side: side);
}
@override
KeyboardSide getModifierSide(ModifierKey key) {
return keyHelper.getModifierSide(key);
}
@override
String toString() {
return '$runtimeType(keyLabel: $keyLabel, keyCode: $keyCode, scanCode: $scanCode,'
' codePoint: $codePoint, modifiers: $modifiers, '
'modifiers down: $modifiersPressed)';
}
}
/// Abstract class for window-specific key mappings.
///
/// Given that there might be multiple window toolkit implementations (GLFW,
/// GTK, QT, etc), this creates a common interface for each of the
/// different toolkits.
abstract class KeyHelper {
/// Create a KeyHelper implementation depending on the given toolkit.
factory KeyHelper(String toolkit) {
if (toolkit == 'glfw') {
return GLFWKeyHelper();
} else {
throw FlutterError('Window toolkit not recognized: $toolkit');
}
}
/// Returns a [KeyboardSide] enum value that describes which side or sides of
/// the given keyboard modifier key were pressed at the time of this event.
KeyboardSide getModifierSide(ModifierKey key);
/// Returns true if the given [ModifierKey] was pressed at the time of this
/// event.
bool isModifierPressed(ModifierKey key, int modifiers, {KeyboardSide side = KeyboardSide.any});
/// The numpad key from the specific key code mapping.
LogicalKeyboardKey numpadKey(int keyCode);
/// The logical key key from the specific key code mapping.
LogicalKeyboardKey logicalKey(int keyCode);
}
/// Helper class that uses GLFW-specific key mappings.
class GLFWKeyHelper with KeyHelper {
/// This mask is used to check the [modifiers] field to test whether the CAPS
/// LOCK modifier key is on.
///
/// {@template flutter.services.logicalKeyboardKey.modifiers}
/// Use this value if you need to decode the [modifiers] field yourself, but
/// it's much easier to use [isModifierPressed] if you just want to know if
/// a modifier is pressed.
/// {@endtemplate}
static const int modifierCapsLock = 0x0010;
/// This mask is used to check the [modifiers] field to test whether one of the
/// SHIFT modifier keys is pressed.
///
/// {@macro flutter.services.logicalKeyboardKey.modifiers}
static const int modifierShift = 0x0001;
/// This mask is used to check the [modifiers] field to test whether one of the
/// CTRL modifier keys is pressed.
///
/// {@macro flutter.services.logicalKeyboardKey.modifiers}
static const int modifierControl = 0x0002;
/// This mask is used to check the [modifiers] field to test whether one of the
/// ALT modifier keys is pressed.
///
/// {@macro flutter.services.logicalKeyboardKey.modifiers}
static const int modifierAlt = 0x0004;
/// This mask is used to check the [modifiers] field to test whether one of the
/// Meta(SUPER) modifier keys is pressed.
///
/// {@macro flutter.services.logicalKeyboardKey.modifiers}
static const int modifierMeta = 0x0008;
/// This mask is used to check the [modifiers] field to test whether any key in
/// the numeric keypad is pressed.
///
/// {@macro flutter.services.logicalKeyboardKey.modifiers}
static const int modifierNumericPad = 0x0020;
@override
bool isModifierPressed(ModifierKey key, int modifiers, {KeyboardSide side = KeyboardSide.any}) {
switch (key) {
case ModifierKey.controlModifier:
return modifiers & modifierControl != 0;
case ModifierKey.shiftModifier:
return modifiers & modifierShift != 0;
case ModifierKey.altModifier:
return modifiers & modifierAlt != 0;
case ModifierKey.metaModifier:
return modifiers & modifierMeta != 0;
case ModifierKey.capsLockModifier:
return modifiers & modifierCapsLock != 0;
case ModifierKey.numLockModifier:
return modifiers & modifierNumericPad != 0;
case ModifierKey.functionModifier:
case ModifierKey.symbolModifier:
case ModifierKey.scrollLockModifier:
// These are not used in GLFW keyboards.
return false;
}
return false;
}
@override
KeyboardSide getModifierSide(ModifierKey key) {
switch (key) {
case ModifierKey.controlModifier:
case ModifierKey.shiftModifier:
case ModifierKey.altModifier:
case ModifierKey.metaModifier:
// Neither GLFW or X11 provide a distiction between left and right modifiers, so defaults to KeyboardSide.any.
// https://code.woboq.org/qt5/include/X11/X.h.html#_M/ShiftMask
return KeyboardSide.any;
case ModifierKey.capsLockModifier:
case ModifierKey.numLockModifier:
case ModifierKey.functionModifier:
case ModifierKey.symbolModifier:
case ModifierKey.scrollLockModifier:
return KeyboardSide.all;
}
assert(false, 'Not handling $key type properly.');
return null;
}
@override
LogicalKeyboardKey numpadKey(int keyCode) {
return kGlfwNumpadMap[keyCode];
}
@override
LogicalKeyboardKey logicalKey(int keyCode) {
return kGlfwToLogicalKey[keyCode];
}
}
...@@ -92,7 +92,7 @@ void main() { ...@@ -92,7 +92,7 @@ void main() {
expect( expect(
data.isModifierPressed(key, side: modifierTests[modifier].side), data.isModifierPressed(key, side: modifierTests[modifier].side),
isFalse, isFalse,
reason: '$key should not be pressed with metaState $modifier with metaState $modifier ' reason: '$key should not be pressed with metaState $modifier '
'and additional key ${RawKeyEventDataAndroid.modifierFunction}.', 'and additional key ${RawKeyEventDataAndroid.modifierFunction}.',
); );
} }
...@@ -264,7 +264,7 @@ void main() { ...@@ -264,7 +264,7 @@ void main() {
expect(data.keyLabel, isNull); expect(data.keyLabel, isNull);
}); });
}); });
group('RawKeyEventDataMacOs', () { group('RawKeyEventDataMacOs', () {
const Map<int, _ModifierCheck> modifierTests = <int, _ModifierCheck>{ const Map<int, _ModifierCheck> modifierTests = <int, _ModifierCheck>{
RawKeyEventDataMacOs.modifierOption | RawKeyEventDataMacOs.modifierLeftOption: _ModifierCheck(ModifierKey.altModifier, KeyboardSide.left), RawKeyEventDataMacOs.modifierOption | RawKeyEventDataMacOs.modifierLeftOption: _ModifierCheck(ModifierKey.altModifier, KeyboardSide.left),
RawKeyEventDataMacOs.modifierOption | RawKeyEventDataMacOs.modifierRightOption: _ModifierCheck(ModifierKey.altModifier, KeyboardSide.right), RawKeyEventDataMacOs.modifierOption | RawKeyEventDataMacOs.modifierRightOption: _ModifierCheck(ModifierKey.altModifier, KeyboardSide.right),
...@@ -340,7 +340,7 @@ void main() { ...@@ -340,7 +340,7 @@ void main() {
expect( expect(
data.isModifierPressed(key, side: modifierTests[modifier].side), data.isModifierPressed(key, side: modifierTests[modifier].side),
isFalse, isFalse,
reason: '$key should not be pressed with metaState $modifier with metaState $modifier ' reason: '$key should not be pressed with metaState $modifier '
'and additional key ${RawKeyEventDataMacOs.modifierFunction}.', 'and additional key ${RawKeyEventDataMacOs.modifierFunction}.',
); );
} }
...@@ -393,4 +393,129 @@ void main() { ...@@ -393,4 +393,129 @@ void main() {
expect(data.keyLabel, isNull); expect(data.keyLabel, isNull);
}); });
}); });
group('RawKeyEventDataLinux-GFLW', () {
const Map<int, _ModifierCheck> modifierTests = <int, _ModifierCheck>{
GLFWKeyHelper.modifierAlt: _ModifierCheck(ModifierKey.altModifier, KeyboardSide.any),
GLFWKeyHelper.modifierShift: _ModifierCheck(ModifierKey.shiftModifier, KeyboardSide.any),
GLFWKeyHelper.modifierControl: _ModifierCheck(ModifierKey.controlModifier, KeyboardSide.any),
GLFWKeyHelper.modifierMeta: _ModifierCheck(ModifierKey.metaModifier, KeyboardSide.any),
GLFWKeyHelper.modifierNumericPad: _ModifierCheck(ModifierKey.numLockModifier, KeyboardSide.all),
GLFWKeyHelper.modifierCapsLock: _ModifierCheck(ModifierKey.capsLockModifier, KeyboardSide.all),
};
test('modifier keys are recognized individually', () {
for (int modifier in modifierTests.keys) {
final RawKeyEvent event = RawKeyEvent.fromMessage(<String, dynamic>{
'type': 'keydown',
'keymap': 'linux',
'toolkit': 'glfw',
'keyCode': 0x04,
'scanCode': 0x01,
'codePoint': 0x10,
'modifiers': modifier,
});
final RawKeyEventDataLinux data = event.data;
for (ModifierKey key in ModifierKey.values) {
if (modifierTests[modifier].key == key) {
expect(
data.isModifierPressed(key, side: modifierTests[modifier].side),
isTrue,
reason: "$key should be pressed with metaState $modifier, but isn't.",
);
expect(data.getModifierSide(key), equals(modifierTests[modifier].side));
} else {
expect(
data.isModifierPressed(key, side: modifierTests[modifier].side),
isFalse,
reason: '$key should not be pressed with metaState $modifier.',
);
}
}
}
});
test('modifier keys are recognized when combined', () {
for (int modifier in modifierTests.keys) {
if (modifier == GLFWKeyHelper.modifierControl) {
// No need to combine CTRL key with itself.
continue;
}
final RawKeyEvent event = RawKeyEvent.fromMessage(<String, dynamic>{
'type': 'keydown',
'keymap': 'linux',
'toolkit': 'glfw',
'keyCode': 0x04,
'scanCode': 0x64,
'codePoint': 0x1,
'modifiers': modifier | GLFWKeyHelper.modifierControl,
});
final RawKeyEventDataLinux data = event.data;
for (ModifierKey key in ModifierKey.values) {
if (modifierTests[modifier].key == key || key == ModifierKey.controlModifier) {
expect(
data.isModifierPressed(key, side: modifierTests[modifier].side),
isTrue,
reason: '$key should be pressed with metaState $modifier '
"and additional key ${GLFWKeyHelper.modifierControl}, but isn't.",
);
if (key != ModifierKey.controlModifier) {
expect(data.getModifierSide(key), equals(modifierTests[modifier].side));
} else {
expect(data.getModifierSide(key), equals(KeyboardSide.any));
}
} else {
expect(
data.isModifierPressed(key, side: modifierTests[modifier].side),
isFalse,
reason: '$key should not be pressed with metaState $modifier '
'and additional key ${GLFWKeyHelper.modifierControl}.',
);
}
}
}
});
test('Printable keyboard keys are correctly translated', () {
final RawKeyEvent keyAEvent = RawKeyEvent.fromMessage(const <String, dynamic>{
'type': 'keydown',
'keymap': 'linux',
'toolkit': 'glfw',
'keyCode': 65,
'scanCode': 0x00000026,
'codePoint': 97,
'modifiers': 0x0,
});
final RawKeyEventDataLinux data = keyAEvent.data;
expect(data.physicalKey, equals(PhysicalKeyboardKey.keyA));
expect(data.logicalKey, equals(LogicalKeyboardKey.keyA));
expect(data.keyLabel, equals('a'));
});
test('Control keyboard keys are correctly translated', () {
final RawKeyEvent escapeKeyEvent = RawKeyEvent.fromMessage(const <String, dynamic>{
'type': 'keydown',
'keymap': 'linux',
'toolkit': 'glfw',
'keyCode': 256,
'scanCode': 0x00000009,
'codePoint': 0,
'modifiers': 0x0,
});
final RawKeyEventDataLinux data = escapeKeyEvent.data;
expect(data.physicalKey, equals(PhysicalKeyboardKey.escape));
expect(data.logicalKey, equals(LogicalKeyboardKey.escape));
expect(data.keyLabel, isNull);
});
test('Modifier keyboard keys are correctly translated', () {
final RawKeyEvent shiftLeftKeyEvent = RawKeyEvent.fromMessage(const <String, dynamic>{
'type': 'keydown',
'keymap': 'linux',
'toolkit': 'glfw',
'keyCode': 340,
'scanCode': 0x00000032,
'codePoint': 0,
});
final RawKeyEventDataLinux data = shiftLeftKeyEvent.data;
expect(data.physicalKey, equals(PhysicalKeyboardKey.shiftLeft));
expect(data.logicalKey, equals(LogicalKeyboardKey.shiftLeft));
expect(data.keyLabel, isNull);
});
});
} }
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