Fix layouts containing empty keys

This results in a key being the empty string and do not trigger an
error:

    key1="\"

Layouts are fixed and check_layout now checks for this case.
This commit is contained in:
Jules Aguillon 2024-01-10 00:24:13 +01:00
parent b319356a08
commit 329a35e7d3
5 changed files with 8 additions and 8 deletions

View File

@ -39,7 +39,7 @@ Layout includes some ASCII punctuation but not all, missing: #, $, %, &, ', (, )
Layout doesn't define some important keys, missing: esc, f11_placeholder, f12_placeholder, tab
2 warnings
# deva_inscript
Duplicate keys: ,
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
@ -95,8 +95,7 @@ Layout doesn't define some important keys, missing: f11_placeholder, f12_placeho
# latn_qwerty_us
0 warnings
# latn_qwerty_vi
Layout includes some ASCII punctuation but not all, missing: \
1 warnings
0 warnings
# latn_qwertz
0 warnings
# latn_qwertz_cz
@ -113,7 +112,7 @@ Layout doesn't define some important keys, missing: f11_placeholder, f12_placeho
# latn_qwertz_hu
0 warnings
# latn_qwertz_sk
Layout includes some ASCII punctuation but not all, missing: \, `
Layout includes some ASCII punctuation but not all, missing: `
Layout doesn't define some important keys, missing: f11_placeholder, f12_placeholder
2 warnings
# urdu_phonetic_ur

View File

@ -66,6 +66,7 @@ def check_layout(layout):
[ "f1", "f2", "f3", "f4", "f5", "f6", "f7", "f8", "f9",
"f10", "f11", "f12" ],
"Layout contains function keys")
unexpected_keys(keys, [""], "Layout contains empty strings")
bottom_row_keys = [
"ctrl", "fn", "switch_numeric", "change_method", "switch_emoji",

View File

@ -28,8 +28,8 @@
<key shift="0.1" key0="ट" key1="ठ" key2="ड़" key3="\#" key4="*"/>
<key key0="ं" key1="ँ" key2="।" key3="ॐ" key4="\@"/>
<key key0="म" key1="ण" key2="य" key3="य़" key4="%"/>
<key key0="न" key1="" key2="।" key3=":" key4="&amp;"/>
<key key0="व" key1="" key2="ढ़" key3=";" key4="."/>
<key key0="न" key2="।" key3=":" key4="&amp;"/>
<key key0="व" key2="ढ़" key3=";" key4="."/>
<key key0="ल" key1="ळ" key2="फ़" key3="!" key4=","/>
<key key0="स" key1="श" key2="ष" key3="\?" key4="।"/>
<key shift="0.1" width="1.4" key0="backspace" key2="delete"/>

View File

@ -22,7 +22,7 @@
<key key0="h" key2="=" key3="+"/>
<key key0="j" key1="accent_dot_below" key3="{" key4="}"/>
<key key0="k" key3="[" key4="]"/>
<key key0="l" key2="|" key3="\"/>
<key key0="l" key2="|" key3="\\"/>
</row>
<row>
<key width="1.5" key0="shift" key2="loc capslock"/>

View File

@ -10,7 +10,7 @@
<key key0="u" key1="7" key2="ü" key3="ú" key4="ů"/>
<key key0="i" key1="8" key3="í"/>
<key key0="o" key1="9" key2="ö" key3="ó" key4="ô"/>
<key key0="p" key1="0" key2="=" key3="\" key4="/"/>
<key key0="p" key1="0" key2="=" key3="\\" key4="/"/>
</row>
<row>
<key key0="a" key1="tab" key3="á" key4="ä"/>