11-13-2005 11:36 PM
11-14-2005 04:48 PM
Hi Ames,
There is a problem with Windows and the way it handles the system keys (Alt key). The operating system doesn't send LabVIEW a message so the event structure cannot respond to it. However, you can still see if the Alt key has been pressed in conjunction with another key by reading the PlatMods cluster inside the Key Down event case. One of the elements inside the PlatMods cluster is a Boolean that indicates whether the Alt key was pressed when the event occurred.
Hope this helps,
Ankita
11-14-2005 05:09 PM
11-14-2005 10:36 PM
11-15-2005 05:44 PM
Yes, looks like though LabVIEW knows about the ALT key-press, it isn't passing it along. I am attaching a VI which uses the Windows API function 'GetKeyState' to get this info'. This works for either ALT key (left/right), but if you're interested in which one, you can replace the virtual-key code accordingly (xA4 and xA5).
-Khalid
11-15-2005 07:39 PM
11-16-2005 03:08 AM
Hi Ames
As Kileen has said Khalid has already given you a good solution to detect the ALT key.
I have another approach that might let you stick to your event-driven approach. I suggest that you have another loop in your app that polls the keyboard using the Input Device utility vi's. When this poll loop sees an ALT + KEY combo it raises a dynamic user event and will be processed in your event structure. This means you can keep your key down filter event to process the CTRL + KEY and SHIFT + KEY events.
Example attached in 7.1
cheers
David
11-16-2005 04:47 PM
12-29-2006 01:58 PM
06-05-2008 04:18 AM
Can anybody confirm whether this problem is fixed?
Seems not to be so even in LV 8.5.1.