About 10 years ago we had a device build that emulated a keyboard, we went to an electronics specialist and he made it. We used it to measure keypress to recognition of the machine accepting that event, the key press was a knows intervals so we could gather accepted margins of error on how fast someone was able to react to an onscreen event by pressing a key on the keyboard. This was a custom piece of hardware. Unfortunately I cannot remember where we had this made.