From 1c3c6f01c62ffc58ff8c474ab03cb8f06e97d428 Mon Sep 17 00:00:00 2001 From: Cem Aksoylar Date: Sat, 14 Oct 2023 16:50:31 -0700 Subject: [PATCH] rgbled_widget: Separate out trigger for two halves --- config/boards/shields/rgbled_widget/leds.c | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/config/boards/shields/rgbled_widget/leds.c b/config/boards/shields/rgbled_widget/leds.c index 8a341eaf..d03539c8 100644 --- a/config/boards/shields/rgbled_widget/leds.c +++ b/config/boards/shields/rgbled_widget/leds.c @@ -114,14 +114,15 @@ ZMK_SUBSCRIPTION(led_battery_listener, zmk_battery_state_changed); static int led_position_listener_cb(const zmk_event_t *eh) { const struct zmk_position_state_changed *ev = as_zmk_position_state_changed(eh); - if (!ev) { + if (!ev || ev->source != ZMK_POSITION_STATE_CHANGE_SOURCE_LOCAL) { return ZMK_EV_EVENT_BUBBLE; } static uint8_t combo_state = 0; if (ev->state && - ((combo_state == 0 && ev->position == 6) || (combo_state == 1 && ev->position == 5))) { + (((combo_state == 0 && ev->position == 6) || (combo_state == 1 && ev->position == 5)) || + ((combo_state == 0 && ev->position == 3) || (combo_state == 1 && ev->position == 4)))) { combo_state++; } else { combo_state = 0;