LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

shortcut keys for 2-button dialog

Solved!
Go to solution

I have some code with an event structure. One event is value change of the QUIT button. In that event case, there's a 2-button dialog that gives the operator a chance to return or to quit.

 

To improve human factors for this application, I'd like to allow either dialog option via the keyboard, i.e., without a mouse.

 

The return key generates True out of the dialog.  Is there a keyboard shortcut for the False case or any way to add code to implement a shortcut? 

 

 

Jeffrey Bledsoe
Electrical Engineer
0 Kudos
Message 1 of 6
(3,350 Views)
Not with the built-in dialog, no. You can however create a dialog box of your own that exhibits whatever behavior you want. Here's one example:

http://www.notatamelion.com/2014/12/02/adding-a-non-blocking-dialog-box/

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 6
(3,328 Views)
Solution
Accepted by RavensFan

The common keyboard shortcut for "cancel" is the Esc key, and it does work with the 2BD. Note that techincally it doesn't trigger the F button, but cancels out of the dialog (similar to if you press the X button or Alt-F4), but the effect is that the output will be F, regardless of what you name the button.


___________________
Try to take over the world!
0 Kudos
Message 3 of 6
(3,323 Views)

@tst wrote:

The common keyboard shortcut for "cancel" is the Esc key, and it does work with the 2BD. Note that techincally it doesn't trigger the F button, but cancels out of the dialog (similar to if you press the X button or Alt-F4), but the effect is that the output will be F, regardless of what you name the button.


Thanks. That will help.

Jeffrey Bledsoe
Electrical Engineer
0 Kudos
Message 4 of 6
(3,297 Views)

Your thank you message should not be marked as the solution.  Tst's message was the solution.

 

To give him proper credit, and for future people reading your message thread to find the solution, I moved the solution marker from your message to Tst's.

Message 5 of 6
(3,285 Views)

Thanks.

Jeffrey Bledsoe
Electrical Engineer
0 Kudos
Message 6 of 6
(3,275 Views)