Topics   All   MacOS (Only)   Windows (Only)   Linux (Only, Not)   iOS (Only, Not)  
Components   Crossplatform Mac & Win   Server   Client   Old   Deprecated   Guides   Examples   Videos
New in version: 11.4   11.5   12.0   12.1   12.2   12.3   12.4   12.5   13.0   13.1    Statistic    FMM    Blog  


Sets the menu item shortcut.

Component Version macOS Windows Linux Server iOS SDK
Menubar 5.0 ✅ Yes ❌ No ❌ No ❌ No ❌ No
MBS( "Menubar.SetMenuCommandShortcut"; Path { ; Key; Modifiers } )   More


Parameter Description Example Flags
Path The ID or path to the menu entry.
Use Menubar.ListMenuCommands to find out the IDs and names.
Key Which key to use. "D" Optional
Modifiers Which modifiers to use. can include command, option, shift or control. "command shift" Optional


Returns OK or error.


Sets the menu item shortcut.


Set Shortcut to "⌘⇧D" for the Data Viewer by ID:

MBS("Menubar.SetMenuCommandShortcut"; 49297; "D"; "shift command")

Set Shortcut to "⌘⇧D" for the Data Viewer by name in German:

MBS("FM.SetMenuCommandShortcut"; "Werkzeuge¶Datenanzeige"; "D"; "command shift")

See also

Blog Entries

This function checks for a paid license.

Created 15th November 2014, last changed 14th July 2022

Menubar.RunMenuCommand - Menubar.SetMenuCommandTitle

💬 Ask a question or report a problem

Start Chat