Dave Dunfield wrote:
Implementing rollover properly requires a bit more
logic - once you have
processed a key-down, you must queue any other scancodes you receive until
you get the corresponding key-up, then process the queued codes after you
have released the strobe.
Hmm, I just process the code to char on keydown, and then when the next
keydown occurs, I process it the same. Why would you want to queue the
additional keypresses?
You can get fancier, implementing auto-repeat etc. if
you like, the logic
is pretty straightforward (if key-down persists beyond the initial delay,
begin toggling the strobe at the repeat rate).
PS2 keyboards do this automatically (repeat a keydown after a certain
number of ms)