@ -10,6 +10,8 @@
@@ -10,6 +10,8 @@
# include <usb/class/usb_hid.h>
# include <zmk/keys.h>
# include <dt-bindings/zmk/hid_usage.h>
# include <dt-bindings/zmk/hid_usage_pages.h>
# define COLLECTION_REPORT 0x03
@ -20,19 +22,19 @@
@@ -20,19 +22,19 @@
static const u8_t zmk_hid_report_desc [ ] = {
/* USAGE_PAGE (Generic Desktop) */
HID_GI_USAGE_PAGE ,
USAGE_GEN_ DESKTOP ,
HID_ USAGE_GD,
/* USAGE (Keyboard) */
HID_LI_USAGE ,
USAGE_GEN_ DESKTOP _KEYBOARD ,
HID_ USAGE_GD_KEYBOARD,
/* COLLECTION (Application) */
HID_MI_COLLECTION ,
COLLECTION_APPLICATION ,
/* REPORT ID (1) */
HID_GI_REPORT_ID ,
0x01 ,
/* USAGE_PAGE (Keypad) */
/* USAGE_PAGE (Keyboard/Key pad) */
HID_GI_USAGE_PAGE ,
USAGE_GEN_DESKTOP_ KEYPAD ,
HID_ USAGE_KEY,
/* USAGE_MINIMUM (Keyboard LeftControl) */
HID_LI_USAGE_MIN ( 1 ) ,
0xE0 ,
@ -56,9 +58,9 @@ static const u8_t zmk_hid_report_desc[] = {
@@ -56,9 +58,9 @@ static const u8_t zmk_hid_report_desc[] = {
HID_MI_INPUT ,
0x02 ,
/* USAGE_PAGE (Keypad) */
/* USAGE_PAGE (Keyboard/Key pad) */
HID_GI_USAGE_PAGE ,
USAGE_GEN_DESKTOP_ KEYPAD ,
HID_ USAGE_KEY,
/* REPORT_SIZE (8) */
HID_GI_REPORT_SIZE ,
0x08 ,
@ -69,9 +71,9 @@ static const u8_t zmk_hid_report_desc[] = {
@@ -69,9 +71,9 @@ static const u8_t zmk_hid_report_desc[] = {
HID_MI_INPUT ,
0x03 ,
/* USAGE_PAGE (Keypad) */
/* USAGE_PAGE (Keyboard/Key pad) */
HID_GI_USAGE_PAGE ,
USAGE_GEN_DESKTOP_ KEYPAD ,
HID_ USAGE_KEY,
/* LOGICAL_MINIMUM (0) */
HID_GI_LOGICAL_MIN ( 1 ) ,
0x00 ,
@ -98,7 +100,7 @@ static const u8_t zmk_hid_report_desc[] = {
@@ -98,7 +100,7 @@ static const u8_t zmk_hid_report_desc[] = {
HID_MI_COLLECTION_END ,
/* USAGE_PAGE (Consumer) */
HID_GI_USAGE_PAGE ,
0x0C ,
HID_USAGE_CONSUMER ,
/* USAGE (Consumer Control) */
HID_LI_USAGE ,
0x01 ,
@ -110,7 +112,7 @@ static const u8_t zmk_hid_report_desc[] = {
@@ -110,7 +112,7 @@ static const u8_t zmk_hid_report_desc[] = {
0x02 ,
/* USAGE_PAGE (Consumer) */
HID_GI_USAGE_PAGE ,
0x0C ,
HID_USAGE_CONSUMER ,
/* LOGICAL_MINIMUM (0) */
HID_GI_LOGICAL_MIN ( 1 ) ,
0x00 ,