diff options
| author | Jules Aguillon | 2024-07-26 00:10:54 +0200 |
|---|---|---|
| committer | Jules Aguillon | 2024-07-26 00:10:54 +0200 |
| commit | 9d7622798296ec8ce1427c87ffdc0dddec048294 (patch) | |
| tree | 47df391bff5bc1b73c1d0ade87de6c9d32106f54 /check_layout.py | |
| parent | 3967fb8a9fb7c407243bc15e00aa114f181ffacb (diff) | |
| download | unexpected-keyboard-9d7622798296ec8ce1427c87ffdc0dddec048294.tar.gz unexpected-keyboard-9d7622798296ec8ce1427c87ffdc0dddec048294.zip | |
check_layout.py: Handle compass-point attributes
Diffstat (limited to 'check_layout.py')
| -rw-r--r-- | check_layout.py | 8 |
1 files changed, 7 insertions, 1 deletions
diff --git a/check_layout.py b/check_layout.py index 47a17b6..9224f79 100644 --- a/check_layout.py +++ b/check_layout.py @@ -9,6 +9,12 @@ KNOWN_NOT_LAYOUT = set([ "greekmath", "numeric", "emoji_bottom_row", "clipboard_bottom_row" ]) +KEY_ATTRIBUTES = set([ + "key0", + "key1", "key2", "key3", "key4", "key5", "key6", "key7", "key8", + "nw", "ne", "sw", "se", "w", "e", "n", "s" + ]) + def warn(msg): global warning_count print(msg) @@ -39,7 +45,7 @@ def unexpected_keys(keys, symbols, msg): def parse_row_from_et(row, keys, dup): for key in row: for attr in key.keys(): - if attr.startswith("key"): + if attr in KEY_ATTRIBUTES: k = key.get(attr).removeprefix("\\") if k in keys: dup.add(k) keys.add(k) |
