Would anyone like speculate on what sorts of USB HID implementation errors might have caused this problem?
I know almost nothing about USB HID programming. I just skimmed the HID 1.1 Device Class Definition.
I imagine that the keyboard is sampling the keyswitches at 60Hz, and sticking all the depressed keys into one HID data report packet. The keyboard does not buffer keypresses into separate reports (pg. 62 "Keyboards may buffer events that would have otherwise resulted in multiple event in a single report.")
So, instead of buffering keypresses into separate reports so that their sequence is preserved, the keypresses all go into one report. The USB host sees the report packet and sees that 'i' and 'n' were simultaneously depressed. And, the USB host decides to produce "ni" (pg 62: "The order of keycodes in array fields has no significance. Order determination is done by the host software comparing the contents of the previous report to the current report.")
So I have a couple questions for the USB experts in the crowd. Can you tell a keyboard device to increase its idle rate, thereby increasing the rate of data packets? It looks like it is theoretically possible to set the idle interval to 4ms (from the HID spec). Wouldn't you be surprised, though, if you could just tell a USB keyboard to increase its polling rate? I would be. I figure that USB manufacturers set an idle rate that is convenient
for them and the USB host can not simply demand more packets/second.
Anyway, if anyone happens to know if idle rate is a way of tweaking the performance of a keyboard, that would be pretty useful! A brief google search turned up nothing of particular interest except for some linux kernel guy, trying to set the idle interval to zero, and failing. But ymmv.
Oh, and here is the HID spec that I downloaded, if anyone is interested.
http://www.usb.org/developers/devclass_docs/HID1_11.pdf