diff options
author | Ryan <fauxpark@gmail.com> | 2023-07-31 09:35:06 +1000 |
---|---|---|
committer | GitHub <noreply@github.com> | 2023-07-31 09:35:06 +1000 |
commit | f407d9059878087bdc458479247d908c88f8d89d (patch) | |
tree | 5675943404a5f68a06fae402b85685600d47e4f3 /lib/python | |
parent | cc3bd728f00d95c2360bca9326de2ba30078c274 (diff) |
keycode aliases: work around ChibiOS ch.h include guard (#21497)
Diffstat (limited to 'lib/python')
-rw-r--r-- | lib/python/qmk/cli/generate/keycodes.py | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/lib/python/qmk/cli/generate/keycodes.py b/lib/python/qmk/cli/generate/keycodes.py index 3b69b17ed1..ed8b6827bd 100644 --- a/lib/python/qmk/cli/generate/keycodes.py +++ b/lib/python/qmk/cli/generate/keycodes.py @@ -96,6 +96,11 @@ def _generate_helpers(lines, keycodes): def _generate_aliases(lines, keycodes): + # Work around ChibiOS ch.h include guard + if 'CH_H' in [value['key'] for value in keycodes['aliases'].values()]: + lines.append('') + lines.append('#undef CH_H') + lines.append('') lines.append('// Aliases') for key, value in keycodes["aliases"].items(): |