I’ve tried assigning a mnemonic to a momentary button and it seems to perform all the events properly but does not seem to set the control value. I’ve worked around this by using the keyPressed and keyReleased events to give it a momentary action. However, while this works in the designer, the mnemonic only seems to work on the button that has focus when running the project so the user has to tab to the desired button then press the mnemonic key to operate that button. What’s going on here?
That sounds about right, the button mnemonic will only work when you have focus in the right spot just like the menubar mnemonics require focus in the menubar. I’ve found it easier to use the button’s doClick() function to activate a script or just set the button to be the ‘default’ (to be fair, this property doesn’t exist on the momentary button).
You might be better off setting up Keystroke Client Event Scripts that will trigger globally, regardless of the client’s focus.