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
This commit is contained in:
parent
b507f9809a
commit
89532eadeb
1 changed files with 1 additions and 1 deletions
|
@ -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 &&
|
if (strcmp(sticky_key->config->behavior.behavior_dev, "KEY_PRESS") == 0 &&
|
||||||
HID_USAGE_ID(sticky_key->param1) == ev->keycode &&
|
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) {
|
SELECT_MODS(sticky_key->param1) == ev->implicit_modifiers) {
|
||||||
// don't catch key down events generated by the sticky key behavior itself
|
// don't catch key down events generated by the sticky key behavior itself
|
||||||
continue;
|
continue;
|
||||||
|
|
Loading…
Reference in a new issue