Hi, Im trying to install Command-return and Command-? as keyboard shortcuts to a menu. Ive tried on both Linux and Mac but neither of my shortcuts appear in the menu and I cant figure out what I’m doing wrong. Ive tried using both addDefaultKeypress and defaultKeytpresses.add without luck. Ive provided examples of both methods I have been attempting below.
any help appreciated!
best, Rick
// install Command-return as a keyboard shorcut to the menu:
result.addDefaultKeypress( KeyPress::returnKey, ModifierKeys::commandModifier);
result.defaultKeypresses.add( KeyPress::createFromDescription(T(“command + Return”)));
// install Command-? as a keboard shortcut to the menu:
result.addDefaultKeypress(T(’?’), ModifierKeys::commandModifier);
#ifdef MACOSX
result.defaultKeypresses.add( KeyPress::createFromDescription(T(“shift + command + /”)));
#else
result.defaultKeypresses.add( KeyPress::createFromDescription(T(“shift + command + ?”)));
#endif
[/img]