summaryrefslogtreecommitdiffstats
path: root/tmk_core/common/report.h
diff options
context:
space:
mode:
Diffstat (limited to 'tmk_core/common/report.h')
-rw-r--r--tmk_core/common/report.h20
1 files changed, 17 insertions, 3 deletions
diff --git a/tmk_core/common/report.h b/tmk_core/common/report.h
index c2b1b7c710..1aa33c998d 100644
--- a/tmk_core/common/report.h
+++ b/tmk_core/common/report.h
@@ -29,7 +29,8 @@ enum hid_report_ids {
REPORT_ID_MOUSE,
REPORT_ID_SYSTEM,
REPORT_ID_CONSUMER,
- REPORT_ID_NKRO
+ REPORT_ID_NKRO,
+ REPORT_ID_JOYSTICK
};
/* Mouse buttons */
@@ -46,8 +47,9 @@ enum mouse_buttons {
* See https://www.usb.org/sites/default/files/documents/hut1_12v2.pdf#page=75
*/
enum consumer_usages {
- // 15.5 Display Controls (https://www.usb.org/sites/default/files/hutrr41_0.pdf)
- BRIGHTNESS_UP = 0x06F,
+ // 15.5 Display Controls
+ SNAPSHOT = 0x065,
+ BRIGHTNESS_UP = 0x06F, // https://www.usb.org/sites/default/files/hutrr41_0.pdf
BRIGHTNESS_DOWN = 0x070,
// 15.7 Transport Controls
TRANSPORT_RECORD = 0x0B2,
@@ -57,6 +59,7 @@ enum consumer_usages {
TRANSPORT_PREV_TRACK = 0x0B6,
TRANSPORT_STOP = 0x0B7,
TRANSPORT_EJECT = 0x0B8,
+ TRANSPORT_RANDOM_PLAY = 0x0B9,
TRANSPORT_STOP_EJECT = 0x0CC,
TRANSPORT_PLAY_PAUSE = 0x0CD,
// 15.9.1 Audio Controls - Volume
@@ -71,6 +74,7 @@ enum consumer_usages {
AL_LOCK = 0x19E,
AL_CONTROL_PANEL = 0x19F,
AL_ASSISTANT = 0x1CB,
+ AL_KEYBOARD_LAYOUT = 0x1AE,
// 15.16 Generic GUI Application Controls
AC_MINIMIZE = 0x206,
AC_SEARCH = 0x221,
@@ -186,6 +190,16 @@ typedef struct {
int8_t h;
} __attribute__((packed)) report_mouse_t;
+typedef struct {
+#if JOYSTICK_AXES_COUNT > 0
+ int8_t axes[JOYSTICK_AXES_COUNT];
+#endif
+
+#if JOYSTICK_BUTTON_COUNT > 0
+ uint8_t buttons[(JOYSTICK_BUTTON_COUNT - 1) / 8 + 1];
+#endif
+} __attribute__((packed)) joystick_report_t;
+
/* keycode to system usage */
static inline uint16_t KEYCODE2SYSTEM(uint8_t key) {
switch (key) {