<br><div class="gmail_quote">On Mon, Sep 6, 2010 at 4:55 PM, Guillaume Bouchard <span dir="ltr"><<a href="mailto:guillaume.bouchard@insa-lyon.fr">guillaume.bouchard@insa-lyon.fr</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin: 0pt 0pt 0pt 0.8ex; border-left: 1px solid rgb(204, 204, 204); padding-left: 1ex;">
Hello,<br>
<br>
(HS: Sorry for answering this mail and not the original one from Klaus Gradinger,<br>
but I deleted his mail and feel attracted by the topic when reading that one.)<br>
<div><div></div><div class="h5"><br></div></div>
But, I come with another solution, which may be possible now with the xinput2<br>
protocol. It appear that X may be able to work with different inputs (I'm sure<br>
for mice, but what about keyboard support ?) and grab only one of them.<br>
<br>
So, if this works, the solution may be to grab your barcode keyboard with the<br>
main window of your application and let the other keyboard work as usuall with<br>
the rest of the system<br>
<br>
The only think you need is a toolkit which can handle that. There is a page about<br>
gtk support here <a href="http://live.gnome.org/GTK+/MPX" target="_blank">http://live.gnome.org/GTK+/MPX</a><br>
<br>
I'm sure it may be possible to directly ask X for it, but I currently don't know how.<br>
<br>
Hope this (little) informations helps. If you comes with something, let me now,<br>
I have no need for that now (the /dev/input hacks works), but I'm still<br>
interested for a better solution.<br>
<font color="#888888"><br>
--<br>
Guillaum<br>
</font></blockquote></div><br>Thanks for your response. <br><br>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... <br>
<br>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?<br>
<br>Klaus<br>