diff options
| author | Jules Aguillon | 2024-01-22 20:55:36 +0100 |
|---|---|---|
| committer | Jules Aguillon | 2024-01-22 20:55:36 +0100 |
| commit | fb27f8d36f09e51e1988fb335e3fd9f34acb434e (patch) | |
| tree | 15f7e62df3383f7b0481e00e8d873882931d60df | |
| parent | 5beacf32b7c20520a1b6e625fa3ab2c7872f3c21 (diff) | |
| download | unexpected-keyboard-fb27f8d36f09e51e1988fb335e3fd9f34acb434e.tar.gz unexpected-keyboard-fb27f8d36f09e51e1988fb335e3fd9f34acb434e.zip | |
check_layout: Warn against whitespaces and "loc"
| -rw-r--r-- | check_layout.output | 6 | ||||
| -rw-r--r-- | check_layout.py | 2 |
2 files changed, 6 insertions, 2 deletions
diff --git a/check_layout.output b/check_layout.output index a781a83..8bd469a 100644 --- a/check_layout.output +++ b/check_layout.output @@ -64,7 +64,8 @@ Layout includes some ASCII punctuation but not all, missing: $ Layout redefines the bottom row but some important keys are missing, missing: cursor_left, cursor_right, loc end, loc home, loc page_down, loc page_up, loc switch_greekmath, loc voice_typing, switch_backward 2 warnings # latn_colemak -0 warnings +Some keys contain whitespaces, unexpected: ́ +1 warnings # latn_dvorak 0 warnings # latn_neo2 @@ -120,4 +121,5 @@ Layout doesn't define some important keys, missing: f11_placeholder, f12_placeho Duplicate keys: Layout includes some ASCII punctuation but not all, missing: <, >, ?, `, |, ~ Layout doesn't define some important keys, missing: f11_placeholder, f12_placeholder -3 warnings +Some keys contain whitespaces, unexpected: +4 warnings diff --git a/check_layout.py b/check_layout.py index 067098d..96e9164 100644 --- a/check_layout.py +++ b/check_layout.py @@ -80,6 +80,8 @@ def check_layout(layout): "f10", "f11", "f12" ], "Layout contains function keys") unexpected_keys(keys, [""], "Layout contains empty strings") + unexpected_keys(keys, ["loc"], "Special keyword cannot be a symbol") + unexpected_keys(keys, filter(lambda k: k.strip()!=k, keys), "Some keys contain whitespaces") _, bottom_row_keys, _ = parse_row("res/xml/bottom_row.xml") |
