Skip to content

Commit 318ca26

Browse files
Fix USB Mouse/Joystick HID report ID
Fixes #1410 The USB Keyboard now has 2 reports (keyboard + consumer control), so when both Keyboard and Mouse libraries are included, the Mouse must be report 3, not 2. Update the Mouse and Joystick report IDs appropriately.
1 parent a916695 commit 318ca26

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

cores/rp2040/RP2040USB.cpp

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -130,13 +130,13 @@ int __USBGetKeyboardReportID() {
130130
}
131131

132132
int __USBGetMouseReportID() {
133-
return __USBInstallKeyboard ? 2 : 1;
133+
return __USBInstallKeyboard ? 3 : 1;
134134
}
135135

136136
int __USBGetJoystickReportID() {
137137
int i = 1;
138138
if (__USBInstallKeyboard) {
139-
i++;
139+
i += 2
140140
}
141141
if (__USBInstallMouse || __USBInstallAbsoluteMouse) {
142142
i++;

0 commit comments

Comments
 (0)