check_layout.py: Adjust Shift, Tab and Esc checks

This commit is contained in:
Jules Aguillon
2025-02-04 16:46:49 +01:00
parent 0061911ef3
commit ae9c2fa626
2 changed files with 20 additions and 22 deletions

View File

@ -3,8 +3,7 @@ Layout includes some ASCII punctuation but not all, missing: !, ", ', +, -, /, :
1 warnings
# arab_hamvaj_tly
Layout includes some ASCII punctuation but not all, missing: ", %, ', ,, /, ;, <, =, >, ?, [, \, ], _, `, {, |, }
Layout doesn't define some important keys, missing: loc esc
2 warnings
1 warnings
# arab_pc
Layout includes some ASCII punctuation but not all, missing: !, ', +, ;, ?, \, |
1 warnings
@ -13,8 +12,7 @@ Layout includes some ASCII punctuation but not all, missing: ", %, ', +, ,, ;, <
1 warnings
# arab_pc_ckb_fa
Layout includes some ASCII punctuation but not all, missing: ", #, $, %, &, ', ,, /, ;, ?, @, \, ^, `, |, ~
Layout doesn't define some important keys, missing: loc esc, loc tab
2 warnings
1 warnings
# arab_pc_hindu
Layout includes some ASCII punctuation but not all, missing: !, ', +, ;, ?, \, |
1 warnings
@ -45,18 +43,15 @@ Layout includes some ASCII punctuation but not all, missing: $, &, *, ., /, <, >
Layout includes some ASCII punctuation but not all, missing: ~
1 warnings
# cyrl_yqukeng_tj
Layout doesn't define some important keys, missing: loc esc, loc tab
These keys are now added automatically, unexpected: f11_placeholder, f12_placeholder
2 warnings
1 warnings
# cyrl_yxukeng_os
Layout includes some ASCII punctuation but not all, missing: ", #, $, &, ', @, [, ], ~
Layout doesn't define some important keys, missing: loc esc, loc tab
These keys are now added automatically, unexpected: f11_placeholder, f12_placeholder
3 warnings
2 warnings
# deva_alt
Layout includes some ASCII punctuation but not all, missing: #, $, %, &, ', (, ), +, ., /, :, <, =, >, [, \, ], ^, _, `, {, |, }, ~
Layout doesn't define some important keys, missing: loc esc, loc tab
2 warnings
1 warnings
# deva_inscript
Duplicate keys: ।
Layout includes some ASCII punctuation but not all, missing: ", $, ', ^, _, `, |
@ -75,8 +70,7 @@ Duplicate keys: ;
Duplicate keys: ટ, ડ
1 warnings
# hang_dubeolsik_kr
Layout doesn't define some important keys, missing: loc esc, loc tab
1 warnings
0 warnings
# hebr_1_il
Layout includes some ASCII punctuation but not all, missing: (, ), <, >, [, ], {, }
1 warnings
@ -85,23 +79,25 @@ Layout includes some ASCII punctuation but not all, missing: (, ), <, >, [, ], {
1 warnings
# kann_kannada
Layout includes some ASCII punctuation but not all, missing: #, $, %, (, ), *, +, /, <, =, >, [, \, ], ^, `, {, |, }, ~
Layout doesn't define some important keys, missing: loc esc, loc tab
2 warnings
1 warnings
# latn_azerty_be
0 warnings
# latn_azerty_fr
0 warnings
# latn_bepo_fr
0 warnings
Missing important key, missing: loc capslock
1 warnings
# latn_bone
Layout doesn't define some important keys, missing: loc esc, loc tab
Missing important key, missing: loc capslock
Missing programming keys, missing: loc esc, loc tab
Layout redefines the bottom row but some important keys are missing, missing: cursor_left, cursor_right, loc compose, loc end, loc home, loc page_down, loc page_up, loc switch_clipboard, loc switch_greekmath, loc voice_typing, switch_backward
2 warnings
3 warnings
# latn_colemak
Some keys contain whitespaces, unexpected: ́
1 warnings
# latn_dvorak
0 warnings
Missing important key, missing: loc capslock
1 warnings
# latn_neo2
Layout redefines the bottom row but some important keys are missing, missing: loc switch_clipboard
1 warnings
@ -152,7 +148,7 @@ Duplicate keys: !, ', ,, -, ., ?
0 warnings
# latn_qwerty_tly
Duplicate keys: a, c, j, q
Layout doesn't define some important keys, missing: loc esc, loc tab
Missing programming keys, missing: loc esc, loc tab
2 warnings
# latn_qwerty_tr
0 warnings

View File

@ -73,9 +73,7 @@ def check_layout(layout):
if len(dup) > 0: warn("Duplicate keys: " + key_list_str(dup))
missing_some_of(keys, "~!@#$%^&*(){}`[]=\\-_;:/.,?<>'\"+|", "ASCII punctuation")
missing_some_of(keys, "0123456789", "digits")
missing_required(keys,
["loc esc", "loc tab", "backspace", "delete"],
"Layout doesn't define some important keys")
missing_required(keys, ["backspace", "delete"], "Layout doesn't define some important keys")
unexpected_keys(keys,
["copy", "paste", "cut", "selectAll", "shareText",
"pasteAsPlainText", "undo", "redo" ],
@ -89,6 +87,10 @@ def check_layout(layout):
unexpected_keys(keys, filter(lambda k: k.strip()!=k, keys), "Some keys contain whitespaces")
unexpected_keys(keys, ["f11_placeholder", "f12_placeholder"], "These keys are now added automatically")
if root.get("script", "latin") == "latin":
missing_required(keys, ["shift", "loc capslock"], "Missing important key")
missing_required(keys, ["loc esc", "loc tab"], "Missing programming keys")
_, bottom_row_keys, _ = parse_row("res/xml/bottom_row.xml")
if root.get("bottom_row") == "false":