1
0
Fork 0
forked from forks/qmk_firmware

ensure we do not conflict with existing keymap aliases (#12976)

This commit is contained in:
Zach White 2021-05-21 16:59:10 -07:00 committed by GitHub
parent de8fada3a3
commit 4c0d8ae8d7
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -85,7 +85,9 @@ def generate_layouts(cli):
for alias, target in kb_info_json.get('layout_aliases', {}).items():
layouts_h_lines.append('')
layouts_h_lines.append('#define %s %s' % (alias, target))
layouts_h_lines.append(f'#ifndef {alias}')
layouts_h_lines.append(f'# define {alias} {target}')
layouts_h_lines.append('#endif')
# Show the results
layouts_h = '\n'.join(layouts_h_lines) + '\n'