LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

how to assign key such as ALT F, ALT G to a control

i would to assizn keys such as CTRL G, ctrl f to boolen controls . is it possible to do this in lab veiw.IF yes please tell me how i can do it.
0 Kudos
Message 1 of 5
(3,245 Views)
Unfortunately, LV doesn't allow you to map arbitrary key strokes to particular key. The closest it gets is letting you assign funtion keys (F1 through F12) to controls.

Still, there might be a way to get what you need. There are VIs available that allow you to trap characters typed on the keyboard. Perhaps they might help.

Mike...

Certified Professional Instructor
Certified LabVIEW Architect
LabVIEW Champion

"... after all, He's not a tame lion..."

For help with grief and grieving.
0 Kudos
Message 2 of 5
(3,245 Views)
I attach one file for you, but my VI is no need CTRL you just type the value. I think there should be a better way to do it. Anyway here is my VI..
Saw Naing Aye
Download All
0 Kudos
Message 3 of 5
(3,245 Views)
LabVIEW does not allow such shortcuts to be assigned to controls etc, only menu items. However you can use the key down event to detect when the given key combination has been pressed and then highlight the control, press down boolean control or whatever it is you want the keyboard shortcut to do...

An example showing how to read the key down event can be found at:

http://sine.ni.com/apps/we/niepd_web_display.display_epd4?p_guid=B45EACE3E2DD56A4E034080020E74861&p_node=
0 Kudos
Message 4 of 5
(3,245 Views)
> i would to assizn keys such as CTRL G, ctrl f to boolen controls . is
> it possible to do this in lab veiw.IF yes please tell me how i can do
> it.

As the other posts mentioned, LV allows for FKeys and some other common
keys to be attached to buttons, and it allows for ctl-key combos to be
assigned to menu items.

This separation may change in the future, but it was done this way
because those are typical UI guidelines for UI key navigation. You
might want to consider whether you want to make a menu item that carries
out the same action as the button and make the key combo do the menu
instead of the button. Even when the menu is hidden, such as in a
Windows modal dialog, the menu shortcuts are still active.

Greg McKaskle
Message 5 of 5
(3,245 Views)