Correctly handle layer lockers

This commit is contained in:
Johannes Marbach 2021-09-12 21:58:51 +02:00
parent 17e9b82604
commit ff72362365
3 changed files with 7 additions and 5 deletions

View file

@ -90,7 +90,7 @@ static const int switcher_idxs_upper_terminal_us[] = { \
};
static const int switcher_dests_upper_terminal_us[] = { \
1, 2 \
0, 2 \
};
static const int num_scancodes_upper_terminal_us = 5;

View file

@ -59,7 +59,7 @@ static const int switcher_idxs_upper_us[] = { \
};
static const int switcher_dests_upper_us[] = { \
1, 2 \
0, 2 \
};
/* Layer: Numbers / symbols - generated from numbers */

View file

@ -528,9 +528,11 @@ def get_keycaps_attrs_switchers_scancodes(args, layout_id, view_id, data_views,
if 'set_view' in action:
dest = action['set_view']
elif 'locking' in action and 'lock_view' in action['locking']:
dest = action['locking']['lock_view']
elif 'locking' in action and 'lock_view' in action['locking'] and 'unlock_view' in action['locking']:
if action['locking']['lock_view'] == view_id:
dest = action['locking']['unlock_view']
elif action['locking']['unlock_view'] == view_id:
dest = action['locking']['lock_view']
if dest:
switcher_idxs.append(idx)
switcher_dests.append(dest)