Behaviors: Fix memory leak in sticky keys
This handler returned 'ZMK_EV_EVENT_CAPTURED' instead of 'ZMK_EV_EVENT_HANDLED' as it should, and did not free the memory.
This commit is contained in:
parent
1d5b48cb52
commit
6990735768
1 changed files with 1 additions and 1 deletions
|
@ -226,7 +226,7 @@ static int sticky_key_keycode_state_changed_listener(const zmk_event_t *eh) {
|
||||||
// continue processing the event. Release the sticky key afterwards.
|
// continue processing the event. Release the sticky key afterwards.
|
||||||
ZMK_EVENT_RAISE_AFTER(eh, behavior_sticky_key);
|
ZMK_EVENT_RAISE_AFTER(eh, behavior_sticky_key);
|
||||||
release_sticky_key_behavior(sticky_key, ev->timestamp);
|
release_sticky_key_behavior(sticky_key, ev->timestamp);
|
||||||
return ZMK_EV_EVENT_CAPTURED;
|
return ZMK_EV_EVENT_HANDLED;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
sticky_key->modified_key_usage_page = ev->usage_page;
|
sticky_key->modified_key_usage_page = ev->usage_page;
|
||||||
|
|
Loading…
Add table
Reference in a new issue