Keycode alias support.
This commit is contained in:
parent
4758f6c695
commit
519bd5ac45
4 changed files with 12 additions and 2 deletions
|
|
@ -47,6 +47,8 @@ def _render_keycodes(module_jsons):
|
|||
first = False
|
||||
else:
|
||||
lines.append(f' {key},')
|
||||
for alias in keycode.get('aliases', []):
|
||||
lines.append(f' {alias} = {key},')
|
||||
lines.append('')
|
||||
lines.append(' LAST_COMMUNITY_MODULE_KEY')
|
||||
lines.append('};')
|
||||
|
|
|
|||
|
|
@ -256,5 +256,10 @@ class CommunityModuleJSONEncoder(QMKJSONEncoder):
|
|||
return '03features'
|
||||
if key == 'keycodes':
|
||||
return '04keycodes'
|
||||
elif self.indentation_level == 3: # keycodes
|
||||
if key == 'key':
|
||||
return '00key'
|
||||
if key == 'aliases':
|
||||
return '01aliases'
|
||||
|
||||
return key
|
||||
|
|
|
|||
Loading…
Reference in a new issue