summaryrefslogtreecommitdiff
path: root/app/include/zmk/hid.h
diff options
context:
space:
mode:
authorinnovaker <66737976+innovaker@users.noreply.github.com>2020-11-21 20:09:21 +0000
committerPete Johanson <peter@peterjohanson.com>2020-11-21 15:52:16 -0500
commit3ac1a11a370d262e54538f0e10d947303cf77afa (patch)
treed698e9fbdd916c65a28cd8858a8ff063c813f4de /app/include/zmk/hid.h
parent3ebd192411c347ad0bf4859a63206efb6b730c29 (diff)
refactor: change `keypad` to `keyboard`
The application usage used by report 1 is `HID_USAGE_GD_KEYBOARD`. Moreover, the `keys` usage page (0x07) that primarily feeds into this report is predominantly keyboard codes. The rest of the system should align with this naming convention.
Diffstat (limited to 'app/include/zmk/hid.h')
-rw-r--r--app/include/zmk/hid.h22
1 files changed, 11 insertions, 11 deletions
diff --git a/app/include/zmk/hid.h b/app/include/zmk/hid.h
index 3f3833f..306bc26 100644
--- a/app/include/zmk/hid.h
+++ b/app/include/zmk/hid.h
@@ -15,7 +15,7 @@
#define COLLECTION_REPORT 0x03
-#define ZMK_HID_KEYPAD_NKRO_SIZE 6
+#define ZMK_HID_KEYBOARD_NKRO_SIZE 6
#define ZMK_HID_CONSUMER_NKRO_SIZE 6
@@ -89,9 +89,9 @@ static const u8_t zmk_hid_report_desc[] = {
/* REPORT_SIZE (1) */
HID_GI_REPORT_SIZE,
0x08,
- /* REPORT_COUNT (ZMK_HID_KEYPAD_NKRO_SIZE) */
+ /* REPORT_COUNT (ZMK_HID_KEYBOARD_NKRO_SIZE) */
HID_GI_REPORT_COUNT,
- ZMK_HID_KEYPAD_NKRO_SIZE,
+ ZMK_HID_KEYBOARD_NKRO_SIZE,
/* INPUT (Data,Ary,Abs) */
HID_MI_INPUT,
0x00,
@@ -146,15 +146,15 @@ static const u8_t zmk_hid_report_desc[] = {
// u8_t keys[6];
// } __packed;
-struct zmk_hid_keypad_report_body {
+struct zmk_hid_keyboard_report_body {
zmk_mod_flags modifiers;
u8_t _reserved;
- u8_t keys[ZMK_HID_KEYPAD_NKRO_SIZE];
+ u8_t keys[ZMK_HID_KEYBOARD_NKRO_SIZE];
} __packed;
-struct zmk_hid_keypad_report {
+struct zmk_hid_keyboard_report {
u8_t report_id;
- struct zmk_hid_keypad_report_body body;
+ struct zmk_hid_keyboard_report_body body;
} __packed;
struct zmk_hid_consumer_report_body {
@@ -170,13 +170,13 @@ int zmk_hid_register_mod(zmk_mod modifier);
int zmk_hid_unregister_mod(zmk_mod modifier);
int zmk_hid_implicit_modifiers_press(zmk_mod_flags implicit_modifiers);
int zmk_hid_implicit_modifiers_release();
-int zmk_hid_keypad_press(zmk_key key);
-int zmk_hid_keypad_release(zmk_key key);
-void zmk_hid_keypad_clear();
+int zmk_hid_keyboard_press(zmk_key key);
+int zmk_hid_keyboard_release(zmk_key key);
+void zmk_hid_keyboard_clear();
int zmk_hid_consumer_press(zmk_key key);
int zmk_hid_consumer_release(zmk_key key);
void zmk_hid_consumer_clear();
-struct zmk_hid_keypad_report *zmk_hid_get_keypad_report();
+struct zmk_hid_keyboard_report *zmk_hid_get_keyboard_report();
struct zmk_hid_consumer_report *zmk_hid_get_consumer_report();