so what i changed was how frequently it checks for HID events, this line:
in the version i posted above i changed to 20 (so it will pull for HID updates every 20ms instead of every 47ms).
while this particular timer callback doesn’t do much (unless there was a key press or release) i’m reluctant to increase the frequency as it can potentially affect performance. also the fact that the issue only seems to happen with that particular keyboard… i have a feeling something else is going on.
it would be interesting to play with the frequency though, since you have the toolchain set up try reducing the number further and see if at some point you don’t get dropped keys at all.
i have another idea to try, i’ll post another version today or tomorrow.