Skip to content

Commit

Permalink
ensure we do not conflict with existing keymap aliases (qmk#12976)
Browse files Browse the repository at this point in the history
  • Loading branch information
skullydazed authored and nhongooi committed Dec 5, 2021
1 parent 848c775 commit 0014c3c
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion lib/python/qmk/cli/generate/layouts.py
Original file line number Diff line number Diff line change
Expand Up @@ -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'
Expand Down

0 comments on commit 0014c3c

Please sign in to comment.