is an option for cells that specifies the keyboard shortcut to be associated with a style listed in the Format ▶ Style submenu.
MenuCommandKey
is an option for cells that specifies the keyboard shortcut to be associated with a style listed in the Format ▶ Style submenu.
Details
- Acceptable values include None and "1" through "9". Shortcuts combining the
key with a number key can also be specified by using the form MenuKey["n",Modifiers{"Shift"}]. - Style definitions with menu command keys also generally include a MenuSortingValue to determine the location of the style in the Format ▶ Style submenu.
- "n" is equivalent to MenuKey["n"].
- This option is typically specified in the style definition cell of a stylesheet.
Examples
Basic Examples (1)
Create a style definition for the cell style "MyTitle", which can be accessed by choosing Format ▶ Style ▶ MyTitle or pressing
, and reformat the cell:
NotebookWrite[EvaluationNotebook[], Cell[StyleData["MyTitle"], CellMargins -> {{27, Inherited}, {10, 30}}, MenuSortingValue -> 1100, MenuCommandKey -> "1", FontFamily -> "Helvetica", FontSize -> 36, FontWeight -> "Bold", FontColor -> RGBColor[1, 0, 0]]]See Also
History
Text
Wolfram Research (2007), MenuCommandKey, Wolfram Language function, https://reference.wolfram.com/language/ref/MenuCommandKey.html.
CMS
Wolfram Language. 2007. "MenuCommandKey." Wolfram Language & System Documentation Center. Wolfram Research. https://reference.wolfram.com/language/ref/MenuCommandKey.html.
APA
Wolfram Language. (2007). MenuCommandKey. Wolfram Language & System Documentation Center. Retrieved from https://reference.wolfram.com/language/ref/MenuCommandKey.html
BibTeX
@misc{reference.wolfram_2026_menucommandkey, author="Wolfram Research", title="{MenuCommandKey}", year="2007", howpublished="\url{https://reference.wolfram.com/language/ref/MenuCommandKey.html}", note=[Accessed: 15-June-2026]}
BibLaTeX
@online{reference.wolfram_2026_menucommandkey, organization={Wolfram Research}, title={MenuCommandKey}, year={2007}, url={https://reference.wolfram.com/language/ref/MenuCommandKey.html}, note=[Accessed: 15-June-2026]}