forked from kofal.net/zmk
refactor(hid): add mask to HID_USAGE_PAGE macro
This commit is contained in:
committed by
Pete Johanson
parent
57fca34dc0
commit
c5922fae56
@@ -162,7 +162,7 @@ static int behavior_caps_word_init(const struct device *dev) {
|
||||
#define CAPS_WORD_LABEL(i, _n) DT_INST_LABEL(i)
|
||||
|
||||
#define PARSE_BREAK(i) \
|
||||
{.page = (ZMK_HID_USAGE_PAGE(i) & 0xFF), \
|
||||
{.page = ZMK_HID_USAGE_PAGE(i), \
|
||||
.id = ZMK_HID_USAGE_ID(i), \
|
||||
.implicit_modifiers = SELECT_MODS(i)},
|
||||
|
||||
|
||||
@@ -199,7 +199,7 @@ static int sticky_key_keycode_state_changed_listener(const zmk_event_t *eh) {
|
||||
|
||||
if (strcmp(sticky_key->config->behavior.behavior_dev, "KEY_PRESS") == 0 &&
|
||||
ZMK_HID_USAGE_ID(sticky_key->param1) == ev->keycode &&
|
||||
(ZMK_HID_USAGE_PAGE(sticky_key->param1) & 0xFF) == ev->usage_page &&
|
||||
ZMK_HID_USAGE_PAGE(sticky_key->param1) == 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;
|
||||
|
||||
Reference in New Issue
Block a user