This really is a shot in the dark. But I have an old windows 2000 computer (legacy hardware in the lab), and I wish to automate some repetitive actions on that computer. Thus, I bought a Leonardo and used the Mouse.h library to control the computer.
I have tested my prototype with my main computer (which runs on windows 11) and my mac and another computer in the lab (which runs on windows XP). The Leonardo seems to be controlling the mouse just fine on these systems. But when I plug it into the windows 2000 PC, it seems like the PC is having trouble recognising that Leonardo is an HID-compatible device. Originally I thought that was not a problem because I could just 'tell' the computer that Leonardo is an HID-Compatible device. However, I have had no luck with that. I could not figure out how to forcefully install a mouse driver for the Leonardo.
Does anyone know any workaround? Or perhaps someone can enlighten me with some Windows 2000 skills? That computer is almost as old as me and I am certainly no expert in legacy devices.
The computer has a generic USB mouse on it, which works perfectly fine. And when I plug that in it automatically detects that it is a mouse and assigns the correct HID driver for that. From my understanding, if that happens it should also detect the Leonardo as an HID, but it is not doing it
edit: I have also tried several other mice, even a wireless one! They all work fine without a problem.
Arduino Mouse.h creates a USB device with USB HID mouse and USB CDC ACM (USB serial). This is sometimes called a USB composite device. Old versions of Windows do not know how to handle USB composite devices.
One alternative to use some other board with an easy option to remove USB CDC ACM such as the Raspberry Pi Pico with Adafruit TinyUSB and the Earle Philhower RP2040 core.
Simply adding Serial.end() to the start of setup(), removes the USB CDC ACM device. Combine this with one of their USB mouse examples, to create a USB device that is just a USB mouse. Note this also disables auto upload so be sure you know how to upload using the bootloader. This procedure varies from board to board so check the board docs.
This may also work on other boards supported by Adafruit TinyUSB such as SAMD21/SAMD51 and nRF52840.
I do not have really old versions of Windows to try on so your mileage may vary.