<?xml version="1.0" encoding="UTF-8"?><rss xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:atom="http://www.w3.org/2005/Atom" version="2.0"><channel><title><![CDATA[Capture keyboard exclusively]]></title><description><![CDATA[<p dir="auto">I have a USB barcode scanner presented to the OS as a keyboard. I need to capture exclusive use of the barcode scanner to avoid some issues:</p>
<ul>
<li>Users have very very very very little knowledge of using a computer. We teach them how to scan barcodes and that's really all they have to do.</li>
<li>Users don't use the same keyboard mapping as the scanner, so sometimes the OS doesn't switch back. Users are confused and they stop working.</li>
<li>We employ an external team, their company manages who they send us and they often rotate. So training them to focus on the app, reopen the app, use the barcode, change the keyboard mapping if the taskbar shows "FR" instead of "EN", etc… It's time-consuming when you have to train them every 2 or 3 days when they rotate.</li>
</ul>
<p dir="auto">I had 2 solutions in mind, make an arduino-like device with usb-host capture the barcode scanner then use the arduino as a serial device (which allows me to open it exclusively), or capture (if possible) the barcode scanner exclusively. Is there a way to capture an HID device exclusively by an app Qt style (cross platform) ?</p>
]]></description><link>https://forum.qt.io/topic/130045/capture-keyboard-exclusively</link><generator>RSS for Node</generator><lastBuildDate>Tue, 12 May 2026 00:07:29 GMT</lastBuildDate><atom:link href="https://forum.qt.io/topic/130045.rss" rel="self" type="application/rss+xml"/><pubDate>Sun, 05 Sep 2021 12:13:31 GMT</pubDate><ttl>60</ttl><item><title><![CDATA[Reply to Capture keyboard exclusively on Mon, 06 Sep 2021 12:55:59 GMT]]></title><description><![CDATA[<p dir="auto"><a class="plugin-mentions-user plugin-mentions-a" href="/user/mrjj">@<bdi>mrjj</bdi></a> Well… If I end up capturing an HID device exclusively, using native code, then it shouldn't cost much. Using an arduino-ish needs an arduino and a USB host on this device to make it a serial port. For now, I think costs would be equivalent (no device but more time using native code, device but less time using <code>QSerialPort</code>.</p>
<p dir="auto">Thanks for your input</p>
]]></description><link>https://forum.qt.io/post/679398</link><guid isPermaLink="true">https://forum.qt.io/post/679398</guid><dc:creator><![CDATA[Max13]]></dc:creator><pubDate>Mon, 06 Sep 2021 12:55:59 GMT</pubDate></item><item><title><![CDATA[Reply to Capture keyboard exclusively on Mon, 06 Sep 2021 07:04:46 GMT]]></title><description><![CDATA[<p dir="auto"><a class="plugin-mentions-user plugin-mentions-a" href="/user/max13">@<bdi>Max13</bdi></a><br />
Hi<br />
When you also need to support XP, i think using a arduino-ish device as scan station will be the most cost effective in both up front price and<br />
long term maintenance.</p>
<p dir="auto">As far as I know Qt cannot capture a HID.  outside of grabKeyboard() you would have to resort to platform native tricks or<br />
direct USB reading.</p>
]]></description><link>https://forum.qt.io/post/679377</link><guid isPermaLink="true">https://forum.qt.io/post/679377</guid><dc:creator><![CDATA[mrjj]]></dc:creator><pubDate>Mon, 06 Sep 2021 07:04:46 GMT</pubDate></item><item><title><![CDATA[Reply to Capture keyboard exclusively on Sun, 05 Sep 2021 23:28:57 GMT]]></title><description><![CDATA[<p dir="auto"><a class="plugin-mentions-user plugin-mentions-a" href="/user/mrjj">@<bdi>mrjj</bdi></a> MacOS, Windows XP, Windows 7 and 10. They often have to switch to another app (which actually focuses itself sometimes) and they scan in this app without switching, so they send the barcodes to other apps and don’t raise the correct app to scan again. That’s why I would like to capture the scanner</p>
]]></description><link>https://forum.qt.io/post/679340</link><guid isPermaLink="true">https://forum.qt.io/post/679340</guid><dc:creator><![CDATA[Max13]]></dc:creator><pubDate>Sun, 05 Sep 2021 23:28:57 GMT</pubDate></item><item><title><![CDATA[Reply to Capture keyboard exclusively on Sun, 05 Sep 2021 15:40:58 GMT]]></title><description><![CDATA[<p dir="auto">Hi<br />
What os do you run on ?<br />
For win 10, you could change layout in the app so the system layout wont matter.</p>
]]></description><link>https://forum.qt.io/post/679307</link><guid isPermaLink="true">https://forum.qt.io/post/679307</guid><dc:creator><![CDATA[mrjj]]></dc:creator><pubDate>Sun, 05 Sep 2021 15:40:58 GMT</pubDate></item></channel></rss>