[Coco] PIA keyboard input?

jdaggett at gate.net jdaggett at gate.net
Tue Dec 9 11:36:00 EST 2003


Brett

Correct I just posted the first thing that came to mind. If the software is 
to fast for the action of the switch then the transient period of the switch 
can confuse the software into thinking multiple presses were made. 

All break before make type switches and momentary switches have a 
period where it is neither open or closed. This results in a transient 
response that is very unpredictable. That is why these type switches are 
not reccomended for high voltage switching. 


james


On 9 Dec 2003 at 3:56, Brett K. Heath wrote:

> 
> 
> 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
> 
> -- 
> Coco mailing list
> Coco at maltedmedia.com
> http://five.pairlist.net/mailman/listinfo/coco





More information about the Coco mailing list