[Coco] PIA keyboard input?
Brett K. Heath
hcmth019 at csun.edu
Tue Dec 9 06:58:00 EST 2003
Thanks for answering James (I was out of touch for a day or so) and yes,
multiple keypresses are the biggest problem but there are others. Failing
to wait for debounce after a release can cause false positives also, and
with fast typists you can get stuff like "abaacbbdccedd" instead of
"abcde".
The other thing, if you're keeping at least minimal state info (as you
should be to handle shift keys correctly) undebounced releases can leave
your routine _very_ confused about which keys were actually released and
which ones are still down and there is usually no easy way to reset the
state of the keyboard routine without resetting the whole system.
On Sun, 7 Dec 2003 jdaggett at gate.net wrote:
> James
>
> multiple consecutive keypresses like this
>
> kkkkkkiiiiiiitttttttteeeeeeeeeeeeee
>
> james
>
> On 7 Dec 2003 at 18:04, James Dessart wrote:
>
> >
> > On 7-Dec-03, at 5:47 PM, Brett K. Heath wrote:
> >
> > > Someone else may have mentioned this but you need to allow debounce
> > > time after you detect a keypress before you resume scanning. IIRC
> > > about 30 milliseconds should do it but 50 would be better and it's a
> > > good idea to verify that the key is still pressed after the debounce
> > > time. Allow the same time after a key release (and verify it also).
> >
> > What sort of symptoms would I be seeing if I didn't?
> >
> > James
Brett K. Heath
More information about the Coco
mailing list