mirror of
https://github.com/flutter/flutter.git
synced 2025-06-03 00:51:18 +00:00

This adds generation of some C++ keycode maps for various platforms. This isn't meant for general use: it's so that the Flutter authors can keep the keycodes up to date with the Chromium and Android (and other) sources. It doesn't run continuously, it's only run occasionally (manually) to update the maps, because they don't change very often, and there is often manual work needed to make it function. In this PR, I added output of various .cc files that write into an engine repo situated next to the flutter repo on disk. This is a starting point for implementing platform-side handling of key events.
28 lines
1.1 KiB
Cheetah
28 lines
1.1 KiB
Cheetah
// 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.
|
|
|
|
// DO NOT EDIT -- DO NOT EDIT -- DO NOT EDIT
|
|
// This file is generated by dev/tools/gen_keycodes/bin/gen_keycodes.dart and
|
|
// should not be edited directly.
|
|
//
|
|
// Edit the template dev/tools/gen_keycodes/data/keyboard_maps.tmpl instead.
|
|
// See dev/tools/gen_keycodes/README.md for more information.
|
|
|
|
/// Maps Web KeyboardEvent codes to the matching LogicalKeyboardKey id.
|
|
const Map<String, int> kWebToLogicalKey = <String, int>{
|
|
@@@WEB_LOGICAL_KEY_CODE_MAP@@@
|
|
};
|
|
|
|
/// Maps Web KeyboardEvent codes to the matching PhysicalKeyboardKey USB HID code.
|
|
const Map<String, int> kWebToPhysicalKey = <String, int>{
|
|
@@@WEB_PHYSICAL_KEY_CODE_MAP@@@
|
|
};
|
|
|
|
/// A map of Web KeyboardEvent 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<String, int> kWebNumPadMap = <String, int>{
|
|
@@@WEB_NUMPAD_CODE_MAP@@@
|
|
};
|