summaryrefslogtreecommitdiff
path: root/lib/python/qmk/cli/generate
diff options
context:
space:
mode:
authorJoel Challis <git@zvecr.com>2022-12-21 23:35:23 +0000
committerGitHub <noreply@github.com>2022-12-21 23:35:23 +0000
commite5721bbd37fcb0372fd007caae5a3f2aed060479 (patch)
tree68bfcddfb400d00cbbea3d14e5a3b1c90492218c /lib/python/qmk/cli/generate
parent89b72017a014ca4810790831030c88054129f21c (diff)
Remaining DD keymap_extras migration (#19110)
* Parse headers to data * Regen headers from data
Diffstat (limited to 'lib/python/qmk/cli/generate')
-rw-r--r--lib/python/qmk/cli/generate/keycodes.py7
1 files changed, 4 insertions, 3 deletions
diff --git a/lib/python/qmk/cli/generate/keycodes.py b/lib/python/qmk/cli/generate/keycodes.py
index cf80689708..2ed84cd589 100644
--- a/lib/python/qmk/cli/generate/keycodes.py
+++ b/lib/python/qmk/cli/generate/keycodes.py
@@ -91,9 +91,10 @@ def _generate_aliases(lines, keycodes):
for key, value in keycodes["aliases"].items():
define = _render_key(value.get("key"))
val = _render_key(key)
- label = _render_label(value.get("label"))
-
- lines.append(f'#define {define} {val} // {label}')
+ if 'label' in value:
+ lines.append(f'#define {define} {val} // {_render_label(value.get("label"))}')
+ else:
+ lines.append(f'#define {define} {val}')
lines.append('')
for key, value in keycodes["aliases"].items():