... require/want to generate sub-16ms events.
(Virtua Fighter II requires sub 16ms presses)
Clee, et al.
If you debounce for 15ms, you also add an extra video frame of latency to games.
When you are debouncing a keyswitch to figure out where it is now, you have a hard problem when dealing with switches that can generate over 5ms of bounce.
In particular - a key that is now appearing off after 4 ms... is it bouncing, or has it just been released after a tap? I don't have a simple solution for you - a key that was up, then transitions down for 4ms, then up, and away - will be hard to deal with. If you detect the release, and send it, but the key stays down after, then a bad release was sent. Alternately, you could wait longer - but that is adding latency to certain gamers.
You (Clee) are describing intending to buffer the events by their initial time of change detection, but only sending the events after they have stabilized. This is tricky, as it requires adding latency to all keystrokes. If you don't add the latency to all keystrokes, then gamers will randomly miss when making passing shots. When all the latencies are stable, then the brain can still sync with it.
reminders:
25 keys per second is 40 ms - gamers can do this when rapid firing.
faster typists can be hitting 15 kps, or 60ish ms.
minimum screen latency at 60 hz is about 16ms.
Flatscreen display tech will add 4-10ms to this, typically.
Also, the debouncing article (
http://www.ganssle.com/debouncing.htm) does not discuss the attributes of the keyswitches we have - have you had a chance to run a few keys (clearly not fukkas, yet) through a scope? A digital scope, sound-card trace, or a long set of analog samples from an IC might do sufficiently well to see what is happening.
I think the debouncing code needs to be tuned to the capabilities of each type of keyswitch, at least. Then, if the user is trying to run at the edge of the keyboards' ability, (trying to generate very short presses on a bouncy keyswitch) an advanced feature might be to adjust the debounce time to generate faster release detection, at the cost of the occasional false release and stroke.
I guess the main thing I'm saying is that assuming that the fukkas need 15 ms to debounce is overly pessimistic, and brings one into conflict with gamer-sensitive latencies for certain situations.
I'm not going to argue with 5-7ms if the switch is an utter pain to work with, though. That level of latency will allow some of the taps one attempts to land within the same video frame, if one is attempting such a unreasonable feat.

I'm in 'measure stuff' mode lately, so hopefully I'll be able to post some traces of strokes from some key switches I have handy - though I don't have that decent a collection, it is crazy swung towards IBM.
yup,
dfj