I can't believe I am stumped by this, but this is my issue and I can't see any other solution for this anywhere.
I have an official Arduino Leonardo loaded up with the following code:
void setup() {
Keyboard.begin();
}
void loop() {
char keyToPress = random('A', 'Z'); // choose a random letter between 'A' and 'Z'
delay(1900);
Keyboard.press(keyToPress);
delay(100);
Keyboard.release(keyToPress); // overall loop time is ~2s, with a 100mS keypress length
}
On OSX and Linux, I get a predictable output - random capital letters typed by a keyboard, two seconds apart: FWTDXJP etc.
However, on Windows 7(x64), I get... nothing. I have the Leonardo appear correctly as a CDC COM port, drivers were installed from the latest 1.6.5 installer on their website. I have tried uninstalling the Leonardo in device manager while checking the "remove software" box so as to be sure that the driver I install is the one being used.
Has anyone seen this before? A search of the Arduino forum reveals some people having the same issue, a bit of a discussion and then usually "I don't know what I did but the problem has gone now".
This link is the output from USB Device Tree Viewer, which seems to correctly show the USB HID descriptor.
And this is a screenshot from Device Manager, showing just one HID device (my keyboard / trackpad on my laptop):
Any ideas? I have obviously tried the example USB keyboard code from the Arduino IDE too - my code was just to get a minimum system to simplify testing. All help gratefully received. BTW, I posted this over on the Arduino Stackexchange too, so if you would rather answer there that's fine.
