forked from kofal.net/zmk
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:
@@ -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) {
|
||||
|
||||
Reference in New Issue
Block a user