diff options
author | innovaker <66737976+innovaker@users.noreply.github.com> | 2020-12-17 16:10:25 +0000 |
---|---|---|
committer | Pete Johanson <peter@peterjohanson.com> | 2020-12-17 16:52:15 -0500 |
commit | 89532eadeb3c34a5ecbb867a63eb7a77415d08a2 (patch) | |
tree | c2b5b8fa45862bdbbf7cf3c3159788d528f59670 /app | |
parent | b507f9809af6d86aea26b54c327f0a208d35d25b (diff) |
fix(sticky keys): add 0xFF mask to usage_page
Aligns unpacking of usage_page with its equivalent line in keycode-state-changed.h
PR: #520
Diffstat (limited to 'app')
-rw-r--r-- | app/src/behaviors/behavior_sticky_key.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/app/src/behaviors/behavior_sticky_key.c b/app/src/behaviors/behavior_sticky_key.c index 19aa79a..4695c7a 100644 --- a/app/src/behaviors/behavior_sticky_key.c +++ b/app/src/behaviors/behavior_sticky_key.c @@ -188,7 +188,7 @@ static int sticky_key_keycode_state_changed_listener(const struct zmk_event_head if (strcmp(sticky_key->config->behavior.behavior_dev, "KEY_PRESS") == 0 && HID_USAGE_ID(sticky_key->param1) == ev->keycode && - HID_USAGE_PAGE(sticky_key->param1) == ev->usage_page && + (HID_USAGE_PAGE(sticky_key->param1) & 0xFF) == ev->usage_page && SELECT_MODS(sticky_key->param1) == ev->implicit_modifiers) { // don't catch key down events generated by the sticky key behavior itself continue; |