mirror of
https://github.com/Julow/Unexpected-Keyboard.git
synced 2024-11-25 00:33:24 +01:00
check_layout.py: Handle compass-point attributes
This commit is contained in:
parent
3967fb8a9f
commit
9d76227982
@ -30,8 +30,7 @@ Layout includes some ASCII punctuation but not all, missing: $, &, *, ., /, <, >
|
|||||||
# cyrl_jcuken_uk
|
# cyrl_jcuken_uk
|
||||||
0 warnings
|
0 warnings
|
||||||
# cyrl_lynyertz_sr
|
# cyrl_lynyertz_sr
|
||||||
Layout doesn't define some important keys, missing: delete, loc esc, loc tab
|
0 warnings
|
||||||
1 warnings
|
|
||||||
# cyrl_ueishsht
|
# cyrl_ueishsht
|
||||||
0 warnings
|
0 warnings
|
||||||
# cyrl_yaverti
|
# cyrl_yaverti
|
||||||
@ -102,8 +101,7 @@ Duplicate keys: !, ', ,, -, ., ?
|
|||||||
# latn_qwerty_sk
|
# latn_qwerty_sk
|
||||||
0 warnings
|
0 warnings
|
||||||
# latn_qwerty_sr
|
# latn_qwerty_sr
|
||||||
Layout doesn't define some important keys, missing: delete, loc esc, loc tab
|
0 warnings
|
||||||
1 warnings
|
|
||||||
# latn_qwerty_tly
|
# latn_qwerty_tly
|
||||||
Duplicate keys: a, c, j, q
|
Duplicate keys: a, c, j, q
|
||||||
Layout doesn't define some important keys, missing: loc esc, loc tab
|
Layout doesn't define some important keys, missing: loc esc, loc tab
|
||||||
|
@ -9,6 +9,12 @@ KNOWN_NOT_LAYOUT = set([
|
|||||||
"greekmath", "numeric", "emoji_bottom_row",
|
"greekmath", "numeric", "emoji_bottom_row",
|
||||||
"clipboard_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):
|
def warn(msg):
|
||||||
global warning_count
|
global warning_count
|
||||||
print(msg)
|
print(msg)
|
||||||
@ -39,7 +45,7 @@ def unexpected_keys(keys, symbols, msg):
|
|||||||
def parse_row_from_et(row, keys, dup):
|
def parse_row_from_et(row, keys, dup):
|
||||||
for key in row:
|
for key in row:
|
||||||
for attr in key.keys():
|
for attr in key.keys():
|
||||||
if attr.startswith("key"):
|
if attr in KEY_ATTRIBUTES:
|
||||||
k = key.get(attr).removeprefix("\\")
|
k = key.get(attr).removeprefix("\\")
|
||||||
if k in keys: dup.add(k)
|
if k in keys: dup.add(k)
|
||||||
keys.add(k)
|
keys.add(k)
|
||||||
|
Loading…
Reference in New Issue
Block a user