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

@ -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":