ni.com is currently undergoing scheduled maintenance.

Some services may be unavailable at this time. Please contact us for help or try again later.

LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

keyboard event callback

I want to capture a key-pressing from keyboard, at a vi that it's window does not has focus on it. So i can not use the simple event "this vi >> key down".

I know how to do it by polling. But i can not find a way to do it with a callback event.

 

There are a few posts related, but i can not find the answer.

0 Kudos
Message 1 of 6
(3,471 Views)

You can't catch the event.  Becasuse there isn't one for an non-active window.  Only the active window get the event.

If you're a good C programmer, you can create a hook dll, set it to catch keyboard event from any window.

 

George ZOU

http://www.geocities.com/gzou999

 

George Zou
0 Kudos
Message 2 of 6
(3,428 Views)
You may have problems with running this setup w/ some antivirus softwares installed.  It could identify your code as a keylogger application unless you use ctrl, alt, shift combinations.
0 Kudos
Message 3 of 6
(3,425 Views)

Thank you.

That clears things up.

I will use polling. It is not so bad at all..

0 Kudos
Message 4 of 6
(3,423 Views)
Would you please tell me how it might be done with polling... I am having similar issues, but I don't know how to do this with any method!
0 Kudos
Message 5 of 6
(3,418 Views)
0 Kudos
Message 6 of 6
(3,395 Views)