I have this standard HID descriptor below running on STM32, it works with standard keyboard keys, but not with special keypad ones:
#define HID_USAGE_KEY_KEYPAD_LEFT_PARENTHESIS (0xB6) // Sel
#define HID_USAGE_KEY_KEYPAD_RIGHT_PARENTHESIS (0xB7) // Sel
HID table:
0x05, 0x01, // USAGE_PAGE (Generic Desktop)
0x09, 0x06, // USAGE (Keyboard)
0xa1, 0x01, // COLLECTION (Application)
// 1bte modifiers
0x05, 0x07, // USAGE_PAGE (Keyboard)
0x19, 0xe0, // USAGE_MINIMUM (Keyboard LeftControl)
0x29, 0xe7, // USAGE_MAXIMUM (Keyboard Right GUI)
0x15, 0x00, // LOGICAL_MINIMUM (0)
0x25, 0x01, // LOGICAL_MAXIMUM (1)
0x75, 0x01, // REPORT_SIZE (1) 1bitx8
0x95, 0x08, // REPORT_COUNT (8)
0x81, 0x02, // INPUT (Data,Var,Abs)
// 1byte LED
0x95, 0x01, // REPORT_COUNT (1)
0x75, 0x08, // REPORT_SIZE (8)
0x81, 0x03, // INPUT (Cnst,Var,Abs)
0x95, 0x05, // REPORT_COUNT (5)
0x75, 0x01, // REPORT_SIZE (1)
0x05, 0x08, // USAGE_PAGE (LEDs)
0x19, 0x01, // USAGE_MINIMUM (Num Lock)
0x29, 0x05, // USAGE_MAXIMUM (Kana)
0x91, 0x02, // OUTPUT (Data,Var,Abs)
0x95, 0x01, // REPORT_COUNT (1) 1bitx3 filler
0x75, 0x03, // REPORT_SIZE (3)
0x91, 0x03, // OUTPUT (Cnst,Var,Abs)
// 6bytes
0x05, 0x07, // USAGE_PAGE (Keyboard)
0x19, 0x00, // USAGE_MINIMUM (Reserved (no event indicated))
0x29, 0xff, // USAGE_MAXIMUM (Keyboard Application)
0x15, 0x00, // LOGICAL_MINIMUM (0)
0x25, 0xff, // LOGICAL_MAXIMUM
0x75, 0x08, // REPORT_SIZE (8) 8bit x 6byte
0x95, 0x06, // REPORT_COUNT (6)
0x81, 0x00, // INPUT (Data,Ary,Abs)
0xc0 // END_COLLECTION
I tried to set ranges to 00-FF, but looks like those keys are never seen by Windows 10. (also tried to capture raw key presses)
My report looks like:
typedef struct
{
uint8_t MODIFIER; /* bitfield */
uint8_t RESERVED;
uint8_t KEYCODES[6];
} subKeyBoard;
Again, it works great with standard 101 keyboard keys. Numlock also doesn't make a difference.
I want these keys to be recognised:
#define HID_USAGE_KEY_KEYPAD_LEFT_PARENTHESIS (0xB6) // Sel
#define HID_USAGE_KEY_KEYPAD_RIGHT_PARENTHESIS (0xB7) // Sel
My HID descriptor can be wrong, it's hard to validate.