LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

keyboard shortcuts with ALT+(letter)

In LabVIEW CVI it's easy to set keyboard shortcuts so that a user can jump to a control using ALT plus the letter that has been set for that control. Now that I'm working in LabVIEW, I'm having trouble figuring out how to do the same thing.

For example, a numeric control on the page is called "Start Value". I want to designate "ALT+t" as a shortcut for the control. Ideally, the first "t" would be underlined and pressing "ALT+t" would cause the focus to switch to this control.

Any insights on how to do this in LabVIEW?
0 Kudos
Message 1 of 10
(4,764 Views)
On the front panel right click on the control for which you want to set the keyboard shortcut. Go to Advanced, Key Navigation. Then set the keyboard shortcut. Repeat this for additional controls.

You can make a control have keyfocus by using property nodes. To create a property node...
On the block diagram right click on the control or indicators terminal, create, property node.
On the property node right click, Properties, select the key focus property. Set the property node to write (right click on property node, write) and wire a Boolean True to the key focus property.

Chad
0 Kudos
Message 2 of 10
(4,763 Views)
From what you're saying, it sounds like the only way to do shortcut keys are with the function keys and , , etc. There's no way to use letters instead of function keys?
0 Kudos
Message 3 of 10
(4,752 Views)
There are ways to do this, but they are not as straight forward.

For example create a runtime menu and assign items in your runtime menu the keyboard shortcut. Then using the "Event Structure" look for the runtime menu selection to occur and assign that same event for your button press. Then the code is executed for either a button press or a keyboard selection.

Below is a link for creating runtime menus:
http://digital.ni.com/public.nsf/websearch/17803aa31c8c07c986256cfd0080d609?opendocument

Attached is an example. The vi and its runtime menu need to be in the same directory.

Chad
Message 4 of 10
(4,741 Views)
That makes sense. I think it would work, but I'm not sure it's worth the trouble...

Thanks for your help!
0 Kudos
Message 5 of 10
(4,734 Views)
This thread seems to discuss my problem. Is there any update to using simple shortcuts in a custom Labview application especially normal combinations like STR + X ?

0 Kudos
Message 6 of 10
(4,400 Views)
Not sure what you mean by STR, but you can use Ctrl-<key> in the LabVIEW menu editor. From the help:






Message Edited by smercurio_fc on 03-13-2008 10:08 AM
0 Kudos
Message 7 of 10
(4,396 Views)
My intention is to press a key or combination like "CTRL + O" which behaves the same way as push a button on my vis frontpanel. Nothing else.
I know there is an option with polling all keyboard inputs in a WHILE-Loop, but I thougt there must be an easier way. Maybe something similiar to an event node, which does the polling for me.

Event: CTRL + O pushed, do ....

I hope it is now clear.

greetings
0 Kudos
Message 8 of 10
(4,377 Views)
The event structure already does this. You need to handle the "VI: Menu Selection (User)" event. See attached example.
0 Kudos
Message 9 of 10
(4,361 Views)
Thx, I will give that a try at tuesday.
0 Kudos
Message 10 of 10
(4,355 Views)