LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

How do I unbind default keyboard shortcuts?

I am using the F1 key as a hotkey. Instead of setting it up as a LabVIEW hotkey I am using the Button Pressed Event to get the key because this simplifies my code as I am using lots of keys.

Problem: When I press F1, the LabVIEW help is launched and my command is ignored. How do I disable the LabVIEW help grom launching with F1?
0 Kudos
Message 1 of 6
(3,546 Views)
> Problem: When I press F1, the LabVIEW help is launched and my command
> is ignored. How do I disable the LabVIEW help grom launching with F1?

There two things you might try. There is a setting in tools options
dialog that lets you override system specified shortcuts for FKeys. If
that isn't enough, you might also try to remove the menu item from your
VIs runtime menu.

Since you are processing these as events, if they can be caught as a
filter event, which I think they are, you can also try to discard the
key after you do your processing. By not discarding it, you are telling
LV to handle it normally, passing it to whatever menu or control has focus.

Greg McKaskle
Message 2 of 6
(3,546 Views)
Thanks,

I discarded the key and it seems to work great.
0 Kudos
Message 3 of 6
(3,546 Views)
I think that I spoke to hastily. It did work great, and then it stopped working, for no apparaent reason.
This is really baffling me.

I do have the override system function key defaults checked. I also have a completely custom run-time menu. How elve can I force labview not to respond to the F1 command?
0 Kudos
Message 4 of 6
(3,546 Views)
> I think that I spoke to hastily. It did work great, and then it
> stopped working, for no apparaent reason.
> This is really baffling me.
>
> I do have the override system function key defaults checked. I also
> have a completely custom run-time menu. How elve can I force labview
> not to respond to the F1 command?

I wrote a small test program and get the key notification. If I do not
discard it, after leaving the event structure, LV will handle the key
and put up the help. I don't have the menu item removed, though.

If I discard it, then after I handle it and leave the event structure
nothing else happens, no help is launched in the browser.

If this isn't the behavior you are seeing, perhaps you should send your
applica
tion, or a simplified version of it to technical support and see
if they can determine why.

Greg McKaskle
0 Kudos
Message 5 of 6
(3,546 Views)
I fixed it for good based on your suggestion. It seems that I have to discrad the key press in each of my .vi's (the Host .vi as well as my childern windows). For some reason when the child window has focus and the Help pops up, the top level .vi was not able to discard the key press any longer.

Thanks again for all of your help, it is deffinately fixed now
0 Kudos
Message 6 of 6
(3,546 Views)