Operating a USB-HID Barcode Scanner
Klaus Gradinger
klaus.gradinger at gmail.com
Mon Sep 6 08:30:51 PDT 2010
On Mon, Sep 6, 2010 at 4:55 PM, Guillaume Bouchard <
guillaume.bouchard at insa-lyon.fr> wrote:
> Hello,
>
> (HS: Sorry for answering this mail and not the original one from Klaus
> Gradinger,
> but I deleted his mail and feel attracted by the topic when reading that
> one.)
>
> But, I come with another solution, which may be possible now with the
> xinput2
> protocol. It appear that X may be able to work with different inputs (I'm
> sure
> for mice, but what about keyboard support ?) and grab only one of them.
>
> So, if this works, the solution may be to grab your barcode keyboard with
> the
> main window of your application and let the other keyboard work as usuall
> with
> the rest of the system
>
> The only think you need is a toolkit which can handle that. There is a page
> about
> gtk support here http://live.gnome.org/GTK+/MPX
>
> I'm sure it may be possible to directly ask X for it, but I currently don't
> know how.
>
> Hope this (little) informations helps. If you comes with something, let me
> now,
> I have no need for that now (the /dev/input hacks works), but I'm still
> interested for a better solution.
>
> --
> Guillaum
>
Thanks for your response.
When I've the time I'll definitely take a look at that possibility. I know
that mapping the key events isn't that hard but it's just... messy...
I thought of a third solution: enabling and disabling the scanner using
xinput when it's needed / not needed. that way the user won't accidentally
scan barcodes when he's not supposed to. the down side of that is the need
for an input field that has the focus, but that's something i can manage
from within Java. i'm currently really thinking about sticking with that
solution because everything else seems just a little bit messy.. anything
"terrible wrong" with that idea?
Klaus
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.x.org/archives/xorg/attachments/20100906/bf912974/attachment.html>
More information about the xorg
mailing list