LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

key listeners

I want the state of a boolean to change when I press a key, but not the
F-keys, Clear, Esc, etc or any of the other keys already in Labview. Is
there anyway to have when I press a number key or a character that the
boolean's state would change. Thanks!

charley
0 Kudos
Message 1 of 2
(2,460 Views)
> I want the state of a boolean to change when I press a key, but not the
> F-keys, Clear, Esc, etc or any of the other keys already in Labview. Is
> there anyway to have when I press a number key or a character that the
> boolean's state would change. Thanks!
>

There are a couple options here. First off, you can download a keyboard llb
from the ftp site that gives you raw key information on the diagram.
You can
then toggle the value of the button on the diagram or set the focus of the
button using an attribute node.

Second, you can make a custom menu that contains an item that means the same
as the button. When the menu shortcut is selected, change the button state
from the diagram. This will of course use the menu modifier though.

Third, reconsider using an
FKey.

Currently, the Menu keys, text keys for a string/numeric, and shortcut keys
for controls do not overlap. It isn't possible to have F4 mapped to two
controls, two menu items, etc. It is of course possible, but tends to
cause confusion when used; so LV currently doesn't allow it.

Greg McKaskle
0 Kudos
Message 2 of 2
(2,460 Views)