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.

Table A-1  Examples of keyboard shortcuts that use Shift to complement other commands

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:

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):

Some shortcuts in Table A-2 are accompanied by an image: ../art/ks_apple_icon.gif 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 image: ../art/ks_apple_icon.gif icon is recommended for apps that perform the associated task.

Table A-2  Keyboard shortcuts

Primary key

Key sequence

Associated action

Space bar

image: ../art/ks_command.gif Space

image: ../art/ks_apple_icon.gif

Show or hide the Spotlight search field (when multiple languages are installed, may rotate through enabled script systems).

image: ../art/ks_shift.gif image: ../art/ks_command.gif Space

image: ../art/ks_apple_icon.gif

Apple reserved.

image: ../art/ks_option.gif image: ../art/ks_command.gif Space

image: ../art/ks_apple_icon.gif

Show the Spotlight search results window (when multiple languages are installed, may rotate through keyboard layouts and input methods within a script).

image: ../art/ks_control.gif image: ../art/ks_command.gif Space

image: ../art/ks_apple_icon.gif

Apple reserved.

Tab

image: ../art/ks_shift.gif Tab

image: ../art/ks_apple_icon.gif

Navigate through controls in a reverse direction.

image: ../art/ks_command.gif Tab

image: ../art/ks_apple_icon.gif

Move forward to the next most recently used app in a list of open apps.

image: ../art/ks_shift.gif image: ../art/ks_command.gif Tab

image: ../art/ks_apple_icon.gif

Move backward through a list of open apps (sorted by recent use).

image: ../art/ks_control.gif Tab

image: ../art/ks_apple_icon.gif

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.

image: ../art/ks_shift.gif image: ../art/ks_control.gif Tab

image: ../art/ks_apple_icon.gif

Move focus to the previous grouping of controls. See Accessibility Overview for OS X.

Esc

image: ../art/ks_option.gif image: ../art/ks_command.gif Esc

image: ../art/ks_apple_icon.gif

Open the Force Quit dialog.

Eject

image: ../art/ks_control.gif image: ../art/ks_command.gif Eject

image: ../art/ks_apple_icon.gif

Quit all apps (after giving the user a chance to save changes to open documents) and restart the computer.

image: ../art/ks_control.gif image: ../art/ks_option.gif image: ../art/ks_command.gif Eject

image: ../art/ks_apple_icon.gif

Quit all apps (after giving the user a chance to save changes to open documents) and shut the computer down.

F1

image: ../art/ks_control.gif F1

image: ../art/ks_apple_icon.gif

Toggle full keyboard access on or off. See Accessibility Overview for OS X.

F2

image: ../art/ks_control.gif F2

image: ../art/ks_apple_icon.gif

Move focus to the menu bar. See Accessibility Overview for OS X.

F3

image: ../art/ks_control.gif F3

image: ../art/ks_apple_icon.gif

Move focus to the Dock. See Accessibility Overview for OS X.

F4

image: ../art/ks_control.gif F4

image: ../art/ks_apple_icon.gif

Move focus to the active (or next) window. See Accessibility Overview for OS X.

image: ../art/ks_shift.gif  image: ../art/ks_control.gif  F4

image: ../art/ks_apple_icon.gif

Move focus to the previously active window. See Accessibility Overview for OS X.

F5

image: ../art/ks_control.gif F5

image: ../art/ks_apple_icon.gif

Move focus to the toolbar. See Accessibility Overview for OS X.

image: ../art/ks_command.gif  F5

image: ../art/ks_apple_icon.gif

Turn VoiceOver on or off. See Accessibility Overview for OS X.

F6

image: ../art/ks_control.gif  F6

image: ../art/ks_apple_icon.gif

Move focus to the first (or next) panel. See Accessibility Overview for OS X.

image: ../art/ks_shift.gif image: ../art/ks_control.gif F6

image: ../art/ks_apple_icon.gif

Move focus to the previous panel. See Accessibility Overview for OS X.

F7

image: ../art/ks_control.gif F7

image: ../art/ks_apple_icon.gif

Temporarily override the current keyboard access mode in windows and dialogs. See Accessibility Overview for OS X.

F8

image: ../art/ks_apple_icon.gif

Apple reserved.

F9

image: ../art/ks_apple_icon.gif

Apple reserved.

F10

image: ../art/ks_apple_icon.gif

Apple reserved.

F11

image: ../art/ks_apple_icon.gif

Show desktop.

F12

image: ../art/ks_apple_icon.gif

Hide or display Dashboard.

`(grave accent)

image: ../art/ks_command.gif  `

image: ../art/ks_apple_icon.gif

Activate the next open window in the frontmost app. See “Layering.”

image: ../art/ks_shift.gif image: ../art/ks_command.gif `

image: ../art/ks_apple_icon.gif

Activate the previous open window in the frontmost app. See “Layering.”

image: ../art/ks_option.gif image: ../art/ks_command.gif `

image: ../art/ks_apple_icon.gif

Move focus to the window drawer.

- (hyphen)

image: ../art/ks_command.gif -

image: ../art/ks_apple_icon.gif

Decrease the size of the selected item (equivalent to the Smaller command). See “The Format Menu.”

image: ../art/ks_option.gif image: ../art/ks_command.gif -

image: ../art/ks_apple_icon.gif

Zoom out when screen zooming is on. See Accessibility Overview for OS X.

{ (left bracket)

image: ../art/ks_command.gif {

Left-align a selection (equivalent to the Align Left command). See “The Format Menu.”

} (right bracket)

image: ../art/ks_command.gif }

Right-align a selection (equivalent to the Align Right command). See “The Format Menu.”

| (pipe)

image: ../art/ks_command.gif |

Center-align a selection (equivalent to the Align Center command). See “The Format Menu.”

: (colon)

image: ../art/ks_command.gif :

Display the Spelling window (equivalent to the Spelling command). See “The Edit Menu.”

; (semicolon)

image: ../art/ks_command.gif ;

Find misspelled words in the document (equivalent to the Check Spelling command). See “The Edit Menu.”

, (comma)

image: ../art/ks_command.gif ,

Open the app's preferences window (equivalent to the Preferences command). See “The App Menu.”

image: ../art/ks_option.gif image: ../art/ks_control.gif image: ../art/ks_command.gif ,

image: ../art/ks_apple_icon.gif

Decrease screen contrast. See Accessibility Overview for OS X.

. (period)

image: ../art/ks_option.gif image: ../art/ks_control.gif image: ../art/ks_command.gif .

image: ../art/ks_apple_icon.gif

Increase screen contrast. See Accessibility Overview for OS X.

? (question mark)

image: ../art/ks_command.gif ?

Open the app's Help menu. See “The Help Menu.”

/ (forward slash)

image: ../art/ks_option.gif image: ../art/ks_command.gif /

image: ../art/ks_apple_icon.gif

Turn font smoothing on or off.

= (equal sign)

image: ../art/ks_shift.gif image: ../art/ks_command.gif =

image: ../art/ks_apple_icon.gif

Increase the size of the selected item (equivalent to the Bigger command). See “The Format Menu.”

image: ../art/ks_option.gif image: ../art/ks_command.gif =

image: ../art/ks_apple_icon.gif

Zoom in when screen zooming is on. See Accessibility Overview for OS X.

3

image: ../art/ks_shift.gif image: ../art/ks_command.gif 3

image: ../art/ks_apple_icon.gif

Capture the screen to a file.

image: ../art/ks_shift.gif image: ../art/ks_control.gif image: ../art/ks_command.gif 3

image: ../art/ks_apple_icon.gif

Capture the screen to the Clipboard.

4

image: ../art/ks_shift.gif image: ../art/ks_command.gif 4

image: ../art/ks_apple_icon.gif

Capture a selection to a file.

image: ../art/ks_shift.gif image: ../art/ks_control.gif image: ../art/ks_command.gif 4

image: ../art/ks_apple_icon.gif

Capture a selection to the Clipboard.

8

image: ../art/ks_option.gif image: ../art/ks_command.gif 8

image: ../art/ks_apple_icon.gif

Turn screen zooming on or off. See Accessibility Overview for OS X.

image: ../art/ks_option.gif image: ../art/ks_control.gif image: ../art/ks_command.gif 8

image: ../art/ks_apple_icon.gif

Invert the screen colors. See Accessibility Overview for OS X.

A

image: ../art/ks_command.gif 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

image: ../art/ks_command.gif B

Boldface the selected text or toggle boldfaced text on and off (equivalent to the Bold command). See “The Edit Menu.”

C

image: ../art/ks_command.gif C

Duplicate the selected data and store on the Clipboard (equivalent to the Copy command). See “The Edit Menu.”

image: ../art/ks_shift.gif image: ../art/ks_command.gif C

Display the Colors window (equivalent to the Show Colors command). See “The Format Menu.”

image: ../art/ks_option.gif image: ../art/ks_command.gif C

Copy the style of the selected text (equivalent to the Copy Style command). See “The Format Menu.”

image: ../art/ks_control.gif image: ../art/ks_command.gif C

Copy the formatting settings of the selected item and store on the Clipboard (equivalent to the Copy Ruler command). See “The Format Menu.”

D

image: ../art/ks_option.gif image: ../art/ks_command.gif D

image: ../art/ks_apple_icon.gif

Show or hide the Dock. See “The Dock.”

image: ../art/ks_command.gif image: ../art/ks_control.gif D

Display the definition of the selected word in the Dictionary app.

E

image: ../art/ks_command.gif E

Use the selection for a find operation. See “Find Windows.”

F

image: ../art/ks_command.gif F

Open a Find window (equivalent to the Find command). See “The Edit Menu.”

image: ../art/ks_option.gif image: ../art/ks_command.gif F

Jump to the search field control. See “Search Field.”

image: ../art/ks_control.gif image: ../art/ks_command.gif F

Enter full screen.

G

image: ../art/ks_command.gif G

Find the next occurrence of the selection (equivalent to the Find Next command). See “The Edit Menu.”

image: ../art/ks_shift.gif image: ../art/ks_command.gif G

Find the previous occurrence of the selection (equivalent to the Find Previous command). See “The Edit Menu.”

H

image: ../art/ks_command.gif H

Hide the windows of the currently running app (equivalent to the Hide AppName command). See “The App Menu.”

image: ../art/ks_option.gif image: ../art/ks_command.gif H

Hide the windows of all other running apps (equivalent to the Hide Others command). See “The App Menu.”

I

image: ../art/ks_command.gif I

Italicize the selected text or toggle italic text on or off (equivalent to the Italic command). See “The Format Menu.”

image: ../art/ks_command.gif I

Display an Info window. See “Inspectors.”

image: ../art/ks_option.gif image: ../art/ks_command.gif I

Display an inspector window. See “Inspectors.”

J

image: ../art/ks_command.gif J

Scroll to a selection.

M

image: ../art/ks_command.gif M

Minimize the active window to the Dock (equivalent to the Minimize command). See “The Window Menu.”

image: ../art/ks_option.gif image: ../art/ks_command.gif M

Minimize all windows of the active app to the Dock (equivalent to the Minimize All command). See “The Window Menu.”

N

image: ../art/ks_command.gif N

Open a new document (equivalent to the New command). See “The File Menu.”

O

image: ../art/ks_command.gif O

Display a dialog for choosing a document to open (equivalent to the Open command). See “The File Menu.”

P

image: ../art/ks_command.gif P

Display the Print dialog (equivalent to the Print command). See “The File Menu.”

image: ../art/ks_shift.gif image: ../art/ks_command.gif P

Display a dialog for specifying printing parameters (equivalent to the Page Setup command). See “The File Menu.”

Q

image: ../art/ks_command.gif Q

Quit the app (equivalent to the Quit command). See “The App Menu.”

image: ../art/ks_shift.gif image: ../art/ks_command.gif Q

image: ../art/ks_apple_icon.gif

Log out the current user (equivalent to the Log Out command).

image: ../art/ks_shift.gif  image: ../art/ks_option.gif image: ../art/ks_command.gif Q

image: ../art/ks_apple_icon.gif

Log out the current user without confirmation.

S

image: ../art/ks_command.gif S

Save a new document or save a version of a document. See “The File Menu.”

image: ../art/ks_shift.gif image: ../art/ks_command.gif S

Not used(legacy equivalent to the Save As command). See “The File Menu.”

T

image: ../art/ks_command.gif T

Display the Fonts window (equivalent to the Show Fonts command). See “The Format Menu.”

image: ../art/ks_option.gif image: ../art/ks_command.gif T

Show or hide a toolbar (equivalent to the Show/Hide Toolbar command). See “The View Menu” and “Designing a Toolbar.”

U

image: ../art/ks_command.gif U

Underline the selected text or turn underlining on or off (equivalent to the Underline command). See “The Format Menu.”

V

image: ../art/ks_command.gif V

Insert the Clipboard contents at the insertion point (equivalent to the Paste command). See “The File Menu.”

image: ../art/ks_option.gif image: ../art/ks_command.gif V

Apply the style of one object to the selected object (equivalent to the Paste Style command). See “The Format Menu.”

image: ../art/ks_option.gif image: ../art/ks_shift.gif image: ../art/ks_command.gif V

Apply the style of the surrounding text to the inserted object (equivalent to the Paste and Match Style command). See “The Edit Menu.”

image: ../art/ks_control.gif image: ../art/ks_command.gif V

Apply formatting settings to the selected object (equivalent to the Paste Ruler command). See “The Format Menu.”

W

image: ../art/ks_command.gif W

Close the active window (equivalent to the Close command). See “The File Menu.”

image: ../art/ks_shift.gif image: ../art/ks_command.gif W

Close a file and its associated windows (equivalent to the Close File command). See “The File Menu.”

image: ../art/ks_option.gif image: ../art/ks_command.gif W

Close all windows in the app (equivalent to the Close All command). See “The File Menu.”

X

image: ../art/ks_command.gif X

Remove the selection and store on the Clipboard (equivalent to the Cut command). See “The Edit Menu.”

Z

image: ../art/ks_command.gif Z

Reverse the effect of the user's previous operation (equivalent to the Undo command). See “The Edit Menu.”

image: ../art/ks_shift.gif image: ../art/ks_command.gif Z

Reverse the effect of the last Undo command (equivalent to the Redo command). See “The Edit Menu.”

image: ../art/ks_arrow_right.gif (right arrow)

image: ../art/ks_command.gif image: ../art/ks_arrow_right.gif

image: ../art/ks_apple_icon.gif

Change the keyboard layout to current layout of Roman script.

image: ../art/ks_shift.gif image: ../art/ks_command.gif image: ../art/ks_arrow_right.gif

image: ../art/ks_apple_icon.gif

Extend selection to the next semantic unit, typically the end of the current line.

image: ../art/ks_shift.gif image: ../art/ks_arrow_right.gif

image: ../art/ks_apple_icon.gif

Extend selection one character to the right.

image: ../art/ks_shift.gif image: ../art/ks_option.gif image: ../art/ks_arrow_right.gif

image: ../art/ks_apple_icon.gif

Extend selection to the end of the current word, then to the end of the next word.

image: ../art/ks_control.gif image: ../art/ks_arrow_right.gif

image: ../art/ks_apple_icon.gif

Move focus to another value or cell within a view, such as a table. See Accessibility Overview for OS X.

image: ../art/ks_arrow_left.gif (left arrow)

image: ../art/ks_command.gif image: ../art/ks_arrow_left.gif

image: ../art/ks_apple_icon.gif

Change the keyboard layout to current layout of system script.

image: ../art/ks_shift.gif image: ../art/ks_command.gif image: ../art/ks_arrow_left.gif

image: ../art/ks_apple_icon.gif

Extend selection to the previous semantic unit, typically the beginning of the current line.

image: ../art/ks_shift.gif image: ../art/ks_arrow_left.gif

image: ../art/ks_apple_icon.gif

Extend selection one character to the left.

image: ../art/ks_shift.gif image: ../art/ks_option.gif image: ../art/ks_arrow_left.gif

image: ../art/ks_apple_icon.gif

Extend selection to the beginning of the current word, then to the beginning of the previous word.

image: ../art/ks_control.gif image: ../art/ks_arrow_left.gif

image: ../art/ks_apple_icon.gif

Move focus to another value or cell within a view, such as a table. See Accessibility Overview for OS X.

image: ../art/ks_arrow_up.gif (up arrow)

image: ../art/ks_shift.gif image: ../art/ks_command.gif image: ../art/ks_arrow_up.gif

image: ../art/ks_apple_icon.gif

Extend selection upward in the next semantic unit, typically the beginning of the document.

image: ../art/ks_shift.gif image: ../art/ks_arrow_up.gif

image: ../art/ks_apple_icon.gif

Extend selection to the line above, to the nearest character boundary at the same horizontal location.

image: ../art/ks_shift.gif image: ../art/ks_option.gif image: ../art/ks_arrow_up.gif

image: ../art/ks_apple_icon.gif

Extend selection to the beginning of the current paragraph, then to the beginning of the next paragraph.

image: ../art/ks_control.gif image: ../art/ks_arrow_up.gif

image: ../art/ks_apple_icon.gif

Move focus to another value or cell within a view, such as a table. See Accessibility Overview for OS X.

image: ../art/ks_arrow_down.gif (down arrow)

image: ../art/ks_shift.gif image: ../art/ks_command.gif image: ../art/ks_arrow_down.gif

image: ../art/ks_apple_icon.gif

Extend selection downward in the next semantic unit, typically the end of the document.

image: ../art/ks_shift.gif image: ../art/ks_arrow_down.gif

image: ../art/ks_apple_icon.gif

Extend selection to the line below, to the nearest character boundary at the same horizontal location.

image: ../art/ks_shift.gif image: ../art/ks_option.gif image: ../art/ks_arrow_down.gif

image: ../art/ks_apple_icon.gif

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).

image: ../art/ks_control.gif image: ../art/ks_arrow_down.gif

image: ../art/ks_apple_icon.gif

Move focus to another value or cell within a view, such as a table. See Accessibility Overview for OS X.


Did this document help you? Yes It's good, but... Not helpful...