How to configure an InputDevice attached to the serial port? (Barcode Reader)
cloos+pdx-xorg at jhcloos.com
Mon Dec 18 11:10:31 PST 2006
Given that your scanner sends ASCII text, I don't beleive there is a
keyboard driver which will Do The Right Thing for you.
Therefore, what you require is a daemon which will poll(2) on the
serial device and inject X events when it sees input.
The XTEST and XEvIE can be used to accomplish the injection.
Try man Xevie. If I read that correctly, you can have your daemon
ignore all of the input coming from X's standard input devices and
just use XevieSendEvent() to inject each char coming from the serial
line. As you can see from /usr/include/X11/keysymdef.h, most of ASCII
can be sent as is; you just need to translate and ASCII control chars,
escape sequences or similar coming from the scanner.
You will need libXevie installed.
And you need to ensure the XEvIE extension is compiled and loaded.
James Cloos <cloos at jhcloos.com> OpenPGP: 1024D/ED7DAEA6
More information about the xorg