I’m trying to program a barcode reader (that interfaces to the keyboard
via a splitter) and was wondering if there’s a way of specifying an
intercharacter delay in a resolution greater than 0.1 seconds?
The reason I’m asking is because ideally I’d like to get all of the
barcode data as one read(), and get keyboard data one character at a
time. In my causual playing around, I was able to “mostly” get this,
but being a fast typist, I was able to enter complete N character strings
without missing the 0.1s intercharacter window…
I think something like 0.01s would fix it right up – a typist might be
able to sneak two or three characters in a burst, but not a whole “long”
string…
One possible solution and addition problem is that the barcode scanner
does prefix its data with an 0x1b (ESC) character. I could assume that
all keyboard escapes (PGUP, PGDN, etc) are 3 or 4 characters, but I’m
then unable to distinguish (based on length alone) a short barcode scan
from a keyboard press. And the multi-byte keypresses will be very close
together (intercharacter more like zero seconds)…
Suggestions? It can be Neutrino specific, this code doesn’t need to be
portable.
Cheers,
-RK
–
[If replying via email, you’ll need to click on the URL that’s emailed to you
afterwards to forward the email to me – spam filters and all that]
Robert Krten, PDP minicomputer collector http://www.parse.com/~pdp8/