Keyboards

A physical keyboard can be an essential input device for entering text, playing games, controlling apps, and more.

iOSiPadOSmacOStvOSvisionOS

A sketch of a keyboard, suggesting keyboard input. The image is overlaid with rectangular and circular grid lines and is tinted purple to subtly reflect the purple in the original six-color Apple logo.

People can connect a physical keyboard to any device except Apple Watch. Mac users tend to use a physical keyboard all the time and iPad users often do. Many games work well with a physical keyboard, and people can prefer using one instead of a virtual keyboard when entering a lot of text.

Keyboard users often appreciate using keyboard shortcuts to speed up their interactions with apps and games. A keyboard shortcut is a combination of a primary key and one or more modifier keys (Control, Option, Shift, and Command) that map to a specific command. A keyboard shortcut in a game — called a key binding — often consists of a single key.

Apple defines standard keyboard shortcuts to work consistently across the system and most apps, helping people transfer their knowledge to new experiences. Some apps define custom keyboard shortcuts for the app-specific commands people use most; most games define custom key bindings that make it quick and efficient to use the keyboard to control the game. For guidance, see Game controls.

Best practices

Support Full Keyboard Access when possible. Available in iOS, iPadOS, macOS, and visionOS, Full Keyboard Access lets people navigate and activate windows, menus, controls, and system features using only the keyboard. To test Full Keyboard Access in your app or game, turn it on in the Accessibility area of the system-supplied Settings app. For developer guidance, see Support Full Keyboard Access in your iOS app and isFullKeyboardAccessEnabled.

Respect standard keyboard shortcuts. While using most apps, people generally expect to rely on the standard keyboard shortcuts that work in other apps and throughout the system. If your app offers a unique action that people perform frequently, prefer creating a custom shortcut for it instead of repurposing a standard one that people associate with a different action. While playing a game, people may expect to use certain standard keyboard shortcuts — such as Command–Q to quit the game — but they also expect to be able to modify each game’s key bindings to fit their personal play style. For guidance, see Game controls.

Standard keyboard shortcuts

In general, don’t repurpose standard keyboard shortcuts for custom actions. People can get confused when the shortcuts they know work differently in your app or game. Only consider redefining a standard shortcut if its action doesn’t make sense in your experience. For example, if your app doesn’t support text editing, it doesn’t need a text-styling command like Italic, so you might repurpose Command–I for an action that has more relevance, like Get Info.

People expect each of the following standard keyboard shortcuts to perform the action listed in the table below.

Primary keyKeyboard shortcutAction
SpaceCommand-SpaceShow or hide the Spotlight search field.
Shift-Command-SpaceVaries.
Option-Command-SpaceShow the Spotlight search results window.
Control-Command-SpaceShow the Special Characters window.
TabShift-TabNavigate through controls in a reverse direction.
Command-TabMove forward to the next most recently used app in a list of open apps.
Shift-Command-TabMove backward through a list of open apps (sorted by recent use).
Control-TabMove focus to the next group of controls in a dialog or the next table (when Tab moves to the next cell).
Control-Shift-TabMove focus to the previous group of controls.
EscEscCancel the current action or process.
EscOption-Command-EscOpen the Force Quit dialog.
EjectControl-Command-EjectQuit all apps (after changes have been saved to open documents) and restart the computer.
Control-Option-Command-EjectQuit all apps (after changes have been saved to open documents) and shut the computer down.
F1Control-F1Toggle full keyboard access on or off.
F2Control-F2Move focus to the menu bar.
F3Control- F3Move focus to the Dock.
F4Control-F4Move focus to the active (or next) window.
Control-Shift-F4Move focus to the previously active window.
F5Control-F5Move focus to the toolbar.
Command-F5Turn VoiceOver on or off.
F6Control-F6Move focus to the first (or next) panel.
Control-Shift-F6Move focus to the previous panel.
F7Control-F7Temporarily override the current keyboard access mode in windows and dialogs.
F8Varies.
F9Varies.
F10Varies.
F11Show desktop.
F12Hide or display Dashboard.
Grave accent (`)Command-Grave accentActivate the next open window in the frontmost app.
Shift-Command-Grave accentActivate the previous open window in the frontmost app.
Option-Command-Grave accentMove focus to the window drawer.
Hyphen (-)Command-HyphenDecrease the size of the selection.
Option-Command-HyphenZoom out when screen zooming is on.
Left bracket ({)Command-Left bracketLeft-align a selection.
Right bracket (})Command-Right bracketRight-align a selection.
Pipe (|)Command-PipeCenter-align a selection.
Colon (:)Command-ColonDisplay the Spelling window.
Semicolon (;)Command-SemicolonFind misspelled words in the document.
Comma (,)Command-CommaOpen the app’s settings window.
Control-Option-Command-CommaDecrease screen contrast.
Period (.)Command-PeriodCancel an operation.
Control-Option-Command-PeriodIncrease screen contrast.
Question mark (?)Command-Question markOpen the app’s Help menu.
Forward slash (/)Option-Command-Forward slashTurn font smoothing on or off.
Equal sign (=)Shift-Command-Equal signIncrease the size of the selection.
Option-Command-Equal signZoom in when screen zooming is on.
3Shift-Command-3Capture the screen to a file.
Control-Shift-Command-3Capture the screen to the Clipboard.
4Shift-Command-4Capture a selection to a file.
Control-Shift-Command-4Capture a selection to the Clipboard.
8Option-Command-8Turn screen zooming on or off.
Control-Option-Command-8Invert the screen colors.
ACommand-ASelect every item in a document or window, or all characters in a text field.
Shift-Command-ADeselect all selections or characters.
BCommand-BBoldface the selected text or toggle boldfaced text on and off.
CCommand-CCopy the selection to the Clipboard.
Shift-Command-CDisplay the Colors window.
Option-Command-CCopy the style of the selected text.
Control-Command-CCopy the formatting settings of the selection and store on the Clipboard.
DOption-Command-DShow or hide the Dock.
Control-Command-DDisplay the definition of the selected word in the Dictionary app.
ECommand-EUse the selection for a find operation.
FCommand-FOpen a Find window.
Option-Command-FJump to the search field control.
Control-Command-FEnter full screen.
GCommand-GFind the next occurrence of the selection.
Shift-Command-GFind the previous occurrence of the selection.
HCommand-HHide the windows of the currently running app.
Option-Command-HHide the windows of all other running apps.
ICommand-IItalicize the selected text or toggle italic text on or off.
Command-IDisplay an Info window.
Option-Command-IDisplay an inspector window.
JCommand-JScroll to a selection.
MCommand-MMinimize the active window to the Dock.
Option-Command-MMinimize all windows of the active app to the Dock.
NCommand-NOpen a new document.
OCommand-ODisplay a dialog for choosing a document to open.
PCommand-PDisplay the Print dialog.
Shift-Command-PDisplay the Page Setup dialog.
QCommand-QQuit the app.
Shift-Command-QLog out the person currently logged in.
Option-Shift-Command-QLog out the person currently logged in without confirmation.
SCommand-SSave a new document or save a version of a document.
Shift-Command-SDuplicate the active document or initiate a Save As.
TCommand-TDisplay the Fonts window.
Option-Command-TShow or hide a toolbar.
UCommand-UUnderline the selected text or turn underlining on or off.
VCommand-VPaste the Clipboard contents at the insertion point.
Shift-Command-VPaste as (Paste as Quotation, for example).
Option-Command-VApply the style of one object to the selection.
Option-Shift-Command-VPaste the Clipboard contents at the insertion point and apply the style of the surrounding text to the inserted object.
Control-Command-VApply formatting settings to the selection.
WCommand-WClose the active window.
Shift-Command-WClose a file and its associated windows.
Option-Command-WClose all windows in the app.
XCommand-XRemove the selection and store on the Clipboard.
ZCommand-ZUndo the previous operation.
Shift-Command-ZRedo (when Undo and Redo are separate commands rather than toggled using Command-Z).
Right arrowCommand-Right arrowChange the keyboard layout to current layout of Roman script.
Shift-Command-Right arrowExtend selection to the next semantic unit, typically the end of the current line.
Shift-Right arrowExtend selection one character to the right.
Option-Shift-Right arrowExtend selection to the end of the current word, then to the end of the next word.
Control-Right arrowMove focus to another value or cell within a view, such as a table.
Left arrowCommand-Left arrowChange the keyboard layout to current layout of system script.
Shift-Command-Left arrowExtend selection to the previous semantic unit, typically the beginning of the current line.
Shift-Left arrowExtend selection one character to the left.
Option-Shift-Left arrowExtend selection to the beginning of the current word, then to the beginning of the previous word.
Control-Left arrowMove focus to another value or cell within a view, such as a table.
Up arrowShift-Command-Up arrowExtend selection upward in the next semantic unit, typically the beginning of the document.
Shift-Up arrowExtend selection to the line above, to the nearest character boundary at the same horizontal location.
Option-Shift-Up arrowExtend selection to the beginning of the current paragraph, then to the beginning of the next paragraph.
Control-Up arrowMove focus to another value or cell within a view, such as a table.
Down arrowShift-Command-Down arrowExtend selection downward in the next semantic unit, typically the end of the document.
Shift-Down arrowExtend selection to the line below, to the nearest character boundary at the same horizontal location.
Option-Shift-Down arrowExtend 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 arrowMove focus to another value or cell within a view, such as a table.

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

Keyboard shortcutAction
Control-SpaceToggle between the current and last input source.
Control-Option-SpaceSwitch to the next input source in the list.
[Modifier key]-Command-SpaceVaries.
Command-Right arrowChange keyboard layout to current layout of Roman script.
Command-Left arrowChange keyboard layout to current layout of system script.

Custom keyboard shortcuts

Define custom keyboard shortcuts for only the most frequently used app-specific commands. People appreciate using keyboard shortcuts for actions they perform frequently, but defining too many new shortcuts can make your app seem difficult to learn.

Use modifier keys in ways that people expect. For example, pressing Command while dragging moves items as a group, and pressing Shift while drag-resizing constrains resizing to the item’s aspect ratio. In addition, holding an arrow key moves the selected item by the smallest app-defined unit of distance until people release the key.

Here are the modifier keys and the symbols that represent them.

Modifier keySymbolRecommended usage
Command
Outline of a stylized clover shape.
Prefer the Command key as the main modifier key in a custom keyboard shortcut.
Shift
Outline of an upward-pointing arrow.
Prefer the Shift key as a secondary modifier that complements a related shortcut.
Option
Line segments that suggest a horizontally transformed Z shape combined with a short horizontal segment aligned with the top of the Z.
Use the Option modifier sparingly for less-common commands or power features.
Control
A shallow, upside-down V shape.
Avoid using the Control key as a modifier. The system uses Control in many systemwide features and shortcuts, like moving focus or capturing screenshots.

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

Avoid adding Shift to a shortcut that uses the upper character of a two-character key. People already understand that they must hold the Shift key to type the upper character of a two-character key, so it’s clearer to simply list the upper character in the shortcut. For example, the keyboard shortcut for Hide Status Bar is Command-Slash, whereas the keyboard shortcut for Help is Command-Question mark, not Shift-Command-Slash.

Let the system localize and mirror your keyboard shortcuts as needed. The system automatically localizes a shortcut’s primary and modifier keys to support the currently connected keyboard; if your app or game switches to a right-to-left layout, the system automatically mirrors the shortcut. For guidance, see Right to left.

Avoid creating a new shortcut by adding a modifier to an existing shortcut for an unrelated command. For example, because people are accustomed to using Command-Z for undoing an action, it would be confusing to use Shift-Command-Z as the shortcut for a command that’s unrelated to undo and redo.

Platform considerations

No additional considerations for iOS, iPadOS, macOS, or tvOS. Not supported in watchOS.

visionOS

In visionOS, an app’s keyboard shortcuts appear in the shortcut interface that displays when people hold the Command key on a connected keyboard. Similar in organization to an app’s menu bar menus on iPad or Mac, the shortcut interface on Apple Vision Pro displays app commands in familiar system-defined menu categories such as File, Edit, and View. Unlike menu bar menus, the shortcut interface displays all relevant categories in one view, listing within each category only available commands that also have shortcuts.

Write descriptive shortcut titles. Because the shortcut interface displays a flat list of all items in each category, submenu titles aren’t available to provide context for their child items. Make sure each shortcut title is descriptive enough to convey its action without the additional context a submenu title might provide. For developer guidance, see discoverabilityTitle.

Recognize that people see an overlay when they use a physical keyboard with your visionOS app or game. When people connect a physical keyboard while using your visionOS app or game, the system displays a virtual keyboard overlay that provides typing completion and other controls.

Resources

Virtual keyboards

Entering data

Pointing devices

Developer documentation

KeyboardShortcut — SwiftUI

Input events — SwiftUI

Handling key presses made on a physical keyboard — UIKit

Mouse, Keyboard, and Trackpad — AppKit

Change log

DateChanges
June 9, 2025Moved game-specific key bindings guidance to the Game controls page.
June 10, 2024Added game-specific guidance and made organizational updates.
June 21, 2023Updated to include guidance for visionOS.