Custom keycodes in JSON (#19925)
This commit is contained in:
parent
e35bb8ebfa
commit
79b0f9168e
9 changed files with 129 additions and 13 deletions
|
@ -103,6 +103,12 @@ def _validate(keyboard, info_data):
|
|||
if layout_name not in layouts and layout_name not in layout_aliases:
|
||||
_log_error(info_data, 'Claims to support community layout %s but no %s() macro found' % (layout, layout_name))
|
||||
|
||||
# keycodes with length > 7 must have short forms for visualisation purposes
|
||||
for decl in info_data.get('keycodes', []):
|
||||
if len(decl["key"]) > 7:
|
||||
if not decl.get("aliases", []):
|
||||
_log_error(info_data, f'Keycode {decl["key"]} has no short form alias')
|
||||
|
||||
|
||||
def info_json(keyboard):
|
||||
"""Generate the info.json data for a specific keyboard.
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue