Keyboard

The keyboard is an essential input device used by all users to enter text, navigate, and initiate actions.

Keyboard-Only Interaction

Some people prefer using a keyboard over a mouse or a trackpad. Others, such as VoiceOver users, need to use the keyboard. To ensure your app can be used by all users, make sure its core features are accessible using the keyboard.

Respect standard keyboard shortcuts and create app-specific shortcuts for frequently used commands. Keyboard shortcuts let people activate menu items and actions by pressing specific key combination.

Add full keyboard access mode support to all custom interface elements. Full keyboard access mode lets users navigate and activate windows, menus, interface elements, and system features using the keyboard alone.

Keyboard Shortcuts

Keyboard shortcuts offer an efficient way for people to initiate actions without using the mouse or trackpad to navigate a menu or click an interface element. Standard shortcuts are defined throughout the system, and you can assign custom ones to the menus and controls in your app.

Enable the expected keyboard shortcuts for standard menu items. Keyboard shortcuts for standard menu items should be consistent in all apps.

Define new keyboard shortcuts only for things people do regularly. It’s hard for people to remember shortcuts they seldom use. Minimizing app-specific keyboard shortcuts also helps avoid potential conflicts with other system-wide shortcuts that may be in place.

In general, don’t override standard keyboard shortcuts. Users shouldn’t become confused because the shortcuts they know work differently in your app. Only in very rare cases does it make sense to redefine a common shortcut. For example, if people spend a significant amount of time in your app, it might make sense to redefine a standard shortcut that isn’t applicable to your app. Another option might be to let the user choose their own keyboard shortcuts.

Defining Keyboard Shortcuts

Although it’s possible for a keyboard shortcut to consist of a single key—the Esc (Escape) key, for example, often invokes the Cancel button in dialogs—most shortcuts consist of a combination of keys. Typically, a combination includes a single primary key and one or more of the modifier keys, which are represented in the interface using a symbol.

Modifier Key Symbol
Control
Option
Shift
Command

Prefer the Command key as the main modifier key in a keyboard shortcut. The Command key is used extensively as the main modifier throughout the system, so users know it well. It's also positioned for quick access while typing.

Prefer the Shift key as a secondary modifier when a shortcut compliments another shortcut. For example, Command-P displays the Print dialog in most apps. The standard shortcut for the Page Setup dialog, which complements printing, is typically Shift-Command-P.

Use the Option key as a modifier sparingly. If a third, less common command is related to a pair of commands that use Command and Shift-Command, you can use Option-Command in the third command’s shortcut. Use this combinations very rarely. You can also use Option in a shortcut to a convenience or power-user feature. For example, Finder uses Option-Command-W for Close All Windows and Option-Command-M for Minimize All Windows.

As much as possible, avoid using the Control key as a modifier. The Control key is already used extensively throughout the system. To avoid possible conflicts, use it only when necessary.

Avoid creating a new shortcut by adding a modifier to an existing unrelated shortcut. For example, don’t use Shift-Command-Z as a keyboard shortcut for something unrelated to Undo, which typically has a shortcut of Command-Z.

List modifier keys in the correct order. If you use more than one modifier key in a shortcut, always list them in this order: Control, Option, Shift, Command.

Identify a two-character key by its lower character unless Shift is part of the shortcut. For example, the keyboard shortcut for Hide Status Bar is Command-Slash (/). If the Shift key is part of the keyboard shortcut, identify the key using the upper of the two characters. For example, the keyboard shortcut for Help is Command-Question mark (?), not Shift-Command-Slash.

Tip Some languages require modifier keys to generate certain characters. For example, on a French keyboard, Option-5 generates the “{“ character. It’s usually safe to use the Command key as a modifier, but avoid using an additional modifier with characters not available on all keyboards. If you must use a modifier other than the Command key, try to use it only with the alphabetic characters (A through Z).

Reserved and Expected Keyboard Shortcuts

The following keyboard shortcuts are either reserved by the system or well-known by users.

Primary Key Keyboard Shortcut
Used by the System
Action
Space Command-Space
Show or hide the Spotlight search field (when multiple languages are installed, may rotate through enabled script systems).
Shift-Command-Space
Varies. Apple Reserved.
Option-Command-Space
Show the Spotlight search results window (when multiple languages are installed, may rotate through keyboard layouts and input methods within a script).
Control-Command-Space
Show the Special Characters window.
Tab Shift-Tab
Navigate through controls in a reverse direction.
Command-Tab
Move forward to the next most recently used app in a list of open apps.
Shift-Command-Tab
Move backward through a list of open apps (sorted by recent use).
Control-Tab
Move focus to the next grouping of controls in a dialog or the next table (when Tab moves to the next cell).
Control-Shift-Tab
Move focus to the previous grouping of controls.
Esc Option-Command-Esc
Open the Force Quit dialog.
Eject Control-Command-Eject
Quit all apps (after changes have been saved to open documents) and restart the computer.
Control-Option-Command-Eject
Quit all apps (after changes have been saved to open documents) and shut the computer down.
F1  Control-F1
Toggle full keyboard access on or off.
F2  Control-F2
Move focus to the menu bar.
F3  Control- F3
Move focus to the Dock.
F4 Control-F4
Move focus to the active (or next) window.
Control-Shift-F4
Move focus to the previously active window.
F5 Control-F5
Move focus to the toolbar.
Command-F5
Turn VoiceOver on or off.
F6 Control-F6
Move focus to the first (or next) panel.
Control-Shift-F6
Move focus to the previous panel.
F7 Control-F7
Temporarily override the current keyboard access mode in windows and dialogs.
F8
Varies. Apple Reserved.
F9
Varies. Apple Reserved.
F10
Varies. Apple Reserved.
F11
Show desktop.
F12
Hide or display Dashboard.
Grave accent (`) Command-Grave accent
Activate the next open window in the frontmost app.
Shift-Command-Grave accent
Activate the previous open window in the frontmost app.
Option-Command-Grave accent
Move focus to the window drawer.
Hyphen (-) Command-Hyphen
Decrease the size of the selection.
Option-Command-Hyphen
Zoom out when screen zooming is on.
Left bracket ({) Command-Left bracket Left-align a selection.
Right bracket (}) Command-Right bracket Right-align a selection.
Pipe (|) Command-Pipe Center-align a selection.
Colon (:) Command-Colon Display the Spelling window.
Semicolon (;) Command-Semicolon Find misspelled words in the document.
Comma (,) Command-Comma Open the app's preferences window.
Control-Option-Command-Comma
Decrease screen contrast.
Period (.) Control-Option-Command-Period
Increase screen contrast.
Question mark (?) Command-Question mark Open the app's Help menu.
Forward slash (/) Option-Command-Forward slash
Turn font smoothing on or off.
Equal sign (=) Shift-Command-Equal sign
Increase the size of the selection.
Option-Command-Equal sign
Zoom in when screen zooming is on.
3 Shift-Command-3
Capture the screen to a file.
Control-Shift-Command-3
Capture the screen to the Clipboard.
4 Shift-Command-4
Capture a selection to a file.
Control-Shift-Command-4
Capture a selection to the Clipboard.
8 Option-Command-8
Turn screen zooming on or off.
Control-Option-Command-8
Invert the screen colors.
A Command-A Selects every item in a document or window, or all characters in a text field.
Shift-Command-A Deselects all selections or characters.
B Command-B Boldface the selected text or toggle boldfaced text on and off.
C Command-C Copy the selection to the Clipboard.
Shift-Command-C Display the Colors window.
Option-Command-C Copy the style of the selected text.
Command-Command-C Copy the formatting settings of the selection and store on the Clipboard.
D Option-Command-D
Show or hide the Dock.
Control-Command-D Display the definition of the selected word in the Dictionary app.
E Command-E Use the selection for a find operation.
F Command-F Open a Find window.
Option-Command-F Jump to the search field control.
Control-Command-F Enter full screen.
G Command-G Find the next occurrence of the selection.
Shift-Command-G Find the previous occurrence of the selection.
H Command-H Hide the windows of the currently running app.
Option-Command-H Hide the windows of all other running apps.
I Command-I Italicize the selected text or toggle italic text on or off.
Command-I Display an Info window.
Option-Command-I Display an inspector window.
J Command-J Scroll to a selection.
M Command-M Minimize the active window to the Dock.
Option-Command-M Minimize all windows of the active app to the Dock.
N Command-N Open a new document.
O Command-O Display a dialog for choosing a document to open.
P Command-P Display the Print dialog.
Shift-Command-P Display the Page Setup dialog.
Q Command-Q Quit the app.
Shift-Command-Q
Log out the current user.
Option-Shift-Command-Q
Log out the current user without confirmation.
S Command-S Save a new document or save a version of a document.
Shift-Command-S Duplicate the active document or initiate a Save As.
T Command-T Display the Fonts window.
Option-Command-T Show or hide a toolbar.
U Command-U Underline the selected text or turn underlining on or off.
V Command-V Paste the Clipboard contents at the insertion point.
Shift-Command-V Paste as (Paste as Quotation, for example).
Option-Command-V Apply the style of one object to the selection.
Option-Shift-Command-V Paste the Clipboard contents at the insertion point and apply the style of the surrounding text to the inserted object.
Control-Command-V Apply formatting settings to the selection.
W Command-W Close the active window.
Shift-Command-W Close a file and its associated windows.
Option-Command-W Close all windows in the app.
X Command-X Remove the selection and store on the Clipboard.
Z Command-Z Undo the previous operation.
Shift-Command-Z Redo (when Undo and Redo are separate commands rather than toggled using Command-Z)
Right arrow Command-Right arrow
Change the keyboard layout to current layout of Roman script.
Shift-Command-Right arrow
Extend selection to the next semantic unit, typically the end of the current line.
Shift-Right arrow
Extend selection one character to the right.
Option-Shift-Right arrow
Extend selection to the end of the current word, then to the end of the next word.
Control-Right arrow
Move focus to another value or cell within a view, such as a table.
Left arrow Command-Left arrow
Change the keyboard layout to current layout of system script.
Shift-Command-Left arrow
Extend selection to the previous semantic unit, typically the beginning of the current line.
Shift-Left arrow
Extend selection one character to the left.
Option-Shift-Left arrow
Extend selection to the beginning of the current word, then to the beginning of the previous word.
Control-Left arrow
Move focus to another value or cell within a view, such as a table.
Up arrow Shift-Control-Up arrow
Extend selection upward in the next semantic unit, typically the beginning of the document.
Shift-Up arrow
Extend selection to the line above, to the nearest character boundary at the same horizontal location.
Option-Shift-Up arrow
Extend selection to the beginning of the current paragraph, then to the beginning of the next paragraph.
Control-Up arrow
Move focus to another value or cell within a view, such as a table.
Down arrow Shift-Command-Down arrow
Extend selection downward in the next semantic unit, typically the end of the document.
Shift-Down arrow
Extend selection to the line below, to the nearest character boundary at the same horizontal location.
Option-Shift-Down arrow
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).
Control-Down arrow
Move focus to another value or cell within a view, such as a table.

Reserved International Keyboard Shortcuts

The system reserves several key combinations for use with localized versions of the system, localized keyboard, keyboard layouts, and input methods. These shortcuts don’t correspond directly to menu commands.

Keyboard shortcut Action
Command–Space Rotate through enabled script systems.
Option–Command–Space Rotate through keyboard layouts and input methods within a script.
Modifier key–Command–Space Varies. Apple reserved.
Command–Right arrow Change keyboard layout to current layout of Roman script.
Command–Left arrow Change keyboard layout to current layout of system script.