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.
This commit is contained in:
@@ -9,6 +9,7 @@ import 'package:args/args.dart';
|
||||
import 'package:gen_keycodes/android_code_gen.dart';
|
||||
import 'package:gen_keycodes/base_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_maps_code_gen.dart';
|
||||
import 'package:gen_keycodes/logical_key_data.dart';
|
||||
@@ -210,7 +211,11 @@ Future<void> main(List<String> rawArguments) async {
|
||||
physicalData,
|
||||
logicalData,
|
||||
),
|
||||
'macos': MacOsCodeGenerator(
|
||||
'macos': MacOSCodeGenerator(
|
||||
physicalData,
|
||||
logicalData,
|
||||
),
|
||||
'ios': IOSCodeGenerator(
|
||||
physicalData,
|
||||
logicalData,
|
||||
),
|
||||
|
||||
Reference in New Issue
Block a user