From 04:00 PM CDT – 08:00 PM CDT (09:00 PM UTC – 01:00 AM UTC) Tuesday, April 16, ni.com will undergo system upgrades that may result in temporary service interruption.

We appreciate your patience as we improve our online experience.

LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

Distinguish two connected keyboards

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

0 Kudos
Message 1 of 6
(2,891 Views)

I am fairly certain the answer is "no", but if anyone else could chime in, that would be wonderful.

Bill
CLD
(Mid-Level minion.)
My support system ensures that I don't look totally incompetent.
Proud to say that I've progressed beyond knowing just enough to be dangerous. I now know enough to know that I have no clue about anything at all.
Humble author of the CLAD Nugget.
0 Kudos
Message 2 of 6
(2,843 Views)

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.

Message 3 of 6
(2,838 Views)

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.

Message 4 of 6
(2,817 Views)

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.

0 Kudos
Message 5 of 6
(2,810 Views)

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

Message 6 of 6
(2,782 Views)