10-22-2018 04:29 AM
I have a system with two keyboards connected. For the button down event is it possible to find out which of the keyboards was the reason to fire the event?
I would like to avoid to poll a system library.
Thanks in advance
Michael
10-22-2018 12:24 PM - edited 10-22-2018 12:24 PM
I am fairly certain the answer is "no", but if anyone else could chime in, that would be wonderful.
10-22-2018 12:34 PM
Pretty sure you can't in LabVIEW. I think you barely can even in Windows, using a DLL.
Can you back up a step and explain why you want to do this, instead of jumping straight to asking how to do it? It could be that there are other methods to do what you need to do, and you've just jumped straight to assuming the 2-different-keyboard solution is the only one.
10-23-2018 02:35 AM
Sure. This is for a test software. The UUT is one of the keyboards. It seems I cannot influence the hardware configuration my testsystem has.
If the UUT is connected, there are two keyboards. Since I cannot be sure, that the UUT is working properly, I cannot use it to control my test application. My system should have at least one keyboard if there is no UUT connected (in order to control the test application).
At the moment I am disabling the system keyboard while I am testing.
The example you gave to me seems useful to me. I will (if there is no better solution) record raw data from the desired keyboard (using the description in your link) and react on every button press event from both keyboards. But for the test, I process only if the recorded UUT keycode matches the keycode from the event.
10-23-2018 05:09 AM
There's no way to get the device of origin from in an event structure.
You can use the Acquire Input Data (in Connectivity>Input Device Control). But you'll have to poll the data.
10-23-2018 09:06 PM
You also can use an intermediate system that will push the data back to your main application.
What I use to do is a parallel testing system jig that send the data to the main system.
Using XYZ + feedback pressure from the test system on each position or one XYZ + multiple feedback pressure system that will push the same button on all keyboard.
I suggest you this to transform USB data to something like serial port.
http://www.hobbytronics.co.uk/usb-host-keyboard
Benoit