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.
This commit is contained in:
parent
3c0a0ff308
commit
e925319e4c
7 changed files with 24 additions and 19 deletions
|
|
@ -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) {
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue