LabWindows/CVI

cancel
Showing results for 
Search instead for 
Did you mean: 

How to read a key that is pressed when clicking on a command button in CVI

I have an application that uses command buttons to do different tasks.  I have programmed them to use the EVENT_LEFT_CLICK and EVENT_RIGHT_CLICK.  Is there a way to read a key that is held while clicking the command button to do another task?  I would like to hold the Shift key, Ctrl key, or Alt key while clicking the button to do different tasks. 

0 Kudos
Message 1 of 3
(847 Views)

Hi,

 

have a look at the examples samples\userint\multikey.cws and samples\userint\moustate.cws

0 Kudos
Message 2 of 3
(818 Views)

Wolgang,

Thank you for the direction.  I am now using the GetGlobalMouseState function and that seems to do what I need.  Only thing I see is that the ALT key does not work with this function, but I am currently only interested in the Shift key pressed when I right click the mouse.

0 Kudos
Message 3 of 3
(804 Views)