summaryrefslogtreecommitdiffstats
path: root/lib/python/qmk/cli
diff options
context:
space:
mode:
Diffstat (limited to 'lib/python/qmk/cli')
-rw-r--r--lib/python/qmk/cli/generate/keycodes.py5
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():