LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

Reading from keypad event handling

Hi,
I have a small problem
I want to listen to keypad and trigger something, e.g. if the key is F5, my Labview program will do something even when Labivew program is not the active window in WindowsXP.

I can't use the event handling in Labview 7.0 because it only works when the Labview program is the active window.

Anyone can help me?
Thanks.
0 Kudos
Message 1 of 7
(3,711 Views)
XP (and other Window platforms) only sends keyboard messages to active windows.

The easy way to get around this is to poll keyboard status, LabVIEW provided a set of VIs to do this. Take a look functions -> Advanced -> Input Device Control palette.

To capture keyboard events (f your application window isn't active window), you have to create
your own dll, and set global hook.

George Zou
http://gtoolbox.yeah.net
George Zou
Message 2 of 7
(3,685 Views)
I created a small example for you that tracks the keyboard strokes.

Good luck!
- Philip Courtois, Thinkbot Solutions

Thinkbot Solutions
Message 3 of 7
(3,661 Views)
Hi,
Thanks for your helps.
Philip, could you save your file as the version 7.0 (which is my Labview version)?
Thanks a lot.
0 Kudos
Message 4 of 7
(3,656 Views)
Hi,
No need to resend the file.
I looked at the attached pic and coded for the labview 7.0

Thanks for your help
0 Kudos
Message 5 of 7
(3,650 Views)
I'm glad if you could use the code.I would appreciate if you would rate my previous post if you find the code helpful, thanks.

Merry Christmas!
- Philip Courtois, Thinkbot Solutions

Thinkbot Solutions
Message 6 of 7
(3,638 Views)
Merry Chrismast to you too.
Your post had been rated.
Cheers,
0 Kudos
Message 7 of 7
(3,626 Views)