diff options
author | innovaker <66737976+innovaker@users.noreply.github.com> | 2020-11-03 16:54:16 +0000 |
---|---|---|
committer | Pete Johanson <peter@peterjohanson.com> | 2020-11-03 23:50:54 -0500 |
commit | e925319e4ce14b8aaf3515d3f2bea8b9eb287e89 (patch) | |
tree | 9d9061928629033e1e6c366b03778b9f6a595e10 /app/src/behaviors/behavior_hold_tap.c | |
parent | 3c0a0ff3087d7c3d522d610227c6fedcec8f27a7 (diff) |
refactor(hid): Replace deprecated HID usage page references
Deprecate `USAGE_KEYPAD` and replace with `HID_USAGE_KEY`.
Deprecate `USAGE_CONSUMER` and replace with `HID_USAGE_CONSUMER`.
Closes #217.
Diffstat (limited to 'app/src/behaviors/behavior_hold_tap.c')
-rw-r--r-- | app/src/behaviors/behavior_hold_tap.c | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/app/src/behaviors/behavior_hold_tap.c b/app/src/behaviors/behavior_hold_tap.c index ac91e7d..d190148 100644 --- a/app/src/behaviors/behavior_hold_tap.c +++ b/app/src/behaviors/behavior_hold_tap.c @@ -9,6 +9,7 @@ #include <device.h> #include <drivers/behavior.h> #include <dt-bindings/zmk/keys.h> +#include <dt-bindings/zmk/hid_usage_pages.h> #include <logging/log.h> #include <zmk/behavior.h> #include <zmk/matrix.h> @@ -428,7 +429,7 @@ static int position_state_changed_listener(const struct zmk_event_header *eh) { } static inline bool only_mods(struct keycode_state_changed *ev) { - return ev->usage_page == USAGE_KEYPAD && ev->keycode >= LCTL && ev->keycode <= RGUI; + return ev->usage_page == HID_USAGE_KEY && ev->keycode >= LCTL && ev->keycode <= RGUI; } static int keycode_state_changed_listener(const struct zmk_event_header *eh) { |