Allow json keymaps to include a user provided keymap.h (#25987)

This commit is contained in:
Joel Challis
2026-02-09 00:59:34 +00:00
committed by GitHub
parent 6729379041
commit b6d46cdc47
+7
View File
@@ -43,6 +43,13 @@ def generate_keymap_h(cli):
keymap_h_lines = [GPL2_HEADER_C_LIKE, GENERATED_HEADER_C_LIKE, '#pragma once', '// clang-format off']
# Allow a potential keymap level keymap.h for items like user defined keycode aliases used within a keymap.json keymap
keymap_h_lines += [
'#if __has_include_next("keymap.h")',
'# include_next "keymap.h"',
'#endif',
]
keymap_json = parse_configurator_json(cli.args.filename)
if 'keycodes' in keymap_json and keymap_json['keycodes'] is not None: