Skip to content

Commit

Permalink
Fix missing layer numbers from advanced keycodes
Browse files Browse the repository at this point in the history
Buckwich noticed that if the advanced keycode / layer toggling key
contains a number, it goes missing.
Now we properly handle them.
Thx for noticing!
  • Loading branch information
Erovia committed Sep 14, 2020
1 parent 1c25047 commit ddacab8
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion lib/python/qmk/keymap.py
Original file line number Diff line number Diff line change
Expand Up @@ -338,7 +338,7 @@ def _get_layers(keymap): # noqa C901 : until someone has a good idea how to sim
# e.g.: MT(MOD_LCTL | MOD_LSFT, KC_ESC)
layer['keycodes'][-1] += line[1]

elif line[0] is Token.Literal.Number.Integer and is_keymap:
elif line[0] is Token.Literal.Number.Integer and is_keymap and not is_adv_kc:
# If the pre-processor finds the 'meaning' of the layer names,
# they will be numbers
if not layer['name']:
Expand Down

0 comments on commit ddacab8

Please sign in to comment.