Using the Windows API sounds like a good idea. I haven't had any luck with it so far, however. I don't know anything about writing Windows programs but python has a win32api module, so I tried using that. As a test program, I wrote something that executes this line at regular intervals:
win32api.keybd_event(ord('D'), 0, 0 | 0, 1)
which in theory uses the keybd_event function of win32api to press the 'D' key. I also tried it with other keys. What happens is that it does send input to programs like Notepad, I can use it to type, or to capitalize letters by holding down Shift, but it doesn't work for anything else-- I can't use it for key mapping, and programs like Stepmania do not recognize the input. This is a problem I didn't have with any of my other attempted solutions, however, it does seem to be able to hold down keys as I wanted it to. I'm not sure why, maybe its like the difference between, say, copying and pasting a letter vs typing it?
You said I should use the SendInput function, but I can't figure out how it works from the MSDN reference page (I've never used C++). I read that SendInput calls the keybd_event function anyway for typing, and hoped I could use that instead, and since I can't get keybd_event to work I'm a bit skeptical that SendInput would be any better.
I'm going to keep trying to flash the Arduino firmware somehow, maybe ill use different computers etc. I might try taking apart an old usb keyboard if I think I could use that, or perhaps I can find a ps2 to usb converter and write a program to emulate a ps2 keyboard, which is supposedly easier.