Reinstate "Add support for 8 buttons to mouse report (#10807)"

This reverts commit 449eacbe01, which
reverted 99f3df2893.
This commit is contained in:
honorless
2023-06-17 17:42:22 -04:00
parent 0b5cd38568
commit b376fcb4ec
6 changed files with 26 additions and 53 deletions

View File

@ -38,11 +38,14 @@ enum hid_report_ids {
/* Mouse buttons */
#define MOUSE_BTN_MASK(n) (1 << (n))
enum mouse_buttons {
MOUSE_BTN1 = (1 << 0),
MOUSE_BTN2 = (1 << 1),
MOUSE_BTN3 = (1 << 2),
MOUSE_BTN4 = (1 << 3),
MOUSE_BTN5 = (1 << 4)
MOUSE_BTN1 = MOUSE_BTN_MASK(0),
MOUSE_BTN2 = MOUSE_BTN_MASK(1),
MOUSE_BTN3 = MOUSE_BTN_MASK(2),
MOUSE_BTN4 = MOUSE_BTN_MASK(3),
MOUSE_BTN5 = MOUSE_BTN_MASK(4),
MOUSE_BTN6 = MOUSE_BTN_MASK(5),
MOUSE_BTN7 = MOUSE_BTN_MASK(6),
MOUSE_BTN8 = MOUSE_BTN_MASK(7)
};
/* Consumer Page (0x0C)