01-24-2011 03:32 PM
I tried to read through all the threads related to disabling shortcuts, but I can't find a solution to my problem. I need to test a keyboard for multiple key presses. Currently, I'm having problem with the shortcut keys being activated, such as ctrl+y, F1, and such. I want to be able to read those keys instead of having the shortcut pop up. How can I do this? I have Labview 8.5 development software.
Thanks in advance,
Sinh
Solved! Go to Solution.
01-24-2011 10:30 PM - edited 01-24-2011 10:30 PM
Try this.
01-25-2011 11:45 AM
Thank you Gaurav. This is exactly what I needed.
04-13-2011 02:30 PM
Can somone save this down to LV8.0 and repost it please?
Or maybe a screenshot of the BD?
Thanks
04-13-2011 02:38 PM
04-14-2011 09:10 AM
Works perfect.
Thank you very much.
05-12-2015 09:58 AM
Looking for an alternate method to do this without an event structure. My implementation uses a state machine with while loops, and is setup to only respond to specific keystrokes/mouse clicks, at specific times. When in these states, it waits for the user to interract, and can not proceed until they do (by either progressing with the sequence, or aborting it).
When I implement the method provided, it does work when it is in the state that expects F1, but if the user presses F1 at any other time, the event is triggered, and the VI goes into an invalid state (locks up). I do inderstand that normally an event structure would be the correct implementation for keyboard inputs, but the application needs to respond in different ways depending on the user input, and needs to ignore all user input at other times. I couldn't figure out a practical way to ignore events while in certain states, so I implemented the statem machine instead.
Any ideas? Working in LV 2013. Thanks in advance.
GSinMN
05-12-2015 10:00 AM
05-12-2015 11:27 AM
Hello GerdW,
Thanks for the quick response. Think I may have found another option. Stumbled across this in the help files:
"Key Down Event
If a key press matches a keyboard shortcut in the VI menu, such as Ctrl-C or Ctrl-V, LabVIEW does not generate a Key Down event, regardless of whether the menu item is enabled."
All I had to do was create a dummy control, assign it the F1 shortcut, and the help file doesn't open. Catch is that the control has to remain visible on the front panel. Just need to find creative way to hide it.
Thanks again.
GSinMN