How to configure an InputDevice attached to the serial port? (Barcode Reader)

Daniel Stone daniel at fooishbar.org
Mon Dec 18 13:12:20 PST 2006


On Mon, Dec 18, 2006 at 02:10:31PM -0500, James Cloos wrote:
> 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.

Or, given that XEvIE seems to be in somewhat of a state of disrepair,
someone could just write a trivial keyboard driver to DTRT. ;)

Cheers,
Daniel
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 189 bytes
Desc: Digital signature
URL: <http://lists.x.org/archives/xorg/attachments/20061218/6668c52c/attachment.pgp>


More information about the xorg mailing list