forked from mirrors/qmk_firmware
more robust key label parsing
This commit is contained in:
parent
0177fbd65b
commit
543e663c68
1 changed files with 9 additions and 1 deletions
|
@ -16,7 +16,15 @@ def kle2qmk(kle):
|
||||||
continue
|
continue
|
||||||
|
|
||||||
if key['label_style'] in [0, 4]:
|
if key['label_style'] in [0, 4]:
|
||||||
matrix, _, _, alt_layout, layout_name, _, keycode = key['name'].split('\n')
|
key_name = key['name'].split('\n')
|
||||||
|
if len(key_name) == 7:
|
||||||
|
matrix, _, _, alt_layout, layout_name, _, keycode = key_name
|
||||||
|
elif len(key_name) == 5:
|
||||||
|
matrix, _, _, alt_layout, layout_name = key_name
|
||||||
|
cli.log.warning('Missing Keycode for key at matrix %s layout %s.', matrix, alt_layout)
|
||||||
|
else:
|
||||||
|
cli.log.error('Unknown label format: %s', repr(key['name']))
|
||||||
|
continue
|
||||||
else:
|
else:
|
||||||
cli.log.error('Unknown label style: %s', key['label_style'])
|
cli.log.error('Unknown label style: %s', key['label_style'])
|
||||||
continue
|
continue
|
||||||
|
|
Loading…
Reference in a new issue