Keyboard Shortcuts
Keyboard shortcuts provide an easy way for sophisticated users to perform actions. Be sure to respect the system-reserved keyboard shortcuts in your app so that users aren’t confused when the shortcuts they know work differently in your app.
Creating New Keyboard Shortcuts
As much as possible, use the Command key as the main modifier key in a keyboard shortcut. For example, Command-P uses Command to modify the P key. For a command that complements another more common command, you can add Shift to the shortcut. For example, the shortcut for the complementary Page Setup command adds Shift to the shortcut for Print to give Command-Shift-P. Table A-1 gives additional examples of this technique.
Keys | Command | Complemented command |
|---|---|---|
Command-Shift-A | Deselect All | Command-A (Select All) |
Command-Shift-G | Find Previous | Command-G (Find Again) |
Command-Shift-P | Page Setup | Command-P (Print) |
Command-Shift-S | Save As | Command-S (Save) |
Command-Shift-V | Paste as (Paste as Quotation, for example) | Command-V (Paste) |
Command-Shift-Z | Redo | Command-Z (Undo) |
If there’s a third, less common command that’s related to a pair of commands that use Command and Command-Shift, you can use Command-Option for the third command’s keyboard equivalent. Use combinations like these very rarely.
Also use Option for a keyboard shortcut that is a convenience or power-user feature. For example, the Finder uses Command-Option-W for Close All Windows and Command-Option-M for Minimize All Windows.
Because the Control key is already used by some of the universal access features as well as in Cocoa text fields where Emacs-style key bindings are often used, it should be used as a modifier key only when necessary.
Remember that other languages may require modifier keys to generate certain characters. For example, on a French keyboard, Option-5 generates the “{“ character. You can safely use the Command key as a modifier, but avoid using Command and an additional modifier with characters not available on all keyboards. If you must use a modifier key in addition to the Command key, try to use it only with the alphabetic characters (a through z).
When adding custom keyboard shortcuts, try to avoid shortcuts that add a modifier key (such as Option or Shift) to an existing shortcut if the shortcuts have an unrelated function. For example, don’t use Shift-Command-Z as a keyboard shortcut for a command that is unrelated to Undo. Using that shortcut for Redo is appropriate, but using it for something like Calculate or Check Mail is confusing. If you can’t find a unique and easy-to-use keyboard shortcut for a command, don’t use one at all; keep in mind that users may have difficulty pressing multiple modifier keys anyway.
Keyboard Shortcuts Quick Reference
Table A-2 lists the system-reserved and commonly used keyboard shortcuts mentioned in the rest of this document.
As you implement keyboard shortcuts in your app, use this table to find:
Key sequences that are reserved by OS X.
Users rely on these shortcuts to perform the specified actions no matter which app is currently running (these include shortcuts reserved for accessibility purposes). Do not override these shortcuts.
Key sequences that are recommended for common app tasks.
Users expect these shortcuts to mean the same thing from app to app. Provide these shortcuts if your app performs the associated tasks.
If your app does not perform the task associated with a recommended shortcut, think very carefully before you consider overriding it. Remember that although reassigning an unused shortcut might make sense in your app, your users are likely to know and expect the original, established meaning.
If a keyboard sequence is not listed in Table A-2 you can use it for a frequently used command in your app, if a shortcut is appropriate. Be aware, however, that Apple may reserve other keyboard shortcuts in the future.
Table A-2 groups together the primary key that is modified and variations of key sequences based on the primary key. In the interests of space, the table uses the following symbols to represent the modifier keys (these are the same symbols menus display):
(Command)
(Control)
(Option)
(Shift)
Some shortcuts in Table A-2 are accompanied by an
icon. This means that you should not override the shortcut because OS X uses it in some way.
A shortcut in Table A-2 that is not accompanied by an
icon is recommended for apps that perform the associated task.
Primary key | Key sequence | Associated action | |
|---|---|---|---|
Space bar |
|
| Show or hide the Spotlight search field (when multiple languages are installed, may rotate through enabled script systems). |
| Apple reserved. | ||
| Show the Spotlight search results window (when multiple languages are installed, may rotate through keyboard layouts and input methods within a script). | ||
| Apple reserved. | ||
Tab |
|
| Navigate through controls in a reverse direction. |
| Move forward to the next most recently used app in a list of open apps. | ||
| Move backward through a list of open apps (sorted by recent use). | ||
| Move focus to the next grouping of controls in a dialog or the next table (when Tab moves to the next cell). See Accessibility Overview for OS X. | ||
| Move focus to the previous grouping of controls. See Accessibility Overview for OS X. | ||
Esc |
|
| Open the Force Quit dialog. |
Eject | |
| Quit all apps (after giving the user a chance to save changes to open documents) and restart the computer. |
|
| Quit all apps (after giving the user a chance to save changes to open documents) and shut the computer down. | |
F1 |
| Toggle full keyboard access on or off. See Accessibility Overview for OS X. | |
F2 |
| Move focus to the menu bar. See Accessibility Overview for OS X. | |
F3 |
| Move focus to the Dock. See Accessibility Overview for OS X. | |
F4 |
| Move focus to the active (or next) window. See Accessibility Overview for OS X. | |
| Move focus to the previously active window. See Accessibility Overview for OS X. | ||
F5 |
| Move focus to the toolbar. See Accessibility Overview for OS X. | |
|
| Turn VoiceOver on or off. See Accessibility Overview for OS X. | |
F6 |
| Move focus to the first (or next) panel. See Accessibility Overview for OS X. | |
| Move focus to the previous panel. See Accessibility Overview for OS X. | ||
F7 |
| Temporarily override the current keyboard access mode in windows and dialogs. See Accessibility Overview for OS X. | |
F8 |
| Apple reserved. | |
F9 |
| Apple reserved. | |
F10 |
| Apple reserved. | |
F11 |
| Show desktop. | |
F12 |
| Hide or display Dashboard. | |
`(grave accent) |
|
| Activate the next open window in the frontmost app. See “Layering.” |
|
| Activate the previous open window in the frontmost app. See “Layering.” | |
|
| Move focus to the window drawer. | |
- (hyphen) |
| Decrease the size of the selected item (equivalent to the Smaller command). See “The Format Menu.” | |
|
| Zoom out when screen zooming is on. See Accessibility Overview for OS X. | |
{ (left bracket) | Left-align a selection (equivalent to the Align Left command). See “The Format Menu.” | ||
} (right bracket) | Right-align a selection (equivalent to the Align Right command). See “The Format Menu.” | ||
| (pipe) | Center-align a selection (equivalent to the Align Center command). See “The Format Menu.” | ||
: (colon) | Display the Spelling window (equivalent to the Spelling command). See “The Edit Menu.” | ||
; (semicolon) | Find misspelled words in the document (equivalent to the Check Spelling command). See “The Edit Menu.” | ||
, (comma) | Open the app's preferences window (equivalent to the Preferences command). See “The App Menu.” | ||
|
| Decrease screen contrast. See Accessibility Overview for OS X. | |
. (period) |
| Increase screen contrast. See Accessibility Overview for OS X. | |
? (question mark) | Open the app's Help menu. See “The Help Menu.” | ||
/ (forward slash) |
|
| Turn font smoothing on or off. |
= (equal sign) |
| Increase the size of the selected item (equivalent to the Bigger command). See “The Format Menu.” | |
| Zoom in when screen zooming is on. See Accessibility Overview for OS X. | ||
3 |
|
| Capture the screen to a file. |
|
| Capture the screen to the Clipboard. | |
4 |
|
| Capture a selection to a file. |
|
| Capture a selection to the Clipboard. | |
8 |
|
| Turn screen zooming on or off. See Accessibility Overview for OS X. |
|
| Invert the screen colors. See Accessibility Overview for OS X. | |
A | Highlight every item in a document or window, or all characters in a text field (equivalent to the Select All command). See “The Edit Menu.” | ||
B | Boldface the selected text or toggle boldfaced text on and off (equivalent to the Bold command). See “The Edit Menu.” | ||
C | Duplicate the selected data and store on the Clipboard (equivalent to the Copy command). See “The Edit Menu.” | ||
Display the Colors window (equivalent to the Show Colors command). See “The Format Menu.” | |||
Copy the style of the selected text (equivalent to the Copy Style command). See “The Format Menu.” | |||
Copy the formatting settings of the selected item and store on the Clipboard (equivalent to the Copy Ruler command). See “The Format Menu.” | |||
D |
|
| Show or hide the Dock. See “The Dock.” |
| Display the definition of the selected word in the Dictionary app. | ||
E | Use the selection for a find operation. See “Find Windows.” | ||
F | Open a Find window (equivalent to the Find command). See “The Edit Menu.” | ||
Jump to the search field control. See “Search Field.” | |||
Enter full screen. | |||
G | Find the next occurrence of the selection (equivalent to the Find Next command). See “The Edit Menu.” | ||
Find the previous occurrence of the selection (equivalent to the Find Previous command). See “The Edit Menu.” | |||
H | Hide the windows of the currently running app (equivalent to the Hide AppName command). See “The App Menu.” | ||
Hide the windows of all other running apps (equivalent to the Hide Others command). See “The App Menu.” | |||
I | Italicize the selected text or toggle italic text on or off (equivalent to the Italic command). See “The Format Menu.” | ||
Display an Info window. See “Inspectors.” | |||
Display an inspector window. See “Inspectors.” | |||
J | Scroll to a selection. | ||
M | Minimize the active window to the Dock (equivalent to the Minimize command). See “The Window Menu.” | ||
Minimize all windows of the active app to the Dock (equivalent to the Minimize All command). See “The Window Menu.” | |||
N | Open a new document (equivalent to the New command). See “The File Menu.” | ||
O | Display a dialog for choosing a document to open (equivalent to the Open command). See “The File Menu.” | ||
P | Display the Print dialog (equivalent to the Print command). See “The File Menu.” | ||
Display a dialog for specifying printing parameters (equivalent to the Page Setup command). See “The File Menu.” | |||
Q | Quit the app (equivalent to the Quit command). See “The App Menu.” | ||
|
| Log out the current user (equivalent to the Log Out command). | |
|
| Log out the current user without confirmation. | |
S | Save a new document or save a version of a document. See “The File Menu.” | ||
Not used(legacy equivalent to the Save As command). See “The File Menu.” | |||
T | Display the Fonts window (equivalent to the Show Fonts command). See “The Format Menu.” | ||
Show or hide a toolbar (equivalent to the Show/Hide Toolbar command). See “The View Menu” and “Designing a Toolbar.” | |||
U | Underline the selected text or turn underlining on or off (equivalent to the Underline command). See “The Format Menu.” | ||
V | Insert the Clipboard contents at the insertion point (equivalent to the Paste command). See “The File Menu.” | ||
Apply the style of one object to the selected object (equivalent to the Paste Style command). See “The Format Menu.” | |||
Apply the style of the surrounding text to the inserted object (equivalent to the Paste and Match Style command). See “The Edit Menu.” | |||
Apply formatting settings to the selected object (equivalent to the Paste Ruler command). See “The Format Menu.” | |||
W | Close the active window (equivalent to the Close command). See “The File Menu.” | ||
Close a file and its associated windows (equivalent to the Close File command). See “The File Menu.” | |||
Close all windows in the app (equivalent to the Close All command). See “The File Menu.” | |||
X | Remove the selection and store on the Clipboard (equivalent to the Cut command). See “The Edit Menu.” | ||
Z | Reverse the effect of the user's previous operation (equivalent to the Undo command). See “The Edit Menu.” | ||
Reverse the effect of the last Undo command (equivalent to the Redo command). See “The Edit Menu.” | |||
| Change the keyboard layout to current layout of Roman script. | ||
| Extend selection to the next semantic unit, typically the end of the current line. | ||
| Extend selection one character to the right. | ||
| Extend selection to the end of the current word, then to the end of the next word. | ||
| Move focus to another value or cell within a view, such as a table. See Accessibility Overview for OS X. | ||
|
| Change the keyboard layout to current layout of system script. | |
| Extend selection to the previous semantic unit, typically the beginning of the current line. | ||
| Extend selection one character to the left. | ||
| Extend selection to the beginning of the current word, then to the beginning of the previous word. | ||
| Move focus to another value or cell within a view, such as a table. See Accessibility Overview for OS X. | ||
|
| Extend selection upward in the next semantic unit, typically the beginning of the document. | |
| Extend selection to the line above, to the nearest character boundary at the same horizontal location. | ||
| Extend selection to the beginning of the current paragraph, then to the beginning of the next paragraph. | ||
|
| Move focus to another value or cell within a view, such as a table. See Accessibility Overview for OS X. | |
|
| Extend selection downward in the next semantic unit, typically the end of the document. | |
| Extend selection to the line below, to the nearest character boundary at the same horizontal location. | ||
| Extend selection to the end of the current paragraph, then to the end of the next paragraph (include the paragraph terminator, such as Return, in cut, copy, and paste operations). | ||
|
| Move focus to another value or cell within a view, such as a table. See Accessibility Overview for OS X. |
© 1992, 2001-2003, 2012 Apple Inc. All Rights Reserved. (Last updated: 2012-07-23)