Unverified Commit 6b087c74 authored by Greg Spencer's avatar Greg Spencer Committed by GitHub

Add iOS key map generation, make macOS var naming consistent with repo (#83146)

This adds iOS key map generation that uses std::maps. It uses std::maps because on iOS if we use NSDictionaries, then when XCode loads the dylib, the initialization of those status NSDictionaries hasn't yet occurred, and it crashes the app. std::maps have a well-defined static behavior, and are correctly initialized.

I also made the naming of variables, fields, etc. consistent for macOS. We variously had macosFoo, macOSFoo, and macOsFoo. I eliminated macOsFoo and macosFoo, since the rest of the repo uses macOSFoo for lowerCamelCase names (with only a few exceptions). I used iOSFoo for iOS.
parent 62d00c6d
...@@ -9,6 +9,7 @@ import 'package:args/args.dart'; ...@@ -9,6 +9,7 @@ import 'package:args/args.dart';
import 'package:gen_keycodes/android_code_gen.dart'; import 'package:gen_keycodes/android_code_gen.dart';
import 'package:gen_keycodes/base_code_gen.dart'; import 'package:gen_keycodes/base_code_gen.dart';
import 'package:gen_keycodes/gtk_code_gen.dart'; import 'package:gen_keycodes/gtk_code_gen.dart';
import 'package:gen_keycodes/ios_code_gen.dart';
import 'package:gen_keycodes/keyboard_keys_code_gen.dart'; import 'package:gen_keycodes/keyboard_keys_code_gen.dart';
import 'package:gen_keycodes/keyboard_maps_code_gen.dart'; import 'package:gen_keycodes/keyboard_maps_code_gen.dart';
import 'package:gen_keycodes/logical_key_data.dart'; import 'package:gen_keycodes/logical_key_data.dart';
...@@ -210,7 +211,11 @@ Future<void> main(List<String> rawArguments) async { ...@@ -210,7 +211,11 @@ Future<void> main(List<String> rawArguments) async {
physicalData, physicalData,
logicalData, logicalData,
), ),
'macos': MacOsCodeGenerator( 'macos': MacOSCodeGenerator(
physicalData,
logicalData,
),
'ios': IOSCodeGenerator(
physicalData, physicalData,
logicalData, logicalData,
), ),
......
...@@ -5,11 +5,15 @@ ...@@ -5,11 +5,15 @@
#include <map> #include <map>
// DO NOT EDIT -- DO NOT EDIT -- DO NOT EDIT // DO NOT EDIT -- DO NOT EDIT -- DO NOT EDIT
// This file is generated by flutter/flutter@dev/tools/gen_keycodes/bin/gen_keycodes.dart and // This file is generated by
// should not be edited directly. // flutter/flutter:dev/tools/gen_keycodes/bin/gen_keycodes.dart and should not
// be edited directly.
// //
// Edit the template dev/tools/gen_keycodes/data/fuchsia_keyboard_map_cc.tmpl instead. // Edit the template
// See dev/tools/gen_keycodes/README.md for more information. // flutter/flutter:dev/tools/gen_keycodes/data/fuchsia_keyboard_map_cc.tmpl
// instead.
//
// See flutter/flutter:dev/tools/gen_keycodes/README.md for more information.
/// Maps Fuchsia-specific IDs to the matching LogicalKeyboardKey. /// Maps Fuchsia-specific IDs to the matching LogicalKeyboardKey.
const std::map<int, int> g_fuchsia_to_logical_key = { const std::map<int, int> g_fuchsia_to_logical_key = {
......
...@@ -5,11 +5,15 @@ ...@@ -5,11 +5,15 @@
#include <map> #include <map>
// DO NOT EDIT -- DO NOT EDIT -- DO NOT EDIT // DO NOT EDIT -- DO NOT EDIT -- DO NOT EDIT
// This file is generated by flutter/flutter@dev/tools/gen_keycodes/bin/gen_keycodes.dart and // This file is generated by
// should not be edited directly. // flutter/flutter:dev/tools/gen_keycodes/bin/gen_keycodes.dart and should not
// be edited directly.
// //
// Edit the template dev/tools/gen_keycodes/data/glfw_keyboard_map_cc.tmpl instead. // Edit the template
// See dev/tools/gen_keycodes/README.md for more information. // flutter/flutter:dev/tools/gen_keycodes/data/glfw_keyboard_map_cc.tmpl
// instead.
//
// See flutter/flutter:dev/tools/gen_keycodes/README.md for more information.
/// Maps GLFW-specific key codes to the matching [LogicalKeyboardKey]. /// Maps GLFW-specific key codes to the matching [LogicalKeyboardKey].
const std::map<int, int> g_glfw_to_logical_key = { const std::map<int, int> g_glfw_to_logical_key = {
......
// Copyright 2014 The Flutter Authors. All rights reserved.
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.
#include <map>
#include "./KeyCodeMap_internal.h"
// DO NOT EDIT -- DO NOT EDIT -- DO NOT EDIT
// This file is generated by
// flutter/flutter:dev/tools/gen_keycodes/bin/gen_keycodes.dart and should not
// be edited directly.
//
// Edit the template
// flutter/flutter:dev/tools/gen_keycodes/data/ios_key_code_map_cc.tmpl instead.
//
// See flutter/flutter:dev/tools/gen_keycodes/README.md for more information.
@@@MASK_CONSTANTS@@@
// Maps iOS-specific key code values representing [PhysicalKeyboardKey].
//
// iOS doesn't provide a scan code, but a virtual keycode to represent a physical key.
const std::map<uint32_t, uint32_t> keyCodeToPhysicalKey = {
@@@IOS_SCAN_CODE_MAP@@@
};
const std::map<uint32_t, uint32_t> keyCodeToLogicalKey = {
@@@IOS_KEYCODE_LOGICAL_MAP@@@
};
const std::map<uint32_t, uint32_t> keyCodeToModifierFlag = {
@@@KEYCODE_TO_MODIFIER_FLAG_MAP@@@
};
const std::map<uint32_t, uint32_t> modifierFlagToKeyCode = {
@@@MODIFIER_FLAG_TO_KEYCODE_MAP@@@
};
@@@SPECIAL_KEY_CONSTANTS@@@
\ No newline at end of file
...@@ -5,13 +5,16 @@ ...@@ -5,13 +5,16 @@
#include <map> #include <map>
// DO NOT EDIT -- DO NOT EDIT -- DO NOT EDIT // DO NOT EDIT -- DO NOT EDIT -- DO NOT EDIT
// This file is generated by flutter/flutter@dev/tools/gen_keycodes/bin/gen_keycodes.dart and // This file is generated by
// should not be edited directly. // flutter/flutter:dev/tools/gen_keycodes/bin/gen_keycodes.dart and should not
// be edited directly.
// //
// Edit the template dev/tools/gen_keycodes/data/ios_keyboard_map_cc.tmpl instead. // Edit the template
// See dev/tools/gen_keycodes/README.md for more information. // flutter/flutter:dev/tools/gen_keycodes/data/ios_keyboard_map_cc.tmpl instead.
//
// See flutter/flutter:dev/tools/gen_keycodes/README.md for more information.
// Maps macOS-specific key code values representing [PhysicalKeyboardKey]. // Maps iOS-specific key code values representing [PhysicalKeyboardKey].
// //
// iOS doesn't provide a scan code, but a virtual keycode to represent a physical key. // iOS doesn't provide a scan code, but a virtual keycode to represent a physical key.
const std::map<int, int> g_ios_to_physical_key = { const std::map<int, int> g_ios_to_physical_key = {
......
...@@ -1338,7 +1338,7 @@ ...@@ -1338,7 +1338,7 @@
"web": [ "web": [
"Backspace" "Backspace"
], ],
"macOs": [ "macos": [
"Backspace" "Backspace"
], ],
"ios": [ "ios": [
...@@ -1355,7 +1355,7 @@ ...@@ -1355,7 +1355,7 @@
] ]
}, },
"values": { "values": {
"macOs": [ "macos": [
51 51
], ],
"ios": [ "ios": [
...@@ -1383,7 +1383,7 @@ ...@@ -1383,7 +1383,7 @@
"web": [ "web": [
"Tab" "Tab"
], ],
"macOs": [ "macos": [
"Tab" "Tab"
], ],
"ios": [ "ios": [
...@@ -1402,7 +1402,7 @@ ...@@ -1402,7 +1402,7 @@
] ]
}, },
"values": { "values": {
"macOs": [ "macos": [
48 48
], ],
"ios": [ "ios": [
...@@ -1432,7 +1432,7 @@ ...@@ -1432,7 +1432,7 @@
"web": [ "web": [
"Enter" "Enter"
], ],
"macOs": [ "macos": [
"Enter" "Enter"
], ],
"ios": [ "ios": [
...@@ -1451,7 +1451,7 @@ ...@@ -1451,7 +1451,7 @@
] ]
}, },
"values": { "values": {
"macOs": [ "macos": [
36 36
], ],
"ios": [ "ios": [
...@@ -1481,7 +1481,7 @@ ...@@ -1481,7 +1481,7 @@
"web": [ "web": [
"Escape" "Escape"
], ],
"macOs": [ "macos": [
"Escape" "Escape"
], ],
"ios": [ "ios": [
...@@ -1498,7 +1498,7 @@ ...@@ -1498,7 +1498,7 @@
] ]
}, },
"values": { "values": {
"macOs": [ "macos": [
53 53
], ],
"ios": [ "ios": [
...@@ -1526,7 +1526,7 @@ ...@@ -1526,7 +1526,7 @@
"web": [ "web": [
"Delete" "Delete"
], ],
"macOs": [ "macos": [
"Delete" "Delete"
], ],
"ios": [ "ios": [
...@@ -1543,7 +1543,7 @@ ...@@ -1543,7 +1543,7 @@
] ]
}, },
"values": { "values": {
"macOs": [ "macos": [
117 117
], ],
"ios": [ "ios": [
...@@ -1588,7 +1588,7 @@ ...@@ -1588,7 +1588,7 @@
"web": [ "web": [
"CapsLock" "CapsLock"
], ],
"macOs": [ "macos": [
"CapsLock" "CapsLock"
], ],
"ios": [ "ios": [
...@@ -1605,7 +1605,7 @@ ...@@ -1605,7 +1605,7 @@
] ]
}, },
"values": { "values": {
"macOs": [ "macos": [
57 57
], ],
"ios": [ "ios": [
...@@ -1632,7 +1632,7 @@ ...@@ -1632,7 +1632,7 @@
"web": [ "web": [
"Fn" "Fn"
], ],
"macOs": [ "macos": [
"Fn" "Fn"
], ],
"android": [ "android": [
...@@ -1640,7 +1640,7 @@ ...@@ -1640,7 +1640,7 @@
] ]
}, },
"values": { "values": {
"macOs": [ "macos": [
63 63
], ],
"android": [ "android": [
...@@ -1694,7 +1694,7 @@ ...@@ -1694,7 +1694,7 @@
"web": [ "web": [
"NumLock" "NumLock"
], ],
"macOs": [ "macos": [
"NumLock" "NumLock"
], ],
"ios": [ "ios": [
...@@ -1711,7 +1711,7 @@ ...@@ -1711,7 +1711,7 @@
] ]
}, },
"values": { "values": {
"macOs": [ "macos": [
71 71
], ],
"ios": [ "ios": [
...@@ -1827,7 +1827,7 @@ ...@@ -1827,7 +1827,7 @@
"web": [ "web": [
"ArrowDown" "ArrowDown"
], ],
"macOs": [ "macos": [
"ArrowDown" "ArrowDown"
], ],
"ios": [ "ios": [
...@@ -1844,7 +1844,7 @@ ...@@ -1844,7 +1844,7 @@
] ]
}, },
"values": { "values": {
"macOs": [ "macos": [
125 125
], ],
"ios": [ "ios": [
...@@ -1871,7 +1871,7 @@ ...@@ -1871,7 +1871,7 @@
"web": [ "web": [
"ArrowLeft" "ArrowLeft"
], ],
"macOs": [ "macos": [
"ArrowLeft" "ArrowLeft"
], ],
"ios": [ "ios": [
...@@ -1888,7 +1888,7 @@ ...@@ -1888,7 +1888,7 @@
] ]
}, },
"values": { "values": {
"macOs": [ "macos": [
123 123
], ],
"ios": [ "ios": [
...@@ -1915,7 +1915,7 @@ ...@@ -1915,7 +1915,7 @@
"web": [ "web": [
"ArrowRight" "ArrowRight"
], ],
"macOs": [ "macos": [
"ArrowRight" "ArrowRight"
], ],
"ios": [ "ios": [
...@@ -1932,7 +1932,7 @@ ...@@ -1932,7 +1932,7 @@
] ]
}, },
"values": { "values": {
"macOs": [ "macos": [
124 124
], ],
"ios": [ "ios": [
...@@ -1959,7 +1959,7 @@ ...@@ -1959,7 +1959,7 @@
"web": [ "web": [
"ArrowUp" "ArrowUp"
], ],
"macOs": [ "macos": [
"ArrowUp" "ArrowUp"
], ],
"ios": [ "ios": [
...@@ -1976,7 +1976,7 @@ ...@@ -1976,7 +1976,7 @@
] ]
}, },
"values": { "values": {
"macOs": [ "macos": [
126 126
], ],
"ios": [ "ios": [
...@@ -2003,7 +2003,7 @@ ...@@ -2003,7 +2003,7 @@
"web": [ "web": [
"End" "End"
], ],
"macOs": [ "macos": [
"End" "End"
], ],
"ios": [ "ios": [
...@@ -2020,7 +2020,7 @@ ...@@ -2020,7 +2020,7 @@
] ]
}, },
"values": { "values": {
"macOs": [ "macos": [
119 119
], ],
"ios": [ "ios": [
...@@ -2047,7 +2047,7 @@ ...@@ -2047,7 +2047,7 @@
"web": [ "web": [
"Home" "Home"
], ],
"macOs": [ "macos": [
"Home" "Home"
], ],
"ios": [ "ios": [
...@@ -2064,7 +2064,7 @@ ...@@ -2064,7 +2064,7 @@
] ]
}, },
"values": { "values": {
"macOs": [ "macos": [
115 115
], ],
"ios": [ "ios": [
...@@ -2091,7 +2091,7 @@ ...@@ -2091,7 +2091,7 @@
"web": [ "web": [
"PageDown" "PageDown"
], ],
"macOs": [ "macos": [
"PageDown" "PageDown"
], ],
"ios": [ "ios": [
...@@ -2108,7 +2108,7 @@ ...@@ -2108,7 +2108,7 @@
] ]
}, },
"values": { "values": {
"macOs": [ "macos": [
121 121
], ],
"ios": [ "ios": [
...@@ -2135,7 +2135,7 @@ ...@@ -2135,7 +2135,7 @@
"web": [ "web": [
"PageUp" "PageUp"
], ],
"macOs": [ "macos": [
"PageUp" "PageUp"
], ],
"ios": [ "ios": [
...@@ -2152,7 +2152,7 @@ ...@@ -2152,7 +2152,7 @@
] ]
}, },
"values": { "values": {
"macOs": [ "macos": [
116 116
], ],
"ios": [ "ios": [
...@@ -2305,7 +2305,7 @@ ...@@ -2305,7 +2305,7 @@
"web": [ "web": [
"Insert" "Insert"
], ],
"macOs": [ "macos": [
"Insert" "Insert"
], ],
"ios": [ "ios": [
...@@ -2322,7 +2322,7 @@ ...@@ -2322,7 +2322,7 @@
] ]
}, },
"values": { "values": {
"macOs": [ "macos": [
114 114
], ],
"ios": [ "ios": [
...@@ -2492,7 +2492,7 @@ ...@@ -2492,7 +2492,7 @@
"web": [ "web": [
"ContextMenu" "ContextMenu"
], ],
"macOs": [ "macos": [
"ContextMenu" "ContextMenu"
], ],
"ios": [ "ios": [
...@@ -2509,7 +2509,7 @@ ...@@ -2509,7 +2509,7 @@
] ]
}, },
"values": { "values": {
"macOs": [ "macos": [
110 110
], ],
"ios": [ "ios": [
...@@ -3504,7 +3504,7 @@ ...@@ -3504,7 +3504,7 @@
"web": [ "web": [
"F1" "F1"
], ],
"macOs": [ "macos": [
"F1" "F1"
], ],
"ios": [ "ios": [
...@@ -3522,7 +3522,7 @@ ...@@ -3522,7 +3522,7 @@
] ]
}, },
"values": { "values": {
"macOs": [ "macos": [
122 122
], ],
"ios": [ "ios": [
...@@ -3550,7 +3550,7 @@ ...@@ -3550,7 +3550,7 @@
"web": [ "web": [
"F2" "F2"
], ],
"macOs": [ "macos": [
"F2" "F2"
], ],
"ios": [ "ios": [
...@@ -3568,7 +3568,7 @@ ...@@ -3568,7 +3568,7 @@
] ]
}, },
"values": { "values": {
"macOs": [ "macos": [
120 120
], ],
"ios": [ "ios": [
...@@ -3596,7 +3596,7 @@ ...@@ -3596,7 +3596,7 @@
"web": [ "web": [
"F3" "F3"
], ],
"macOs": [ "macos": [
"F3" "F3"
], ],
"ios": [ "ios": [
...@@ -3614,7 +3614,7 @@ ...@@ -3614,7 +3614,7 @@
] ]
}, },
"values": { "values": {
"macOs": [ "macos": [
99 99
], ],
"ios": [ "ios": [
...@@ -3642,7 +3642,7 @@ ...@@ -3642,7 +3642,7 @@
"web": [ "web": [
"F4" "F4"
], ],
"macOs": [ "macos": [
"F4" "F4"
], ],
"ios": [ "ios": [
...@@ -3660,7 +3660,7 @@ ...@@ -3660,7 +3660,7 @@
] ]
}, },
"values": { "values": {
"macOs": [ "macos": [
118 118
], ],
"ios": [ "ios": [
...@@ -3688,7 +3688,7 @@ ...@@ -3688,7 +3688,7 @@
"web": [ "web": [
"F5" "F5"
], ],
"macOs": [ "macos": [
"F5" "F5"
], ],
"ios": [ "ios": [
...@@ -3705,7 +3705,7 @@ ...@@ -3705,7 +3705,7 @@
] ]
}, },
"values": { "values": {
"macOs": [ "macos": [
96 96
], ],
"ios": [ "ios": [
...@@ -3732,7 +3732,7 @@ ...@@ -3732,7 +3732,7 @@
"web": [ "web": [
"F6" "F6"
], ],
"macOs": [ "macos": [
"F6" "F6"
], ],
"ios": [ "ios": [
...@@ -3749,7 +3749,7 @@ ...@@ -3749,7 +3749,7 @@
] ]
}, },
"values": { "values": {
"macOs": [ "macos": [
97 97
], ],
"ios": [ "ios": [
...@@ -3776,7 +3776,7 @@ ...@@ -3776,7 +3776,7 @@
"web": [ "web": [
"F7" "F7"
], ],
"macOs": [ "macos": [
"F7" "F7"
], ],
"ios": [ "ios": [
...@@ -3793,7 +3793,7 @@ ...@@ -3793,7 +3793,7 @@
] ]
}, },
"values": { "values": {
"macOs": [ "macos": [
98 98
], ],
"ios": [ "ios": [
...@@ -3820,7 +3820,7 @@ ...@@ -3820,7 +3820,7 @@
"web": [ "web": [
"F8" "F8"
], ],
"macOs": [ "macos": [
"F8" "F8"
], ],
"ios": [ "ios": [
...@@ -3837,7 +3837,7 @@ ...@@ -3837,7 +3837,7 @@
] ]
}, },
"values": { "values": {
"macOs": [ "macos": [
100 100
], ],
"ios": [ "ios": [
...@@ -3864,7 +3864,7 @@ ...@@ -3864,7 +3864,7 @@
"web": [ "web": [
"F9" "F9"
], ],
"macOs": [ "macos": [
"F9" "F9"
], ],
"ios": [ "ios": [
...@@ -3881,7 +3881,7 @@ ...@@ -3881,7 +3881,7 @@
] ]
}, },
"values": { "values": {
"macOs": [ "macos": [
101 101
], ],
"ios": [ "ios": [
...@@ -3908,7 +3908,7 @@ ...@@ -3908,7 +3908,7 @@
"web": [ "web": [
"F10" "F10"
], ],
"macOs": [ "macos": [
"F10" "F10"
], ],
"ios": [ "ios": [
...@@ -3925,7 +3925,7 @@ ...@@ -3925,7 +3925,7 @@
] ]
}, },
"values": { "values": {
"macOs": [ "macos": [
109 109
], ],
"ios": [ "ios": [
...@@ -3952,7 +3952,7 @@ ...@@ -3952,7 +3952,7 @@
"web": [ "web": [
"F11" "F11"
], ],
"macOs": [ "macos": [
"F11" "F11"
], ],
"ios": [ "ios": [
...@@ -3969,7 +3969,7 @@ ...@@ -3969,7 +3969,7 @@
] ]
}, },
"values": { "values": {
"macOs": [ "macos": [
103 103
], ],
"ios": [ "ios": [
...@@ -3996,7 +3996,7 @@ ...@@ -3996,7 +3996,7 @@
"web": [ "web": [
"F12" "F12"
], ],
"macOs": [ "macos": [
"F12" "F12"
], ],
"ios": [ "ios": [
...@@ -4013,7 +4013,7 @@ ...@@ -4013,7 +4013,7 @@
] ]
}, },
"values": { "values": {
"macOs": [ "macos": [
111 111
], ],
"ios": [ "ios": [
...@@ -4040,7 +4040,7 @@ ...@@ -4040,7 +4040,7 @@
"web": [ "web": [
"F13" "F13"
], ],
"macOs": [ "macos": [
"F13" "F13"
], ],
"ios": [ "ios": [
...@@ -4054,7 +4054,7 @@ ...@@ -4054,7 +4054,7 @@
] ]
}, },
"values": { "values": {
"macOs": [ "macos": [
105 105
], ],
"ios": [ "ios": [
...@@ -4078,7 +4078,7 @@ ...@@ -4078,7 +4078,7 @@
"web": [ "web": [
"F14" "F14"
], ],
"macOs": [ "macos": [
"F14" "F14"
], ],
"ios": [ "ios": [
...@@ -4092,7 +4092,7 @@ ...@@ -4092,7 +4092,7 @@
] ]
}, },
"values": { "values": {
"macOs": [ "macos": [
107 107
], ],
"ios": [ "ios": [
...@@ -4116,7 +4116,7 @@ ...@@ -4116,7 +4116,7 @@
"web": [ "web": [
"F15" "F15"
], ],
"macOs": [ "macos": [
"F15" "F15"
], ],
"ios": [ "ios": [
...@@ -4130,7 +4130,7 @@ ...@@ -4130,7 +4130,7 @@
] ]
}, },
"values": { "values": {
"macOs": [ "macos": [
113 113
], ],
"ios": [ "ios": [
...@@ -4154,7 +4154,7 @@ ...@@ -4154,7 +4154,7 @@
"web": [ "web": [
"F16" "F16"
], ],
"macOs": [ "macos": [
"F16" "F16"
], ],
"ios": [ "ios": [
...@@ -4168,7 +4168,7 @@ ...@@ -4168,7 +4168,7 @@
] ]
}, },
"values": { "values": {
"macOs": [ "macos": [
106 106
], ],
"ios": [ "ios": [
...@@ -4192,7 +4192,7 @@ ...@@ -4192,7 +4192,7 @@
"web": [ "web": [
"F17" "F17"
], ],
"macOs": [ "macos": [
"F17" "F17"
], ],
"ios": [ "ios": [
...@@ -4206,7 +4206,7 @@ ...@@ -4206,7 +4206,7 @@
] ]
}, },
"values": { "values": {
"macOs": [ "macos": [
64 64
], ],
"ios": [ "ios": [
...@@ -4230,7 +4230,7 @@ ...@@ -4230,7 +4230,7 @@
"web": [ "web": [
"F18" "F18"
], ],
"macOs": [ "macos": [
"F18" "F18"
], ],
"ios": [ "ios": [
...@@ -4244,7 +4244,7 @@ ...@@ -4244,7 +4244,7 @@
] ]
}, },
"values": { "values": {
"macOs": [ "macos": [
79 79
], ],
"ios": [ "ios": [
...@@ -4268,7 +4268,7 @@ ...@@ -4268,7 +4268,7 @@
"web": [ "web": [
"F19" "F19"
], ],
"macOs": [ "macos": [
"F19" "F19"
], ],
"ios": [ "ios": [
...@@ -4282,7 +4282,7 @@ ...@@ -4282,7 +4282,7 @@
] ]
}, },
"values": { "values": {
"macOs": [ "macos": [
80 80
], ],
"ios": [ "ios": [
...@@ -4306,7 +4306,7 @@ ...@@ -4306,7 +4306,7 @@
"web": [ "web": [
"F20" "F20"
], ],
"macOs": [ "macos": [
"F20" "F20"
], ],
"ios": [ "ios": [
...@@ -4320,7 +4320,7 @@ ...@@ -4320,7 +4320,7 @@
] ]
}, },
"values": { "values": {
"macOs": [ "macos": [
90 90
], ],
"ios": [ "ios": [
...@@ -4822,7 +4822,7 @@ ...@@ -4822,7 +4822,7 @@
"web": [ "web": [
"AudioVolumeDown" "AudioVolumeDown"
], ],
"macOs": [ "macos": [
"AudioVolumeDown" "AudioVolumeDown"
], ],
"ios": [ "ios": [
...@@ -4839,7 +4839,7 @@ ...@@ -4839,7 +4839,7 @@
] ]
}, },
"values": { "values": {
"macOs": [ "macos": [
73 73
], ],
"ios": [ "ios": [
...@@ -4866,7 +4866,7 @@ ...@@ -4866,7 +4866,7 @@
"web": [ "web": [
"AudioVolumeUp" "AudioVolumeUp"
], ],
"macOs": [ "macos": [
"AudioVolumeUp" "AudioVolumeUp"
], ],
"ios": [ "ios": [
...@@ -4883,7 +4883,7 @@ ...@@ -4883,7 +4883,7 @@
] ]
}, },
"values": { "values": {
"macOs": [ "macos": [
72 72
], ],
"ios": [ "ios": [
...@@ -4910,7 +4910,7 @@ ...@@ -4910,7 +4910,7 @@
"web": [ "web": [
"AudioVolumeMute" "AudioVolumeMute"
], ],
"macOs": [ "macos": [
"AudioVolumeMute" "AudioVolumeMute"
], ],
"ios": [ "ios": [
...@@ -4927,7 +4927,7 @@ ...@@ -4927,7 +4927,7 @@
] ]
}, },
"values": { "values": {
"macOs": [ "macos": [
74 74
], ],
"ios": [ "ios": [
...@@ -8077,7 +8077,7 @@ ...@@ -8077,7 +8077,7 @@
"web": [ "web": [
"IntlRo" "IntlRo"
], ],
"macOs": [ "macos": [
"IntlRo" "IntlRo"
], ],
"ios": [ "ios": [
...@@ -8088,7 +8088,7 @@ ...@@ -8088,7 +8088,7 @@
] ]
}, },
"values": { "values": {
"macOs": [ "macos": [
94 94
], ],
"ios": [ "ios": [
...@@ -8109,7 +8109,7 @@ ...@@ -8109,7 +8109,7 @@
"web": [ "web": [
"IntlYen" "IntlYen"
], ],
"macOs": [ "macos": [
"IntlYen" "IntlYen"
], ],
"ios": [ "ios": [
...@@ -8123,7 +8123,7 @@ ...@@ -8123,7 +8123,7 @@
] ]
}, },
"values": { "values": {
"macOs": [ "macos": [
93 93
], ],
"ios": [ "ios": [
...@@ -8147,7 +8147,7 @@ ...@@ -8147,7 +8147,7 @@
"web": [ "web": [
"Lang1" "Lang1"
], ],
"macOs": [ "macos": [
"Lang1" "Lang1"
], ],
"ios": [ "ios": [
...@@ -8158,7 +8158,7 @@ ...@@ -8158,7 +8158,7 @@
] ]
}, },
"values": { "values": {
"macOs": [ "macos": [
104 104
], ],
"ios": [ "ios": [
...@@ -8179,7 +8179,7 @@ ...@@ -8179,7 +8179,7 @@
"web": [ "web": [
"Lang2" "Lang2"
], ],
"macOs": [ "macos": [
"Lang2" "Lang2"
], ],
"ios": [ "ios": [
...@@ -8187,7 +8187,7 @@ ...@@ -8187,7 +8187,7 @@
] ]
}, },
"values": { "values": {
"macOs": [ "macos": [
102 102
], ],
"ios": [ "ios": [
...@@ -8279,7 +8279,7 @@ ...@@ -8279,7 +8279,7 @@
"web": [ "web": [
"AltLeft" "AltLeft"
], ],
"macOs": [ "macos": [
"AltLeft" "AltLeft"
], ],
"ios": [ "ios": [
...@@ -8296,7 +8296,7 @@ ...@@ -8296,7 +8296,7 @@
] ]
}, },
"values": { "values": {
"macOs": [ "macos": [
58 58
], ],
"ios": [ "ios": [
...@@ -8323,7 +8323,7 @@ ...@@ -8323,7 +8323,7 @@
"web": [ "web": [
"ControlLeft" "ControlLeft"
], ],
"macOs": [ "macos": [
"ControlLeft" "ControlLeft"
], ],
"ios": [ "ios": [
...@@ -8341,7 +8341,7 @@ ...@@ -8341,7 +8341,7 @@
] ]
}, },
"values": { "values": {
"macOs": [ "macos": [
59 59
], ],
"ios": [ "ios": [
...@@ -8369,7 +8369,7 @@ ...@@ -8369,7 +8369,7 @@
"web": [ "web": [
"MetaLeft" "MetaLeft"
], ],
"macOs": [ "macos": [
"MetaLeft" "MetaLeft"
], ],
"ios": [ "ios": [
...@@ -8386,7 +8386,7 @@ ...@@ -8386,7 +8386,7 @@
] ]
}, },
"values": { "values": {
"macOs": [ "macos": [
55 55
], ],
"ios": [ "ios": [
...@@ -8413,7 +8413,7 @@ ...@@ -8413,7 +8413,7 @@
"web": [ "web": [
"ShiftLeft" "ShiftLeft"
], ],
"macOs": [ "macos": [
"ShiftLeft" "ShiftLeft"
], ],
"ios": [ "ios": [
...@@ -8431,7 +8431,7 @@ ...@@ -8431,7 +8431,7 @@
] ]
}, },
"values": { "values": {
"macOs": [ "macos": [
56 56
], ],
"ios": [ "ios": [
...@@ -8459,7 +8459,7 @@ ...@@ -8459,7 +8459,7 @@
"web": [ "web": [
"AltRight" "AltRight"
], ],
"macOs": [ "macos": [
"AltRight" "AltRight"
], ],
"ios": [ "ios": [
...@@ -8477,7 +8477,7 @@ ...@@ -8477,7 +8477,7 @@
] ]
}, },
"values": { "values": {
"macOs": [ "macos": [
61 61
], ],
"ios": [ "ios": [
...@@ -8505,7 +8505,7 @@ ...@@ -8505,7 +8505,7 @@
"web": [ "web": [
"ControlRight" "ControlRight"
], ],
"macOs": [ "macos": [
"ControlRight" "ControlRight"
], ],
"ios": [ "ios": [
...@@ -8522,7 +8522,7 @@ ...@@ -8522,7 +8522,7 @@
] ]
}, },
"values": { "values": {
"macOs": [ "macos": [
62 62
], ],
"ios": [ "ios": [
...@@ -8549,7 +8549,7 @@ ...@@ -8549,7 +8549,7 @@
"web": [ "web": [
"MetaRight" "MetaRight"
], ],
"macOs": [ "macos": [
"MetaRight" "MetaRight"
], ],
"ios": [ "ios": [
...@@ -8566,7 +8566,7 @@ ...@@ -8566,7 +8566,7 @@
] ]
}, },
"values": { "values": {
"macOs": [ "macos": [
54 54
], ],
"ios": [ "ios": [
...@@ -8593,7 +8593,7 @@ ...@@ -8593,7 +8593,7 @@
"web": [ "web": [
"ShiftRight" "ShiftRight"
], ],
"macOs": [ "macos": [
"ShiftRight" "ShiftRight"
], ],
"ios": [ "ios": [
...@@ -8610,7 +8610,7 @@ ...@@ -8610,7 +8610,7 @@
] ]
}, },
"values": { "values": {
"macOs": [ "macos": [
60 60
], ],
"ios": [ "ios": [
...@@ -8637,7 +8637,7 @@ ...@@ -8637,7 +8637,7 @@
"web": [ "web": [
"NumpadEnter" "NumpadEnter"
], ],
"macOs": [ "macos": [
"NumpadEnter" "NumpadEnter"
], ],
"ios": [ "ios": [
...@@ -8651,7 +8651,7 @@ ...@@ -8651,7 +8651,7 @@
] ]
}, },
"values": { "values": {
"macOs": [ "macos": [
76 76
], ],
"ios": [ "ios": [
...@@ -8715,7 +8715,7 @@ ...@@ -8715,7 +8715,7 @@
"web": [ "web": [
"NumpadMultiply" "NumpadMultiply"
], ],
"macOs": [ "macos": [
"NumpadMultiply" "NumpadMultiply"
], ],
"ios": [ "ios": [
...@@ -8732,7 +8732,7 @@ ...@@ -8732,7 +8732,7 @@
] ]
}, },
"values": { "values": {
"macOs": [ "macos": [
67 67
], ],
"ios": [ "ios": [
...@@ -8759,7 +8759,7 @@ ...@@ -8759,7 +8759,7 @@
"web": [ "web": [
"NumpadAdd" "NumpadAdd"
], ],
"macOs": [ "macos": [
"NumpadAdd" "NumpadAdd"
], ],
"ios": [ "ios": [
...@@ -8776,7 +8776,7 @@ ...@@ -8776,7 +8776,7 @@
] ]
}, },
"values": { "values": {
"macOs": [ "macos": [
69 69
], ],
"ios": [ "ios": [
...@@ -8803,7 +8803,7 @@ ...@@ -8803,7 +8803,7 @@
"web": [ "web": [
"NumpadComma" "NumpadComma"
], ],
"macOs": [ "macos": [
"NumpadComma" "NumpadComma"
], ],
"ios": [ "ios": [
...@@ -8814,7 +8814,7 @@ ...@@ -8814,7 +8814,7 @@
] ]
}, },
"values": { "values": {
"macOs": [ "macos": [
95 95
], ],
"ios": [ "ios": [
...@@ -8835,7 +8835,7 @@ ...@@ -8835,7 +8835,7 @@
"web": [ "web": [
"NumpadSubtract" "NumpadSubtract"
], ],
"macOs": [ "macos": [
"NumpadSubtract" "NumpadSubtract"
], ],
"ios": [ "ios": [
...@@ -8852,7 +8852,7 @@ ...@@ -8852,7 +8852,7 @@
] ]
}, },
"values": { "values": {
"macOs": [ "macos": [
78 78
], ],
"ios": [ "ios": [
...@@ -8879,7 +8879,7 @@ ...@@ -8879,7 +8879,7 @@
"web": [ "web": [
"NumpadDecimal" "NumpadDecimal"
], ],
"macOs": [ "macos": [
"NumpadDecimal" "NumpadDecimal"
], ],
"ios": [ "ios": [
...@@ -8896,7 +8896,7 @@ ...@@ -8896,7 +8896,7 @@
] ]
}, },
"values": { "values": {
"macOs": [ "macos": [
65 65
], ],
"ios": [ "ios": [
...@@ -8923,7 +8923,7 @@ ...@@ -8923,7 +8923,7 @@
"web": [ "web": [
"NumpadDivide" "NumpadDivide"
], ],
"macOs": [ "macos": [
"NumpadDivide" "NumpadDivide"
], ],
"ios": [ "ios": [
...@@ -8940,7 +8940,7 @@ ...@@ -8940,7 +8940,7 @@
] ]
}, },
"values": { "values": {
"macOs": [ "macos": [
75 75
], ],
"ios": [ "ios": [
...@@ -8967,7 +8967,7 @@ ...@@ -8967,7 +8967,7 @@
"web": [ "web": [
"Numpad0" "Numpad0"
], ],
"macOs": [ "macos": [
"Numpad0" "Numpad0"
], ],
"ios": [ "ios": [
...@@ -8985,7 +8985,7 @@ ...@@ -8985,7 +8985,7 @@
] ]
}, },
"values": { "values": {
"macOs": [ "macos": [
82 82
], ],
"ios": [ "ios": [
...@@ -9013,7 +9013,7 @@ ...@@ -9013,7 +9013,7 @@
"web": [ "web": [
"Numpad1" "Numpad1"
], ],
"macOs": [ "macos": [
"Numpad1" "Numpad1"
], ],
"ios": [ "ios": [
...@@ -9031,7 +9031,7 @@ ...@@ -9031,7 +9031,7 @@
] ]
}, },
"values": { "values": {
"macOs": [ "macos": [
83 83
], ],
"ios": [ "ios": [
...@@ -9059,7 +9059,7 @@ ...@@ -9059,7 +9059,7 @@
"web": [ "web": [
"Numpad2" "Numpad2"
], ],
"macOs": [ "macos": [
"Numpad2" "Numpad2"
], ],
"ios": [ "ios": [
...@@ -9077,7 +9077,7 @@ ...@@ -9077,7 +9077,7 @@
] ]
}, },
"values": { "values": {
"macOs": [ "macos": [
84 84
], ],
"ios": [ "ios": [
...@@ -9105,7 +9105,7 @@ ...@@ -9105,7 +9105,7 @@
"web": [ "web": [
"Numpad3" "Numpad3"
], ],
"macOs": [ "macos": [
"Numpad3" "Numpad3"
], ],
"ios": [ "ios": [
...@@ -9123,7 +9123,7 @@ ...@@ -9123,7 +9123,7 @@
] ]
}, },
"values": { "values": {
"macOs": [ "macos": [
85 85
], ],
"ios": [ "ios": [
...@@ -9151,7 +9151,7 @@ ...@@ -9151,7 +9151,7 @@
"web": [ "web": [
"Numpad4" "Numpad4"
], ],
"macOs": [ "macos": [
"Numpad4" "Numpad4"
], ],
"ios": [ "ios": [
...@@ -9169,7 +9169,7 @@ ...@@ -9169,7 +9169,7 @@
] ]
}, },
"values": { "values": {
"macOs": [ "macos": [
86 86
], ],
"ios": [ "ios": [
...@@ -9197,7 +9197,7 @@ ...@@ -9197,7 +9197,7 @@
"web": [ "web": [
"Numpad5" "Numpad5"
], ],
"macOs": [ "macos": [
"Numpad5" "Numpad5"
], ],
"ios": [ "ios": [
...@@ -9214,7 +9214,7 @@ ...@@ -9214,7 +9214,7 @@
] ]
}, },
"values": { "values": {
"macOs": [ "macos": [
87 87
], ],
"ios": [ "ios": [
...@@ -9241,7 +9241,7 @@ ...@@ -9241,7 +9241,7 @@
"web": [ "web": [
"Numpad6" "Numpad6"
], ],
"macOs": [ "macos": [
"Numpad6" "Numpad6"
], ],
"ios": [ "ios": [
...@@ -9259,7 +9259,7 @@ ...@@ -9259,7 +9259,7 @@
] ]
}, },
"values": { "values": {
"macOs": [ "macos": [
88 88
], ],
"ios": [ "ios": [
...@@ -9287,7 +9287,7 @@ ...@@ -9287,7 +9287,7 @@
"web": [ "web": [
"Numpad7" "Numpad7"
], ],
"macOs": [ "macos": [
"Numpad7" "Numpad7"
], ],
"ios": [ "ios": [
...@@ -9305,7 +9305,7 @@ ...@@ -9305,7 +9305,7 @@
] ]
}, },
"values": { "values": {
"macOs": [ "macos": [
89 89
], ],
"ios": [ "ios": [
...@@ -9333,7 +9333,7 @@ ...@@ -9333,7 +9333,7 @@
"web": [ "web": [
"Numpad8" "Numpad8"
], ],
"macOs": [ "macos": [
"Numpad8" "Numpad8"
], ],
"ios": [ "ios": [
...@@ -9351,7 +9351,7 @@ ...@@ -9351,7 +9351,7 @@
] ]
}, },
"values": { "values": {
"macOs": [ "macos": [
91 91
], ],
"ios": [ "ios": [
...@@ -9379,7 +9379,7 @@ ...@@ -9379,7 +9379,7 @@
"web": [ "web": [
"Numpad9" "Numpad9"
], ],
"macOs": [ "macos": [
"Numpad9" "Numpad9"
], ],
"ios": [ "ios": [
...@@ -9397,7 +9397,7 @@ ...@@ -9397,7 +9397,7 @@
] ]
}, },
"values": { "values": {
"macOs": [ "macos": [
92 92
], ],
"ios": [ "ios": [
...@@ -9425,7 +9425,7 @@ ...@@ -9425,7 +9425,7 @@
"web": [ "web": [
"NumpadEqual" "NumpadEqual"
], ],
"macOs": [ "macos": [
"NumpadEqual" "NumpadEqual"
], ],
"ios": [ "ios": [
...@@ -9442,7 +9442,7 @@ ...@@ -9442,7 +9442,7 @@
] ]
}, },
"values": { "values": {
"macOs": [ "macos": [
81 81
], ],
"ios": [ "ios": [
......
...@@ -7,11 +7,15 @@ ...@@ -7,11 +7,15 @@
#include "./KeyCodeMap_internal.h" #include "./KeyCodeMap_internal.h"
// DO NOT EDIT -- DO NOT EDIT -- DO NOT EDIT // DO NOT EDIT -- DO NOT EDIT -- DO NOT EDIT
// This file is generated by flutter/flutter@dev/tools/gen_keycodes/bin/gen_keycodes.dart and // This file is generated by
// should not be edited directly. // flutter/flutter:dev/tools/gen_keycodes/bin/gen_keycodes.dart and should not
// be edited directly.
// //
// Edit the template dev/tools/gen_keycodes/data/keyboard_map_macos_cc.tmpl instead. // Edit the template
// See dev/tools/gen_keycodes/README.md for more information. // flutter/flutter:dev/tools/gen_keycodes/data/keyboard_map_macos_cc.tmpl
// instead.
//
// See flutter/flutter:dev/tools/gen_keycodes/README.md for more information.
@@@MASK_CONSTANTS@@@ @@@MASK_CONSTANTS@@@
......
...@@ -11,11 +11,14 @@ ...@@ -11,11 +11,14 @@
// DO NOT EDIT -- DO NOT EDIT -- DO NOT EDIT // DO NOT EDIT -- DO NOT EDIT -- DO NOT EDIT
// This file is generated by // This file is generated by
// flutter/flutter@dev/tools/gen_keycodes/bin/gen_keycodes.dart and should not // flutter/flutter:dev/tools/gen_keycodes/bin/gen_keycodes.dart and should not
// be edited directly. // be edited directly.
// //
// Edit the template dev/tools/gen_keycodes/data/windows_flutter_key_map_cc.tmpl // Edit the template
// instead. See dev/tools/gen_keycodes/README.md for more information. // flutter/flutter:dev/tools/gen_keycodes/data/windows_flutter_key_map_cc.tmpl
// instead.
//
// See flutter/flutter:dev/tools/gen_keycodes/README.md for more information.
namespace flutter { namespace flutter {
......
// Copyright 2014 The Flutter 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:path/path.dart' as path;
import 'base_code_gen.dart';
import 'constants.dart';
import 'logical_key_data.dart';
import 'physical_key_data.dart';
import 'utils.dart';
const List<String> kModifiersOfInterest = <String>[
'ShiftLeft',
'ShiftRight',
'ControlLeft',
'ControlRight',
'AltLeft',
'AltRight',
'MetaLeft',
'MetaRight',
];
// The name of keys that require special attention.
const List<String> kSpecialPhysicalKeys = <String>['CapsLock'];
const List<String> kSpecialLogicalKeys = <String>['CapsLock'];
String _toConstantVariableName(String variableName) {
return 'k${variableName[0].toUpperCase()}${variableName.substring(1)}';
}
/// Generates the key mapping for iOS, based on the information in the key
/// data structure given to it.
class IOSCodeGenerator extends PlatformCodeGenerator {
IOSCodeGenerator(PhysicalKeyData keyData, LogicalKeyData logicalData)
: super(keyData, logicalData);
/// This generates the map of iOS key codes to physical keys.
String get _scanCodeMap {
final StringBuffer scanCodeMap = StringBuffer();
for (final PhysicalKeyEntry entry in keyData.entries) {
if (entry.iOSScanCode != null) {
scanCodeMap.writeln(' {${toHex(entry.iOSScanCode)}, ${toHex(entry.usbHidCode)}}, // ${entry.constantName}');
}
}
return scanCodeMap.toString().trimRight();
}
String get _keyCodeToLogicalMap {
final StringBuffer result = StringBuffer();
for (final LogicalKeyEntry entry in logicalData.entries) {
zipStrict(entry.iOSKeyCodeValues, entry.iOSKeyCodeNames, (int iOSValue, String iOSName) {
result.writeln(' {${toHex(iOSValue)}, ${toHex(entry.value, digits: 11)}}, // $iOSName');
});
}
return result.toString().trimRight();
}
/// This generates the mask values for the part of a key code that defines its plane.
String get _maskConstants {
final StringBuffer buffer = StringBuffer();
for (final MaskConstant constant in maskConstants) {
buffer.writeln('/**');
buffer.write(constant.description
.map((String line) => wrapString(line, prefix: ' * '))
.join(' *\n'));
buffer.writeln(' */');
buffer.writeln('const uint64_t ${_toConstantVariableName(constant.name)} = ${toHex(constant.value, digits: 11)};');
buffer.writeln('');
}
return buffer.toString().trimRight();
}
/// This generates a map from the key code to a modifier flag.
String get _keyToModifierFlagMap {
final StringBuffer modifierKeyMap = StringBuffer();
for (final String name in kModifiersOfInterest) {
modifierKeyMap.writeln(' {${toHex(logicalData.entryByName(name).iOSKeyCodeValues[0])}, kModifierFlag${lowerCamelToUpperCamel(name)}},');
}
return modifierKeyMap.toString().trimRight();
}
/// This generates a map from the modifier flag to the key code.
String get _modifierFlagToKeyMap {
final StringBuffer modifierKeyMap = StringBuffer();
for (final String name in kModifiersOfInterest) {
modifierKeyMap.writeln(' {kModifierFlag${lowerCamelToUpperCamel(name)}, ${toHex(logicalData.entryByName(name).iOSKeyCodeValues[0])}},');
}
return modifierKeyMap.toString().trimRight();
}
/// This generates some keys that needs special attention.
String get _specialKeyConstants {
final StringBuffer specialKeyConstants = StringBuffer();
for (final String keyName in kSpecialPhysicalKeys) {
specialKeyConstants.writeln('const uint64_t k${keyName}PhysicalKey = ${toHex(keyData.entryByName(keyName).usbHidCode)};');
}
for (final String keyName in kSpecialLogicalKeys) {
specialKeyConstants.writeln('const uint64_t k${lowerCamelToUpperCamel(keyName)}LogicalKey = ${toHex(logicalData.entryByName(keyName).value)};');
}
return specialKeyConstants.toString().trimRight();
}
@override
String get templatePath => path.join(dataRoot, 'ios_key_code_map_cc.tmpl');
@override
String outputPath(String platform) => path.join(PlatformCodeGenerator.engineRoot,
'shell', 'platform', 'darwin', 'ios', 'framework', 'Source', 'KeyCodeMap.mm');
@override
Map<String, String> mappings() {
// There is no iOS keycode map since iOS uses keycode to represent a physical key.
// The LogicalKeyboardKey is generated by raw_keyboard_ios.dart from the unmodified characters
// from NSEvent.
return <String, String>{
'MASK_CONSTANTS': _maskConstants,
'IOS_SCAN_CODE_MAP': _scanCodeMap,
'IOS_KEYCODE_LOGICAL_MAP': _keyCodeToLogicalMap,
'KEYCODE_TO_MODIFIER_FLAG_MAP': _keyToModifierFlagMap,
'MODIFIER_FLAG_TO_KEYCODE_MAP': _modifierFlagToKeyMap,
'SPECIAL_KEY_CONSTANTS': _specialKeyConstants,
};
}
}
...@@ -180,42 +180,42 @@ class KeyboardMapsCodeGenerator extends BaseCodeGenerator { ...@@ -180,42 +180,42 @@ class KeyboardMapsCodeGenerator extends BaseCodeGenerator {
} }
/// This generates the map of macOS key codes to physical keys. /// This generates the map of macOS key codes to physical keys.
String get _macOsScanCodeMap { String get _macOSScanCodeMap {
final StringBuffer macOsScanCodeMap = StringBuffer(); final StringBuffer macOSScanCodeMap = StringBuffer();
for (final PhysicalKeyEntry entry in keyData.entries) { for (final PhysicalKeyEntry entry in keyData.entries) {
if (entry.macOsScanCode != null) { if (entry.macOSScanCode != null) {
macOsScanCodeMap.writeln(' ${toHex(entry.macOsScanCode)}: PhysicalKeyboardKey.${entry.constantName},'); macOSScanCodeMap.writeln(' ${toHex(entry.macOSScanCode)}: PhysicalKeyboardKey.${entry.constantName},');
} }
} }
return macOsScanCodeMap.toString().trimRight(); return macOSScanCodeMap.toString().trimRight();
} }
/// This generates the map of macOS number pad key codes to logical keys. /// This generates the map of macOS number pad key codes to logical keys.
String get _macOsNumpadMap { String get _macOSNumpadMap {
final StringBuffer macOsNumPadMap = StringBuffer(); final StringBuffer macOSNumPadMap = StringBuffer();
for (final PhysicalKeyEntry entry in _numpadKeyData) { for (final PhysicalKeyEntry entry in _numpadKeyData) {
if (entry.macOsScanCode != null) { if (entry.macOSScanCode != null) {
macOsNumPadMap.writeln(' ${toHex(entry.macOsScanCode)}: LogicalKeyboardKey.${entry.constantName},'); macOSNumPadMap.writeln(' ${toHex(entry.macOSScanCode)}: LogicalKeyboardKey.${entry.constantName},');
} }
} }
return macOsNumPadMap.toString().trimRight(); return macOSNumPadMap.toString().trimRight();
} }
String get _macOsFunctionKeyMap { String get _macOSFunctionKeyMap {
final StringBuffer macOsFunctionKeyMap = StringBuffer(); final StringBuffer macOSFunctionKeyMap = StringBuffer();
for (final PhysicalKeyEntry entry in _functionKeyData) { for (final PhysicalKeyEntry entry in _functionKeyData) {
if (entry.macOsScanCode != null) { if (entry.macOSScanCode != null) {
macOsFunctionKeyMap.writeln(' ${toHex(entry.macOsScanCode)}: LogicalKeyboardKey.${entry.constantName},'); macOSFunctionKeyMap.writeln(' ${toHex(entry.macOSScanCode)}: LogicalKeyboardKey.${entry.constantName},');
} }
} }
return macOsFunctionKeyMap.toString().trimRight(); return macOSFunctionKeyMap.toString().trimRight();
} }
/// This generates the map of macOS key codes to physical keys. /// This generates the map of macOS key codes to physical keys.
String get _macOsKeyCodeMap { String get _macOSKeyCodeMap {
final OutputLines<int> lines = OutputLines<int>('MacOS key code map'); final OutputLines<int> lines = OutputLines<int>('MacOS key code map');
for (final LogicalKeyEntry entry in logicalData.entries) { for (final LogicalKeyEntry entry in logicalData.entries) {
for (final int code in entry.macOsKeyCodeValues) { for (final int code in entry.macOSKeyCodeValues) {
lines.add(code, ' $code: LogicalKeyboardKey.${entry.constantName},'); lines.add(code, ' $code: LogicalKeyboardKey.${entry.constantName},');
} }
} }
...@@ -223,32 +223,32 @@ class KeyboardMapsCodeGenerator extends BaseCodeGenerator { ...@@ -223,32 +223,32 @@ class KeyboardMapsCodeGenerator extends BaseCodeGenerator {
} }
/// This generates the map of iOS key codes to physical keys. /// This generates the map of iOS key codes to physical keys.
String get _iosScanCodeMap { String get _iOSScanCodeMap {
final OutputLines<int> lines = OutputLines<int>('iOS scancode map'); final OutputLines<int> lines = OutputLines<int>('iOS scancode map');
for (final PhysicalKeyEntry entry in keyData.entries) { for (final PhysicalKeyEntry entry in keyData.entries) {
if (entry.iosScanCode != null) { if (entry.iOSScanCode != null) {
lines.add(entry.iosScanCode!, ' ${toHex(entry.iosScanCode)}: PhysicalKeyboardKey.${entry.constantName},'); lines.add(entry.iOSScanCode!, ' ${toHex(entry.iOSScanCode)}: PhysicalKeyboardKey.${entry.constantName},');
} }
} }
return lines.sortedJoin().trimRight(); return lines.sortedJoin().trimRight();
} }
/// This generates the map of iOS number pad key codes to logical keys. /// This generates the map of iOS number pad key codes to logical keys.
String get _iosNumpadMap { String get _iOSNumpadMap {
final OutputLines<int> lines = OutputLines<int>('iOS numpad map'); final OutputLines<int> lines = OutputLines<int>('iOS numpad map');
for (final PhysicalKeyEntry entry in _numpadKeyData) { for (final PhysicalKeyEntry entry in _numpadKeyData) {
if (entry.iosScanCode != null) { if (entry.iOSScanCode != null) {
lines.add(entry.iosScanCode!,' ${toHex(entry.iosScanCode)}: LogicalKeyboardKey.${entry.constantName},'); lines.add(entry.iOSScanCode!,' ${toHex(entry.iOSScanCode)}: LogicalKeyboardKey.${entry.constantName},');
} }
} }
return lines.sortedJoin().trimRight(); return lines.sortedJoin().trimRight();
} }
/// This generates the map of macOS key codes to physical keys. /// This generates the map of macOS key codes to physical keys.
String get _iosKeyCodeMap { String get _iOSKeyCodeMap {
final OutputLines<int> lines = OutputLines<int>('iOS key code map'); final OutputLines<int> lines = OutputLines<int>('iOS key code map');
for (final LogicalKeyEntry entry in logicalData.entries) { for (final LogicalKeyEntry entry in logicalData.entries) {
for (final int code in entry.iosKeyCodeValues) { for (final int code in entry.iOSKeyCodeValues) {
lines.add(code, ' $code: LogicalKeyboardKey.${entry.constantName},'); lines.add(code, ' $code: LogicalKeyboardKey.${entry.constantName},');
} }
} }
...@@ -335,13 +335,13 @@ class KeyboardMapsCodeGenerator extends BaseCodeGenerator { ...@@ -335,13 +335,13 @@ class KeyboardMapsCodeGenerator extends BaseCodeGenerator {
'ANDROID_NUMPAD_MAP': _androidNumpadMap, 'ANDROID_NUMPAD_MAP': _androidNumpadMap,
'FUCHSIA_SCAN_CODE_MAP': _fuchsiaHidCodeMap, 'FUCHSIA_SCAN_CODE_MAP': _fuchsiaHidCodeMap,
'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,
'MACOS_FUNCTION_KEY_MAP': _macOsFunctionKeyMap, 'MACOS_FUNCTION_KEY_MAP': _macOSFunctionKeyMap,
'MACOS_KEY_CODE_MAP': _macOsKeyCodeMap, 'MACOS_KEY_CODE_MAP': _macOSKeyCodeMap,
'IOS_SCAN_CODE_MAP': _iosScanCodeMap, 'IOS_SCAN_CODE_MAP': _iOSScanCodeMap,
'IOS_NUMPAD_MAP': _iosNumpadMap, 'IOS_NUMPAD_MAP': _iOSNumpadMap,
'IOS_KEY_CODE_MAP': _iosKeyCodeMap, 'IOS_KEY_CODE_MAP': _iOSKeyCodeMap,
'GLFW_KEY_CODE_MAP': _glfwKeyCodeMap, 'GLFW_KEY_CODE_MAP': _glfwKeyCodeMap,
'GLFW_NUMPAD_MAP': _glfwNumpadMap, 'GLFW_NUMPAD_MAP': _glfwNumpadMap,
'GTK_KEY_CODE_MAP': _gtkKeyCodeMap, 'GTK_KEY_CODE_MAP': _gtkKeyCodeMap,
......
...@@ -207,13 +207,13 @@ class LogicalKeyData { ...@@ -207,13 +207,13 @@ class LogicalKeyData {
physicalToLogical.forEach((String physicalKeyName, String logicalKeyName) { physicalToLogical.forEach((String physicalKeyName, String logicalKeyName) {
final PhysicalKeyEntry physicalEntry = physicalKeyData.entryByName(physicalKeyName); final PhysicalKeyEntry physicalEntry = physicalKeyData.entryByName(physicalKeyName);
assert(physicalEntry.macOsScanCode != null, assert(physicalEntry.macOSScanCode != null,
'Physical entry $physicalKeyName does not have a macOsScanCode.'); 'Physical entry $physicalKeyName does not have a macOSScanCode.');
final LogicalKeyEntry? logicalEntry = data[logicalKeyName]; final LogicalKeyEntry? logicalEntry = data[logicalKeyName];
assert(logicalEntry != null, assert(logicalEntry != null,
'Unable to find logical entry by name $logicalKeyName.'); 'Unable to find logical entry by name $logicalKeyName.');
logicalEntry!.macOsKeyCodeNames.add(physicalEntry.name); logicalEntry!.macOSKeyCodeNames.add(physicalEntry.name);
logicalEntry.macOsKeyCodeValues.add(physicalEntry.macOsScanCode!); logicalEntry.macOSKeyCodeValues.add(physicalEntry.macOSScanCode!);
}); });
} }
...@@ -227,13 +227,13 @@ class LogicalKeyData { ...@@ -227,13 +227,13 @@ class LogicalKeyData {
physicalToLogical.forEach((String physicalKeyName, String logicalKeyName) { physicalToLogical.forEach((String physicalKeyName, String logicalKeyName) {
final PhysicalKeyEntry physicalEntry = physicalKeyData.entryByName(physicalKeyName); final PhysicalKeyEntry physicalEntry = physicalKeyData.entryByName(physicalKeyName);
assert(physicalEntry.iosScanCode != null, assert(physicalEntry.iOSScanCode != null,
'Physical entry $physicalKeyName does not have an iosScanCode.'); 'Physical entry $physicalKeyName does not have an iosScanCode.');
final LogicalKeyEntry? logicalEntry = data[logicalKeyName]; final LogicalKeyEntry? logicalEntry = data[logicalKeyName];
assert(logicalEntry != null, assert(logicalEntry != null,
'Unable to find logical entry by name $logicalKeyName.'); 'Unable to find logical entry by name $logicalKeyName.');
logicalEntry!.iosKeyCodeNames.add(physicalEntry.name); logicalEntry!.iOSKeyCodeNames.add(physicalEntry.name);
logicalEntry.iosKeyCodeValues.add(physicalEntry.iosScanCode!); logicalEntry.iOSKeyCodeValues.add(physicalEntry.iOSScanCode!);
}); });
} }
...@@ -414,10 +414,10 @@ class LogicalKeyEntry { ...@@ -414,10 +414,10 @@ class LogicalKeyEntry {
required this.name, required this.name,
this.keyLabel, this.keyLabel,
}) : webNames = <String>[], }) : webNames = <String>[],
macOsKeyCodeNames = <String>[], macOSKeyCodeNames = <String>[],
macOsKeyCodeValues = <int>[], macOSKeyCodeValues = <int>[],
iosKeyCodeNames = <String>[], iOSKeyCodeNames = <String>[],
iosKeyCodeValues = <int>[], iOSKeyCodeValues = <int>[],
gtkNames = <String>[], gtkNames = <String>[],
gtkValues = <int>[], gtkValues = <int>[],
windowsNames = <String>[], windowsNames = <String>[],
...@@ -441,10 +441,10 @@ class LogicalKeyEntry { ...@@ -441,10 +441,10 @@ class LogicalKeyEntry {
: value = map['value'] as int, : value = map['value'] as int,
name = map['name'] as String, name = map['name'] as String,
webNames = _toNonEmptyArray<String>(map['names']['web']), webNames = _toNonEmptyArray<String>(map['names']['web']),
macOsKeyCodeNames = _toNonEmptyArray<String>(map['names']['macOs']), macOSKeyCodeNames = _toNonEmptyArray<String>(map['names']['macos']),
macOsKeyCodeValues = _toNonEmptyArray<int>(map['values']?['macOs']), macOSKeyCodeValues = _toNonEmptyArray<int>(map['values']?['macos']),
iosKeyCodeNames = _toNonEmptyArray<String>(map['names']['ios']), iOSKeyCodeNames = _toNonEmptyArray<String>(map['names']['ios']),
iosKeyCodeValues = _toNonEmptyArray<int>(map['values']?['ios']), iOSKeyCodeValues = _toNonEmptyArray<int>(map['values']?['ios']),
gtkNames = _toNonEmptyArray<String>(map['names']['gtk']), gtkNames = _toNonEmptyArray<String>(map['names']['gtk']),
gtkValues = _toNonEmptyArray<int>(map['values']?['gtk']), gtkValues = _toNonEmptyArray<int>(map['values']?['gtk']),
windowsNames = _toNonEmptyArray<String>(map['names']['windows']), windowsNames = _toNonEmptyArray<String>(map['names']['windows']),
...@@ -470,19 +470,19 @@ class LogicalKeyEntry { ...@@ -470,19 +470,19 @@ class LogicalKeyEntry {
/// The names of the key codes that corresponds to this logical key on macOS, /// The names of the key codes that corresponds to this logical key on macOS,
/// created from the corresponding physical keys. /// created from the corresponding physical keys.
final List<String> macOsKeyCodeNames; final List<String> macOSKeyCodeNames;
/// The key codes that corresponds to this logical key on macOS, created from /// The key codes that corresponds to this logical key on macOS, created from
/// the physical key list substituted with the key mapping. /// the physical key list substituted with the key mapping.
final List<int> macOsKeyCodeValues; final List<int> macOSKeyCodeValues;
/// The names of the key codes that corresponds to this logical key on iOS, /// The names of the key codes that corresponds to this logical key on iOS,
/// created from the corresponding physical keys. /// created from the corresponding physical keys.
final List<String> iosKeyCodeNames; final List<String> iOSKeyCodeNames;
/// The key codes that corresponds to this logical key on iOS, created from the /// The key codes that corresponds to this logical key on iOS, created from the
/// physical key list substituted with the key mapping. /// physical key list substituted with the key mapping.
final List<int> iosKeyCodeValues; final List<int> iOSKeyCodeValues;
/// The list of names that GTK gives to this key (symbol names minus the /// The list of names that GTK gives to this key (symbol names minus the
/// prefix). /// prefix).
...@@ -528,15 +528,15 @@ class LogicalKeyEntry { ...@@ -528,15 +528,15 @@ class LogicalKeyEntry {
'keyLabel': keyLabel, 'keyLabel': keyLabel,
'names': <String, dynamic>{ 'names': <String, dynamic>{
'web': webNames, 'web': webNames,
'macOs': macOsKeyCodeNames, 'macos': macOSKeyCodeNames,
'ios': iosKeyCodeNames, 'ios': iOSKeyCodeNames,
'gtk': gtkNames, 'gtk': gtkNames,
'windows': windowsNames, 'windows': windowsNames,
'android': androidNames, 'android': androidNames,
}, },
'values': <String, List<int>>{ 'values': <String, List<int>>{
'macOs': macOsKeyCodeValues, 'macos': macOSKeyCodeValues,
'ios': iosKeyCodeValues, 'ios': iOSKeyCodeValues,
'gtk': gtkValues, 'gtk': gtkValues,
'windows': windowsValues, 'windows': windowsValues,
'android': androidValues, 'android': androidValues,
......
...@@ -31,16 +31,16 @@ String _toConstantVariableName(String variableName) { ...@@ -31,16 +31,16 @@ String _toConstantVariableName(String variableName) {
/// Generates the key mapping for macOS, based on the information in the key /// Generates the key mapping for macOS, based on the information in the key
/// data structure given to it. /// data structure given to it.
class MacOsCodeGenerator extends PlatformCodeGenerator { class MacOSCodeGenerator extends PlatformCodeGenerator {
MacOsCodeGenerator(PhysicalKeyData keyData, LogicalKeyData logicalData) MacOSCodeGenerator(PhysicalKeyData keyData, LogicalKeyData logicalData)
: super(keyData, logicalData); : super(keyData, logicalData);
/// This generates the map of macOS key codes to physical keys. /// This generates the map of macOS key codes to physical keys.
String get _scanCodeMap { String get _scanCodeMap {
final StringBuffer scanCodeMap = StringBuffer(); final StringBuffer scanCodeMap = StringBuffer();
for (final PhysicalKeyEntry entry in keyData.entries) { for (final PhysicalKeyEntry entry in keyData.entries) {
if (entry.macOsScanCode != null) { if (entry.macOSScanCode != null) {
scanCodeMap.writeln(' @${toHex(entry.macOsScanCode)} : @${toHex(entry.usbHidCode)}, // ${entry.constantName}'); scanCodeMap.writeln(' @${toHex(entry.macOSScanCode)} : @${toHex(entry.usbHidCode)}, // ${entry.constantName}');
} }
} }
return scanCodeMap.toString().trimRight(); return scanCodeMap.toString().trimRight();
...@@ -49,8 +49,8 @@ class MacOsCodeGenerator extends PlatformCodeGenerator { ...@@ -49,8 +49,8 @@ class MacOsCodeGenerator extends PlatformCodeGenerator {
String get _keyCodeToLogicalMap { String get _keyCodeToLogicalMap {
final StringBuffer result = StringBuffer(); final StringBuffer result = StringBuffer();
for (final LogicalKeyEntry entry in logicalData.entries) { for (final LogicalKeyEntry entry in logicalData.entries) {
zipStrict(entry.macOsKeyCodeValues, entry.macOsKeyCodeNames, (int macOsValue, String macOsName) { zipStrict(entry.macOSKeyCodeValues, entry.macOSKeyCodeNames, (int macOSValue, String macOSName) {
result.writeln(' @${toHex(macOsValue)} : @${toHex(entry.value, digits: 11)}, // $macOsName'); result.writeln(' @${toHex(macOSValue)} : @${toHex(entry.value, digits: 11)}, // $macOSName');
}); });
} }
return result.toString().trimRight(); return result.toString().trimRight();
...@@ -75,7 +75,7 @@ class MacOsCodeGenerator extends PlatformCodeGenerator { ...@@ -75,7 +75,7 @@ class MacOsCodeGenerator extends PlatformCodeGenerator {
String get _keyToModifierFlagMap { String get _keyToModifierFlagMap {
final StringBuffer modifierKeyMap = StringBuffer(); final StringBuffer modifierKeyMap = StringBuffer();
for (final String name in kModifiersOfInterest) { for (final String name in kModifiersOfInterest) {
modifierKeyMap.writeln(' @${toHex(logicalData.entryByName(name).macOsKeyCodeValues[0])} : @(kModifierFlag${lowerCamelToUpperCamel(name)}),'); modifierKeyMap.writeln(' @${toHex(logicalData.entryByName(name).macOSKeyCodeValues[0])} : @(kModifierFlag${lowerCamelToUpperCamel(name)}),');
} }
return modifierKeyMap.toString().trimRight(); return modifierKeyMap.toString().trimRight();
} }
...@@ -84,7 +84,7 @@ class MacOsCodeGenerator extends PlatformCodeGenerator { ...@@ -84,7 +84,7 @@ class MacOsCodeGenerator extends PlatformCodeGenerator {
String get _modifierFlagToKeyMap { String get _modifierFlagToKeyMap {
final StringBuffer modifierKeyMap = StringBuffer(); final StringBuffer modifierKeyMap = StringBuffer();
for (final String name in kModifiersOfInterest) { for (final String name in kModifiersOfInterest) {
modifierKeyMap.writeln(' @(kModifierFlag${lowerCamelToUpperCamel(name)}) : @${toHex(logicalData.entryByName(name).macOsKeyCodeValues[0])},'); modifierKeyMap.writeln(' @(kModifierFlag${lowerCamelToUpperCamel(name)}) : @${toHex(logicalData.entryByName(name).macOSKeyCodeValues[0])},');
} }
return modifierKeyMap.toString().trimRight(); return modifierKeyMap.toString().trimRight();
} }
......
...@@ -231,8 +231,8 @@ class PhysicalKeyData { ...@@ -231,8 +231,8 @@ class PhysicalKeyData {
linuxScanCode: linuxScanCode == 0 ? null : linuxScanCode, linuxScanCode: linuxScanCode == 0 ? null : linuxScanCode,
xKbScanCode: xKbScanCode == 0 ? null : xKbScanCode, xKbScanCode: xKbScanCode == 0 ? null : xKbScanCode,
windowsScanCode: windowsScanCode == 0 ? null : windowsScanCode, windowsScanCode: windowsScanCode == 0 ? null : windowsScanCode,
macOsScanCode: macScanCode == 0xffff ? null : macScanCode, macOSScanCode: macScanCode == 0xffff ? null : macScanCode,
iosScanCode: (usbHidCode & 0x070000) == 0x070000 ? (usbHidCode ^ 0x070000) : null, iOSScanCode: (usbHidCode & 0x070000) == 0x070000 ? (usbHidCode ^ 0x070000) : null,
name: name, name: name,
chromiumCode: chromiumCode, chromiumCode: chromiumCode,
); );
...@@ -267,8 +267,8 @@ class PhysicalKeyEntry { ...@@ -267,8 +267,8 @@ class PhysicalKeyEntry {
required this.linuxScanCode, required this.linuxScanCode,
required this.xKbScanCode, required this.xKbScanCode,
required this.windowsScanCode, required this.windowsScanCode,
required this.macOsScanCode, required this.macOSScanCode,
required this.iosScanCode, required this.iOSScanCode,
required this.chromiumCode, required this.chromiumCode,
required this.glfwKeyCodes, required this.glfwKeyCodes,
}); });
...@@ -283,8 +283,8 @@ class PhysicalKeyEntry { ...@@ -283,8 +283,8 @@ class PhysicalKeyEntry {
linuxScanCode: map['scanCodes']['linux'] as int?, linuxScanCode: map['scanCodes']['linux'] as int?,
xKbScanCode: map['scanCodes']['xkb'] as int?, xKbScanCode: map['scanCodes']['xkb'] as int?,
windowsScanCode: map['scanCodes']['windows'] as int?, windowsScanCode: map['scanCodes']['windows'] as int?,
macOsScanCode: map['scanCodes']['macos'] as int?, macOSScanCode: map['scanCodes']['macos'] as int?,
iosScanCode: map['scanCodes']['ios'] as int?, iOSScanCode: map['scanCodes']['ios'] as int?,
glfwKeyCodes: (map['keyCodes']?['glfw'] as List<dynamic>?)?.cast<int>() ?? <int>[], glfwKeyCodes: (map['keyCodes']?['glfw'] as List<dynamic>?)?.cast<int>() ?? <int>[],
); );
} }
...@@ -299,9 +299,9 @@ class PhysicalKeyEntry { ...@@ -299,9 +299,9 @@ class PhysicalKeyEntry {
/// The Windows scan code of the key from Chromium's header file. /// The Windows scan code of the key from Chromium's header file.
final int? windowsScanCode; final int? windowsScanCode;
/// The macOS scan code of the key from Chromium's header file. /// The macOS scan code of the key from Chromium's header file.
final int? macOsScanCode; final int? macOSScanCode;
/// The iOS scan code of the key from UIKey's documentation (USB Hid table) /// The iOS scan code of the key from UIKey's documentation (USB Hid table)
final int? iosScanCode; final int? iOSScanCode;
/// The list of Android scan codes matching this key, created by looking up /// The list of Android scan codes matching this key, created by looking up
/// the Android name in the Chromium data, and substituting the Android scan /// the Android name in the Chromium data, and substituting the Android scan
/// code value. /// code value.
...@@ -330,8 +330,8 @@ class PhysicalKeyEntry { ...@@ -330,8 +330,8 @@ class PhysicalKeyEntry {
'linux': linuxScanCode, 'linux': linuxScanCode,
'xkb': xKbScanCode, 'xkb': xKbScanCode,
'windows': windowsScanCode, 'windows': windowsScanCode,
'macos': macOsScanCode, 'macos': macOSScanCode,
'ios': iosScanCode, 'ios': iOSScanCode,
}, },
'keyCodes': <String, List<int>>{ 'keyCodes': <String, List<int>>{
'glfw': glfwKeyCodes, 'glfw': glfwKeyCodes,
...@@ -380,9 +380,9 @@ class PhysicalKeyEntry { ...@@ -380,9 +380,9 @@ class PhysicalKeyEntry {
String toString() { String toString() {
return """'$constantName': (name: "$name", usbHidCode: ${toHex(usbHidCode)}, """ return """'$constantName': (name: "$name", usbHidCode: ${toHex(usbHidCode)}, """
'linuxScanCode: ${toHex(linuxScanCode)}, xKbScanCode: ${toHex(xKbScanCode)}, ' 'linuxScanCode: ${toHex(linuxScanCode)}, xKbScanCode: ${toHex(xKbScanCode)}, '
'windowsKeyCode: ${toHex(windowsScanCode)}, macOsScanCode: ${toHex(macOsScanCode)}, ' 'windowsKeyCode: ${toHex(windowsScanCode)}, macOSScanCode: ${toHex(macOSScanCode)}, '
'windowsScanCode: ${toHex(windowsScanCode)}, chromiumSymbolName: $chromiumCode ' 'windowsScanCode: ${toHex(windowsScanCode)}, chromiumSymbolName: $chromiumCode '
'iOSScanCode: ${toHex(iosScanCode)})'; 'iOSScanCode: ${toHex(iOSScanCode)})';
} }
static int compareByUsbHidCode(PhysicalKeyEntry a, PhysicalKeyEntry b) => static int compareByUsbHidCode(PhysicalKeyEntry a, PhysicalKeyEntry b) =>
......
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