keycode aliases: work around ChibiOS ch.h include guard (#21497)
parent
cc3bd728f0
commit
f407d90598
|
@ -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():
|
||||
|
|
|
@ -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
|
||||
|
|
|
@ -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
|
||||
|
|
Loading…
Reference in New Issue