Components All New MacOS Windows Linux iOS
Examples Mac & Win Server Client Guides Statistic FMM Blog Deprecated Old

Menubar.SetMenuCommandShortcut

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

Parameters

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

Result

Returns OK or error.

Description

Sets the menu item shortcut.

Examples

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 license.

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


Menubar.RunMenuCommand - Menubar.SetMenuCommandTitle