You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
New scheme for keyboard logical key ID (flutter#85121)
This PR updates the ID used by logical keyboard keys.
The logical key ID is still composed of 2 parts: 32 bits of value, and 8 bits of plane. But the assignment of planes has been drastically changed. HID plane is removed, and unprintable plane and Flutter plane are added. This is to reflect the new generation method for logical key IDs. Now keys that are defined by Flutter but not by dom_key_data are placed into the Flutter plane, including numpad keys, sided modifier keys, and gamepad keys. The values for platform planes have also been adjusted.
The generation script and README have been updated accordingly as well.
A new file, test_utils/key_codes.h is now generated to assist engine unit testing.
All lists generated by the script are now sorted by the key.
Copy file name to clipboardExpand all lines: dev/tools/gen_keycodes/data/README.md
+1-2Lines changed: 1 addition & 2 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -9,7 +9,6 @@
9
9
|[`supplemental_hid_codes.inc`](supplemental_hid_codes.inc)| A supplementary HID list on top of Chromium's list of HID codes for extra physical keys. Certain entries may also overwrite Chromium's corresponding entries. |
10
10
|[`supplemental_key_data.inc`](supplemental_key_data.inc)| A supplementary key list on top of Chromium's list of keys for extra logical keys.|
11
11
|[`chromium_modifiers.json`](chromium_modifiers.json)| Maps the web's `key` for modifier keys to the names of the logical keys for these keys' left and right variations.This is used when generating logical keys to provide independent values for sided logical keys. Web uses the same `key` for modifier keys of different sides, but Flutter's logical key model treats them as different keys.|
12
-
|[`printable_to_numpads.json`](printable_to_numpads.json)| Maps a character to the names of the logical keys for these keys' number pad variations. This is used when generating logical keys to provide independent values for number pad logical keys. The web uses the character as the `key` for number pad keys, but Flutter's logical key model treats them as independent keys.|
13
12
|[`printable.json`](printable.json)| Maps Flutter key name to its printable character. This character is used as the key label.|
14
13
|[`synonyms.json`](synonyms.json)| Maps pseudo-keys that represent other keys to the sets of keys they represent. For example, this contains the "shift" key that represents either a "shiftLeft" or "shiftRight" key.|
15
14
@@ -58,7 +57,7 @@
58
57
|[`gtk_key_mapping_cc.tmpl`](gtk_key_mapping_cc.tmpl)| The template for `key_mapping.cc`. |
59
58
|[`gtk_lock_bit_mapping.json`](gtk_lock_bit_mapping.json)| Maps a name for GTK's modifier bit macro to Flutter's logical name (element #0) and physical name (element #1). This is used to generate checked keys that GTK should keep lock state synchronous on.|
60
59
|[`gtk_logical_name_mapping.json`](gtk_logical_name_mapping.json)| Maps a logical key name to the macro names of its corresponding `keyval`s. This is used to convert logical keys.|
61
-
|[`gtk_modifier_bit_mapping.json`](gtk_modifier_bit_mapping.json)| Maps a name for GTK's modifier bit macro to Flutter's logical name (element #0), physical name (element #1), and the physical name for the paired key (element #2). This is used to generate checked keys that GTK should keep pressing state synchronous on.|
60
+
|[`gtk_modifier_bit_mapping.json`](gtk_modifier_bit_mapping.json)| Maps a name for GTK's modifier bit macro to Flutter's physical name (element #0), logical name (element #1), and the logical name for the paired key (element #2). This is used to generate checked keys where GTK should keep the pressed state synchronized.|
62
61
|[`gtk_numpad_shift.json`](gtk_numpad_shift.json)| Maps the name of a `keyval` macro of a numpad key to that of the corresponding key with NumLock on. GTK uses different `keyval` for numpad keys with and without NumLock on, but Flutter's logical key model treats them as the same key.|
0 commit comments