| Products & Services | Solutions | Academia | Support | User Community | Company |
| Download Product Updates | | | Get Pricing | | | Trial Software |
| Documentation → MATLAB |
| Contents | Index |
| Learn more about MATLAB |
| On this page… |
|---|
As an alternative to using the mouse, you can press a combination of keyboard keys to perform some desktop actions. MATLAB supports the use of both mnemonics and keyboard shortcuts. The following topics explain the differences between these two methods and how to use them:
A mnemonic is a means of using keystrokes to perform a desktop action, such as clicking a button or opening a menu, and then choosing an option. It is called a mnemonic because it frequently uses the first letter of the menu or menu option name to help you remember the keystrokes required to use it.
Mnemonics appear as underlined letters on menus or buttons. For instance, the F in the MATLAB File menu appears as shown in the following image.
![]()
To open a menu or activate a button using mnemonics, press the Alt key and the letter key that corresponds to the underlined letter in the menu name, menu option name, or button name. The action occurs when you press the letter. You also can use mnemonics to perform an action that would require multiple mouse clicks. For example, opening the print dialog box: Alt+F, P. For more information see Examples of Mnemonics and a Keyboard Shortcut.
Customized keyboard shortcuts can override mnemonics. For example, if you specify Alt+F, P as the keyboard shortcut for the Delete action across the desktop, then pressing Alt+F, P no longer opens the Print dialog box. You cannot customize mnemonics.
MATLAB running on the Apple Macintosh platform does not support mnemonics.
The Windows operating system has a setting to hide the display of mnemonics. To display hidden mnemonics, make the MATLAB desktop the active window, and then press the Alt key. For details, see the Windows documentation.
A keyboard shortcut is a means of using keyboard key strokes to perform a desktop action, without opening a desktop menu. If a keyboard shortcut is assigned to an action on a menu option, it appears to the right of the option name on the menu. For example, the default keyboard shortcut for opening the Open dialog box is Ctrl+O.

It is possible to have multiple keyboard shortcuts for an action. All defined shortcuts work, but only one appears next to the option name on the desktop menu. When you provide a keyboard shortcut for a menu option that previously had none, the desktop menu automatically updates to display the new keyboard shortcut.
If you define a keyboard shortcut that uses the same keystrokes as a mnemonic but performs a different action, then the mnemonic no longer works.
You can choose from a set of shortcuts that install with MATLAB, create customized sets, or use a set copied from another system. For more information see Performing Desktop Actions Using the Keyboard
The image that follows shows the desktop File menu. Notice the mnemonic and keyboard shortcut for closing the Command Window.

Mnemonics
In the illustration, the underlined F in File on the menu bar and the underlined C in the Close Command Window option name indicate the mnemonics. You can close the Command Window without using the mouse by pressing Alt+F, C.
Keyboard Shortcut
In the illustration, Ctrl+W, to the right of theClose Command Window menu option indicates the keyboard shortcut. You can close the Command Window without opening the File menu by pressing Ctrl+W.
![]() | Running Frequently Used Statement Groups with MATLAB Shortcuts | Performing Desktop Actions Using Keyboard Shortcuts | ![]() |

Includes the most popular MATLAB recorded presentations with Q&A sessions led by MATLAB experts.
| © 1984-2009- The MathWorks, Inc. - Site Help - Patents - Trademarks - Privacy Policy - Preventing Piracy - RSS |