From 117e7240d146ba8f3d4bdc59a38317fc99002ba9 Mon Sep 17 00:00:00 2001 From: Johannes Marbach Date: Sun, 19 Sep 2021 13:44:24 +0200 Subject: [PATCH] Consider view unlocked unless lock_view matches current view ID --- examples/us+de/sq2lv_layouts.c | 12 ++++++------ squeek2lvgl.py | 2 +- 2 files changed, 7 insertions(+), 7 deletions(-) diff --git a/examples/us+de/sq2lv_layouts.c b/examples/us+de/sq2lv_layouts.c index c829e8b..98b140e 100644 --- a/examples/us+de/sq2lv_layouts.c +++ b/examples/us+de/sq2lv_layouts.c @@ -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 */ diff --git a/squeek2lvgl.py b/squeek2lvgl.py index a099cc6..52974aa 100644 --- a/squeek2lvgl.py +++ b/squeek2lvgl.py @@ -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)