MenuItem.SetRequireCommand
--------------------------

Set to show menu item only if command key is pressed down.

| Component | Version | macOS | Windows | Linux | Server | iOS SDK |
|---|---|---|---|---|---|---|
| [Menu](component_Menu.md) | [5.1](newinversion51.md) | ✅ Yes | ✅ Yes | ❌ No | ❌ No | ❌ No |

MBS( "MenuItem.SetRequireCommand"; Item; Value ) 

**MBS**( **"MenuItem.SetRequireCommand";** /\* Set to show menu item only if command key is pressed down. \*/  
**$Item**; /\* The reference to the menu item. Please create one with [MenuItem.CreateMenuItem](MenuItemCreateMenuItem.md) or [MenuItem.CreateSeparator](MenuItemCreateSeparator.md). \*/   
**$Value**) /\* The new setting. Pass 1 to require command key or 0 to not require it.e.g. 1 \*/ 

### Parameters

| Parameter | Description | Example |
|---|---|---|
| Item | The reference to the menu item. Please create one with [MenuItem.CreateMenuItem](MenuItemCreateMenuItem.md) or [MenuItem.CreateSeparator](MenuItemCreateSeparator.md). | $item |
| Value | The new setting. Pass 1 to require command key or 0 to not require it. | 1 |

### Result

Returns OK or error.

### Description

Set to show menu item only if command key is pressed down.  
### See also

- [MenuItem.CreateMenuItem](MenuItemCreateMenuItem.md)
- [MenuItem.CreateSeparator](MenuItemCreateSeparator.md)
- [MenuItem.GetRequireCommand](MenuItemGetRequireCommand.md)
- [MenuItem.GetRequireControl](MenuItemGetRequireControl.md)
- [MenuItem.GetRequireOption](MenuItemGetRequireOption.md)
- [MenuItem.SetRequireControl](MenuItemSetRequireControl.md)
- [MenuItem.SetRequireOption](MenuItemSetRequireOption.md)
- [MenuItem.SetRequireShift](MenuItemSetRequireShift.md)

### Blog Entries

- [MBS FileMaker Plugin, version 5.1pr8](https://www.mbsplugins.de/archive/2015-05-13/MBS_FileMaker_Plugin_version_5/monkeybreadsoftware_blog_filemaker)
- [More menu commands for FileMaker](https://www.mbsplugins.de/archive/2015-05-11/More_menu_commands_for_FileMak/monkeybreadsoftware_blog_filemaker)

This function is free to use.

Created 11st May 2015 , last changed 11st May 2015

  
[MenuItem.SetOnStateImage](MenuItemSetOnStateImage.md) - [MenuItem.SetRequireControl](MenuItemSetRequireControl.md)

[HTML Version](MenuItemSetRequireCommand.shtml)