Browse Source

Merge pull request #123 from okke-formsma/bugfix-modtap

fix bug in modtap behavior which cleared the wrong keycode events
xmkb
Pete Johanson 4 years ago committed by GitHub
parent
commit
7d8c0411d5
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
  1. 4
      app/src/behaviors/behavior_mod_tap.c

4
app/src/behaviors/behavior_mod_tap.c

@ -193,8 +193,8 @@ static int on_keymap_binding_released(struct device *dev, u32_t position, u32_t
} }
struct keycode_state_changed *ev = data->captured_keycode_events[j].event; struct keycode_state_changed *ev = data->captured_keycode_events[j].event;
data->captured_keycode_events[i].event = NULL; data->captured_keycode_events[j].event = NULL;
data->captured_keycode_events[i].active_mods = 0; data->captured_keycode_events[j].active_mods = 0;
LOG_DBG("Re-sending latched key press for usage page 0x%02X keycode 0x%02X state %s", ev->usage_page, ev->keycode, (ev->state ? "pressed" : "released")); LOG_DBG("Re-sending latched key press for usage page 0x%02X keycode 0x%02X state %s", ev->usage_page, ev->keycode, (ev->state ? "pressed" : "released"));
ZMK_EVENT_RELEASE(ev); ZMK_EVENT_RELEASE(ev);
k_msleep(10); k_msleep(10);

Loading…
Cancel
Save