LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

simulate arrow key events in labview

Solved!
Go to solution

Hello,

I am trying to simulate the arrow key events (left, right, up & down) in labview. Lets say I would like the events to happend when a slider bar goes beyond a certain threshlold (later I will inteface it with a daq).

 

I found this example but, I can not figure out how to move the arrow keys (and I have not experiance with the User32.dll):

http://zone.ni.com/devzone/cda/epd/p/id/3711

 

I would really appreciate the help.

Many thanks

0 Kudos
Message 1 of 12
(11,565 Views)

If i understand you correctly, you want to make the program "press the arrow keys"?

 

If so, you can use the arrow keys Value(signalling)-property to create an event which will be handled as if you pressed the arrow key yourself.

 

does this help?

/Yamaeda

G# - Award winning reference based OOP for LV, for free! - Qestit VIPM GitHub

Qestit Systems
Certified-LabVIEW-Developer
Message 2 of 12
(11,544 Views)
Solution
Accepted by m@t

I searched around for a while, but I can't remember where on the forums I initially found this VI so I can't give due credit.

 

It is similar to the VI you posted simulating a keyboard, but it would proably suit your needs better

_____________________________
- Cheers, Ed
Message 3 of 12
(11,534 Views)

Thank you thank you a lot. This is what I needed!!!

 

... it took me long enought to reply 😞

0 Kudos
Message 4 of 12
(11,440 Views)

Hi,

    I need to get multiple-key-press of arrow-keys. i.e., if I press Up-Arrow-Key, keep hold it down, while being pressed down press Left-Arrow-Key and keep it pressed(now both keys are pressed First: Up, Second: Left). Now my requirement is I need to get the following sequence of Key-Values -

Up-Key, Left-Key, Up-Key, Left-Key, Up-Key, Left-Key ...etc., 

 

as long as both keys are kept dow.

 

-Any help is appreciated

-Beginer

 

 

 

 

 

0 Kudos
Message 5 of 12
(11,308 Views)

If you use the VI I posted, simulate keyboard.vi then you can define the type of keypress that is performed. Your choice of [key down] [Down then Up] [Key release]

 

 

Message Edited by yenknip on 03-26-2009 10:13 AM
_____________________________
- Cheers, Ed
Message 6 of 12
(11,295 Views)

Hi,

    Is it possible to get an 8.2 or lower version of the vi?

 

-Rgds

-sbs

0 Kudos
Message 7 of 12
(11,254 Views)

Here's it in 8.0

 

 

Message Edited by yenknip on 03-31-2009 10:13 AM
_____________________________
- Cheers, Ed
0 Kudos
Message 8 of 12
(11,235 Views)
Hi Yenknip, Thanks for your help. My purpose is to make a Wreless-Wheeled-Robort which could be controlled/monitored from a PC(LabVIEW). Interface to the wireless-transceiver section at PC-side will be USB(VirtualCOM-Port). Actually I have to acquire the key-strokes from an actual keyboard(H/W) attached to the PC. It seems to me that it might be possible with 'keyboadAcquire.vi' which comes along with LabVIEW vi-lib. I had just a glance on this vi. I think modifications might be needed on 'how to manage multiple-key-press'. Am I right? -Rgds -sbs
0 Kudos
Message 9 of 12
(11,172 Views)

If you want to aquire keyboard strokes, the easiest method is to use the event structure, you can check for the type of key press. However it is not available in the base package - if you have the base LabVIEW package you will need to poll the keyboard or monitor user32.dll for keyboard presses.

_____________________________
- Cheers, Ed
0 Kudos
Message 10 of 12
(11,170 Views)