[colug-432] HID-emulating (keyboard) barcode scanner and X windows
Jeff Frontz
jeff.frontz at gmail.com
Wed Oct 14 15:31:33 EDT 2009
I'm using a barcode scanner to enter data-- to the application,
scanner I/O looks indistinguishable from something typed on a
keyboard.
If I use X windows (i.e., it can be as simple as opening an xterm
window and typing "cat > /dev/null") and scan a barcode of
"ABCDEF..XYZ", every so often, I'll get a lower-case letter
interspersed with the normal all-uppercase input-- the letter will be
the right letter, but its case will be lower-case. In HID-terms, it's
as if one of the shift-key events (specifically the toggle to
upper-case) got lost.
If I run in "console" mode (just a shell login), everything is great--
all characters received and all upper-case.
I wrote a toy program to monitor the /dev/input/event* device that
corresponds to the scanner. I always see all of the proper events
(e.g., "shift-key syn key-A syn key-A syn shift-key syn" for a capital
"A") when running with X even when a lower-case letter is mistakenly
"read" by X.
My suspicion is that there is some sort of error in X's keyboard
driver-- perhaps of the form "if the last event is a shift-key AND
said event would toggle to upper-case AND the associated SYN is not
seen in this buffer (because it's in the next buffer) then forget that
the shift-key event ever came in".
Anyone else seen this? Any clues on where to to look in X?
Thanks,
Jeff
More information about the colug-432
mailing list