Problems with USB keyboard (keydown and inkey)


Author Message
matherp
Guru

Joined: 11/12/2012
Location: United Kingdom
Posts: 11461
Posted: 06:11pm 02 Oct 2025      

Problem: as soon as I use "keyDown(7)" everything is "laggy", keypresses are skipped or ignored.


That makes no sense unless there is something else going on. All keydown does is read the input buffer until it is empty which should be pretty much instantaneous and then return the contents of an array which is filled in the background by the USB keyboard handler.
Are you saying the function takes a long time to return or that it is a long time before the modifier key is seen?