Consider view unlocked unless lock_view matches current view ID

This commit is contained in:
Johannes Marbach 2021-09-19 13:44:24 +02:00
parent 94efcf33cd
commit 117e7240d1
2 changed files with 7 additions and 7 deletions

View file

@ -215,14 +215,14 @@ static const int modifier_idxs_upper_de[] = { \
\
};
static const int num_switchers_upper_de = 2;
static const int num_switchers_upper_de = 3;
static const int switcher_idxs_upper_de[] = { \
19, 28 \
19, 28, 29 \
};
static const int switcher_dests_upper_de[] = { \
0, 2 \
0, 2, 3 \
};
/* Layer: Numbers / symbols - generated from numbers */
@ -249,14 +249,14 @@ static const int modifier_idxs_numbers_de[] = { \
\
};
static const int num_switchers_numbers_de = 1;
static const int num_switchers_numbers_de = 2;
static const int switcher_idxs_numbers_de[] = { \
28 \
28, 29 \
};
static const int switcher_dests_numbers_de[] = { \
0 \
0, 3 \
};
/* Layer: Special characters - generated from eschars */

View file

@ -556,7 +556,7 @@ def get_keycaps_attrs_modifiers_switchers_scancodes(args, layout_id, view_id, da
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:
else:
dest = action['locking']['lock_view']
if dest:
switcher_idxs.append(idx)