Capture keyboard exclusively
-
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:
- 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.
- 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.
- 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.
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) ?
-
Hi
What os do you run on ?
For win 10, you could change layout in the app so the system layout wont matter. -
Hi
What os do you run on ?
For win 10, you could change layout in the app so the system layout wont matter.@mrjj 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
-
@mrjj 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
@Max13
Hi
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
long term maintenance.As far as I know Qt cannot capture a HID. outside of grabKeyboard() you would have to resort to platform native tricks or
direct USB reading. -
@Max13
Hi
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
long term maintenance.As far as I know Qt cannot capture a HID. outside of grabKeyboard() you would have to resort to platform native tricks or
direct USB reading.@mrjj 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
QSerialPort.Thanks for your input