CLI: Add 'via2json' subcommand (#16468)
This commit is contained in:
@ -146,7 +146,13 @@ class KeymapJSONEncoder(QMKJSONEncoder):
|
||||
if key == 'JSON_NEWLINE':
|
||||
layer.append([])
|
||||
else:
|
||||
layer[-1].append(f'"{key}"')
|
||||
if isinstance(key, dict):
|
||||
# We have a macro
|
||||
|
||||
# TODO: Add proper support for nicely formatting keymap.json macros
|
||||
layer[-1].append(f'{self.encode(key)}')
|
||||
else:
|
||||
layer[-1].append(f'"{key}"')
|
||||
|
||||
layer = [f"{self.indent_str*indent_level}{', '.join(row)}" for row in layer]
|
||||
|
||||
|
Reference in New Issue
Block a user