fix mouse reports and improve timeout handling
This commit is contained in:
+4
-4
@@ -50,8 +50,8 @@ void parse_key_list(char * keys) {
|
||||
}
|
||||
|
||||
void parse_mouse_list (char * keys) {
|
||||
static unsigned char mouse_report[3];
|
||||
memset(mouse_report, 0x00, 3);
|
||||
static unsigned char mouse_report[5];
|
||||
memset(mouse_report, 0x00, 5);
|
||||
|
||||
// Javascript sends the list as comma delimited, so split into individual
|
||||
// keys by splitting at commas
|
||||
@@ -75,11 +75,11 @@ void parse_mouse_list (char * keys) {
|
||||
|
||||
// print resulting HID boot mouse report to CDC for debugging
|
||||
printf("Mouse report: ");
|
||||
for(int i=0; i<3; i++){
|
||||
for(int i=0; i<5; i++){
|
||||
printf("%02X ",mouse_report[i]);
|
||||
}
|
||||
printf("\n");
|
||||
tud_hid_report(REPORT_ID_MOUSE, mouse_report, 3);
|
||||
tud_hid_report(REPORT_ID_MOUSE, mouse_report, 5);
|
||||
}
|
||||
|
||||
// take a single Javascript key code and convert it to USB HID scancode
|
||||
|
||||
Reference in New Issue
Block a user