Unlike PS2 keyboards which report keypresses immediately, USB devices require the host to request new information in intervals. This introduces lag depending on the polling interval.

Hardware

In this example a Roccat Ryos MK keyboard with firmware 1.19 and a Roccat Kone with firmware 1.41 are used for testing. Both devices use 3.3 V ARM MCUs.

If no other requirements are to be met one would choose the left mouse button or a WASD-key for testing. After choosing a suitable push-button, you have to locate the corresponding pins which could be challenging for rubberdome keyboards, but is much easier for through-hole "mechanical" switches. Then you have to find out which one is the positive and which one is the negative pole. For 3-pin push-buttons used in mice you additionally have to sort out the two pins that are closing when pressed. Test the voltage between the pins on the opened button, and see it dropping to zero when pressed. Solder two cables on and reassemble the device so it can be worked with.

The capture device is a Raspberry Pi 2 B with firmware 4.1.9-v7+ #819.

The advantage compared to Arduino solutions is that it's also ARM based and therefore the signals from the devices automatically match the requirements of the RasPi GPIOs. Also it's much faster and runs a complete Linux kernel with wide USB support while the Arduinos USB-host libraries don't support HUBs, which would prevent testing keyboards with internal HUBs like the Roccat Ryos MK Pro. As Windows 10 runs on this model it can be used for operating system comparison.

The minimal wiring just needs an additional diode to work (Figure 9.1, “Wiring between USB-device and Raspberry Pi”).

Figure 9.1. Wiring between USB-device and Raspberry Pi



