Skip to content

Commit

Permalink
Update documentation link and improve documentation on keys value source
Browse files Browse the repository at this point in the history
  • Loading branch information
gromain committed Apr 23, 2021
1 parent 293b242 commit afc2053
Showing 1 changed file with 4 additions and 2 deletions.
6 changes: 4 additions & 2 deletions USBHID.h
Original file line number Diff line number Diff line change
Expand Up @@ -532,9 +532,9 @@ class HIDConsumer : public HIDReporter {
BRIGHTNESS_DOWN = 0x70,
VOLUME_UP = 0xE9,
VOLUME_DOWN = 0xEA,
MUTE = 0xE2,
MUTE = 0xE2,
PLAY_OR_PAUSE = 0xCD
// see pages 75ff of http://www.usb.org/developers/hidpage/Hut1_12v2.pdf
// see pages 117 of https://www.usb.org/sites/default/files/hut1_22.pdf
};
HIDConsumer(USBHID& HID, uint8_t reportID=HID_CONSUMER_REPORT_ID) : HIDReporter(HID, hidReportConsumer, (uint8_t*)&report, sizeof(report), reportID) {
report.button = 0;
Expand All @@ -554,6 +554,8 @@ class HIDConsumer : public HIDReporter {
#define KEY_RIGHT_ALT 0x86
#define KEY_RIGHT_GUI 0x87

// The following definitions takes their value from the document at https://www.usb.org/sites/default/files/hut1_22.pdf, starting p82
// However, their value are augmented by 0x88 (for example, KEY_F12 real value is 0x45)
#define KEY_UP_ARROW 0xDA
#define KEY_DOWN_ARROW 0xD9
#define KEY_LEFT_ARROW 0xD8
Expand Down

0 comments on commit afc2053

Please sign in to comment.