From f36883b404c0a1c63ac2b200904f7dc1359c26ac Mon Sep 17 00:00:00 2001 From: fauxpark Date: Mon, 10 Jul 2023 14:39:51 +1000 Subject: [PATCH 1/2] keycode aliases: work around ChibiOS ch.h include guard --- lib/python/qmk/cli/generate/keycodes.py | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/lib/python/qmk/cli/generate/keycodes.py b/lib/python/qmk/cli/generate/keycodes.py index 3b69b17ed1cd..ed8b6827bdfe 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(): From e33f091e55124fd31a63c037c0320f9cbea7f200 Mon Sep 17 00:00:00 2001 From: fauxpark Date: Mon, 10 Jul 2023 14:48:19 +1000 Subject: [PATCH 2/2] Regen --- quantum/keymap_extras/keymap_swiss_de.h | 2 ++ quantum/keymap_extras/keymap_swiss_fr.h | 2 ++ 2 files changed, 4 insertions(+) diff --git a/quantum/keymap_extras/keymap_swiss_de.h b/quantum/keymap_extras/keymap_swiss_de.h index 69bba7293e67..c22191dd4e7a 100644 --- a/quantum/keymap_extras/keymap_swiss_de.h +++ b/quantum/keymap_extras/keymap_swiss_de.h @@ -27,6 +27,8 @@ #include "keycodes.h" // clang-format off +#undef CH_H + // Aliases #define CH_SECT KC_GRV // § #define CH_1 KC_1 // 1 diff --git a/quantum/keymap_extras/keymap_swiss_fr.h b/quantum/keymap_extras/keymap_swiss_fr.h index 1e2f833db16f..e0e8e52c9cef 100644 --- a/quantum/keymap_extras/keymap_swiss_fr.h +++ b/quantum/keymap_extras/keymap_swiss_fr.h @@ -27,6 +27,8 @@ #include "keycodes.h" // clang-format off +#undef CH_H + // Aliases #define CH_SECT KC_GRV // § #define CH_1 KC_1 // 1