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:
innovaker
2020-11-03 16:54:16 +00:00
committed by Pete Johanson
parent 3c0a0ff308
commit e925319e4c
7 changed files with 24 additions and 19 deletions

View File

@@ -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) {