[gen_keycode, RawKeyboard] Apply derived keyboard layout from Linux (#102709)

This commit is contained in:
Tong Mu
2022-05-11 20:04:14 -07:00
committed by GitHub
parent 5288ff8f1a
commit 65ea76718f
15 changed files with 146 additions and 30 deletions

View File

@@ -11,6 +11,7 @@
| [`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.|
| [`printable.json`](printable.json) | Maps Flutter key name to its printable character. This character is used as the key label.|
| [`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.|
| [`layout_goals.json`](layout_goals.json) | A list of layout goals, keys that the platform keyboard manager should find mappings for. Each key in this file is the key name of the goal, both logical and physical simultaneously, while its value represents whether the goal is mandatory. A mandatory goal must be fulfilled, and the manager will use the default value from this file if a mapping can not be found. A non-mandatory goal is suggestive, only used if the key mapping information is malformed (e.g. contains no ASCII characters.) |
### Framework

View File

@@ -35,4 +35,8 @@ void initialize_lock_bit_to_checked_keys(GHashTable* table) {
@@@GTK_MODE_BIT_MAP@@@
}
const std::vector<LayoutGoal> layout_goals = {
@@@LAYOUT_GOALS@@@
};
@@@MASK_CONSTANTS@@@

View File

@@ -0,0 +1,50 @@
{
"KeyA": true,
"KeyB": true,
"KeyC": true,
"KeyD": true,
"KeyE": true,
"KeyF": true,
"KeyG": true,
"KeyH": true,
"KeyI": true,
"KeyJ": true,
"KeyK": true,
"KeyL": true,
"KeyM": true,
"KeyN": true,
"KeyO": true,
"KeyP": true,
"KeyQ": true,
"KeyR": true,
"KeyS": true,
"KeyT": true,
"KeyU": true,
"KeyV": true,
"KeyW": true,
"KeyX": true,
"KeyY": true,
"KeyZ": true,
"Digit1": true,
"Digit2": true,
"Digit3": true,
"Digit4": true,
"Digit5": true,
"Digit6": true,
"Digit7": true,
"Digit8": true,
"Digit9": true,
"Digit0": true,
"Quote": false,
"Comma": false,
"Minus": false,
"Period": false,
"Slash": false,
"Semicolon": false,
"Equal": false,
"BracketLeft": false,
"Backslash": false,
"BracketRight": false,
"Backquote": false,
"IntlBackslash": false
}