LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

Detection of the shift key down when application starts

I need to detect that the shift key is down when an LV executable application is first started.
I know this is possible in Windows because MS Access has this capability, but NI support has said it can't be done.
Does anyone know how to do this? I need to be able to do this in LV 5.0.1f1, but will accept a solution for later versions if it's not possible in 5.0. Also the platforms would be WIN95/98/2000/XT.
One thought was that maybe this information is written to the Windows registry and that it could be retrieved from there.
Thank you in advance.
PHILOG
0 Kudos
Message 1 of 4
(3,165 Views)
I have no idea how you would do it 5.0. LabVIEW 6.1 introduced the event structure and a quick test with the key repeat event shows that it's possible. I don't think that a key value is written to the registry but there is probably some windows api function that you could call. You might want to check the microsoft web site for info.
0 Kudos
Message 2 of 4
(3,163 Views)
I'm not sure if you can catch a key down event occurred before LabVIEW is launched.

Poll the shift key status might solve the problem. This can be done in lv5.0.

George Zou
http://gtoolbox.yeah.net
George Zou
0 Kudos
Message 3 of 4
(3,150 Views)
You can't catch a key down event. What I tried was holding down the shift key before I ran a VI, kept holding it, and got a key repeat event as soon as the VI started. Haven't tried it with an executable but I would think it would work the same.
0 Kudos
Message 4 of 4
(3,147 Views)