LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

On KEY down the key navigation toggles a control continuously. I need a way around this.

I need to be able to press down on the F1 function key and have it "switch when released" only. I have to provide two capabilities; use the function keys or the mouse to toggle a boolean. I used key navigation but using key navigation toggles a boolean on a continuous  basis if the user keeps the key depressed. This is not the behaviour I am looking for and it seems I can't control this functionality in the key navigation setup screen. Therefore, I need your help.  Any ideas?
Check the attached vi. It's shows an example of the key navigation behaviour. Run it and press down and hold the F1 key.

Thanks,

Wil
0 Kudos
Message 1 of 6
(2,712 Views)
I forgot to mention that I am using LV 8.0
For those of you with other versions here is a picture of the diagram.


0 Kudos
Message 2 of 6
(2,709 Views)
What you are getting with the keyboard is a series of new key-presses.  If you press and hold a letter key like "a", you get lots of letter "a"s.  The same thing is happening here.  So, it is not read as a holding the key down. 

Maybe you will have to use something from the Connectivity -> Input Device Control palette.  I have not use them, however so I won't be much help.

Hope that this helps,
Bob Young

0 Kudos
Message 3 of 6
(2,694 Views)
Assuming that you have more than the base version of LabVIEW, you can use the event structure. Use the This VI>Key Up and read the scan code. F1 is also the Help key so you might want to try it with another F key. The event structure should also be used with a Value Change event on the Boolean control.
0 Kudos
Message 4 of 6
(2,686 Views)
Bob

The Connectivity -->  Input Device Control Pallete has tools that might help me with my problem. I tested it and I find only one problem so far and that is that pressing F1 calls and opens the LabVIEW Help program. This is normally disable with key navigation because I have selected to "override system default function key settings" in the Tools-->Options-->Front Panel.

Does anybody know how to disable this short cut for LabVIEW Help?

Thanks,

Wil
0 Kudos
Message 5 of 6
(2,677 Views)
I am going to post this F1 issue separate under the title "How to disable Function Key".

If I can disable the function keys then I will have a workaround for my initial problem with the key navigation.

Thank you for your help, all that replied.


Wil
0 Kudos
Message 6 of 6
(2,664 Views)