From e5721bbd37fcb0372fd007caae5a3f2aed060479 Mon Sep 17 00:00:00 2001 From: Joel Challis Date: Wed, 21 Dec 2022 23:35:23 +0000 Subject: Remaining DD keymap_extras migration (#19110) * Parse headers to data * Regen headers from data --- lib/python/qmk/cli/generate/keycodes.py | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) (limited to 'lib/python/qmk/cli') 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(): -- cgit v1.2.3