取消
顯示結果 
搜尋替代 
您的意思是: 

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 積分
1 條訊息(共 6 條)
3,385 檢視
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 積分
2 條訊息(共 6 條)
3,382 檢視
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 積分
3 條訊息(共 6 條)
3,367 檢視
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 積分
4 條訊息(共 6 條)
3,359 檢視
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 積分
5 條訊息(共 6 條)
3,350 檢視
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 積分
6 條訊息(共 6 條)
3,337 檢視