1

I currently have keyboard's Vendor ID,product id, revison number - extracted from interception library(specific function call: interception_get_hardware_id more information on it here:(Scroll to the bottom of the page).

What I want to do is to explicity specify, input device (i.e keyboard, based on its vendor,product ID and revision number) that my Qt application can interact with regardless of how many input devices are physically connect to my machine (i.e more than 1 keyboard may be attached, just want to use one specific keyboard). Is this functionality implementable using Qt ?

Kindly point me to Qt documentation where I could look into, to implement such functionality. Just need a push in the right direction, thanks.

EDIT: Im on windows platform.

EDIT: Inteception library(API for controlling input devices based on Win32 API) : https://github.com/oblitum/Interception

calculusnoob
  • 165
  • 1
  • 11
  • 1
    1. Only relevant information should be in the post. 2. DV (and UV) should not be justified so avoid asking for information about them. – eyllanesc Nov 01 '21 at 21:04
  • Asking for feedback is not relevant information, if the community wishes to give you feedback, it will do so without you asking even if they had given you a DV. – eyllanesc Nov 01 '21 at 21:17
  • I didn't understand what you want in your question. what is `keyboard`? what is your meaning about `extracted from interception library`? what is `interception library`? – Parisa.H.R Nov 01 '21 at 21:19
  • 1
    @Parisa.H.R I have added link to interception library. By extracted, I meant that it was retrieved from interception's function call to get input device's vendor,product ID and revision number as defined by USB standard. As for what is keyboard, in my case it my input device to enter text in GUI QT application. – calculusnoob Nov 01 '21 at 21:35
  • Qt has an example about [Virtual Keyboard](https://doc.qt.io/qt-5/qtvirtualkeyboard-index.html), I see [this article](https://www.qt.io/blog/2016/03/02/qt-virtual-keyboard-updated-with-handwriting-recognition) about that too, I don't know maybe this helps you. – Parisa.H.R Nov 01 '21 at 22:00
  • another thing that I know is that for example If you have multiple monitors and you want to screenshot from a specific monitor, you can find it by [grabWindow function](https://doc.qt.io/qt-5/qscreen.html#grabWindow) , for keyboard there is [grabKeyboard function too](https://doc.qt.io/qt-5.15/qwidget.html#grabKeyboard) – Parisa.H.R Nov 01 '21 at 22:21
  • @calculusnoob I don't think Qt can manipulate which keyboard to use, that is beyond the scope of the library. – eyllanesc Nov 01 '21 at 23:09
  • @Parisa.H.R QtVirtualKeyboard is just a Qt widget that emulates keyboard events and they are only recognized by Qt, QVK does not send information to the OS so it has nothing to do with the problem. – eyllanesc Nov 01 '21 at 23:10
  • @eyllanesc Why should send information to OS? I know qt virtual keyboard didn't related directly to this question because of that I said I don't know maybe this helps him :-) because I'm not sure what hi want – Parisa.H.R Nov 01 '21 at 23:33
  • 1
    @Parisa.H.R Probably the OP has a device that has n keyboards(physical keyboard) connected and he only wants one of them (one in particular) to only be used to write in the Qt application, so he uses a library that obtains the IDs of each keyboard, so the OP wants to configure in some way (filter) so that only that keyboard manipulates the application written with Qt – eyllanesc Nov 01 '21 at 23:54
  • Does this link help? https://devblogs.microsoft.com/oldnewthing/20160627-00/?p=93755 – kenash0625 Nov 02 '21 at 02:02
  • Maybe this post could help: https://forum.qt.io/topic/76285/isolate-different-keyboard-input-in-widget/5 - It's not about two keyboards, rather a keyboard and a magnetic card reader, but both are read as keyboard input. I'd install a native event filter in Qt (like mentioned in the linked post) and output the raw event data, maybe you can distinguish the keyboards. – Thomas Piekarski Nov 14 '21 at 16:56
  • @calculusnoob Hi , what happens at the End, Did you find a solution? – Parisa.H.R Dec 25 '21 at 22:00

0 Answers0