Xcode keyboard shortcuts for Mac

Xcode keyboard shortcuts for the Mac, limited to the keys Apple prints in its own text: the Xcode 27 documentation, Apple's developer tutorials, recent release notes and two WWDC session transcripts. Apple publishes no shortcut list for current Xcode, so commands such as Build, Run and the debugger step keys are absent. Every command shows its key in the menus, and the full editable list is in Xcode's Settings (the Key Bindings pane, called Shortcuts in the Xcode 27 documentation).

71 shortcuts in 6 sections. Checked row by row against Apple Developer Documentation on . Edited by Jay.

Building, running and testing 5

Holding Control turns the scheme action button in the toolbar into its “without building” variant for one use.

ActionMac
Run Without BuildingLaunches the last build again, which saves the wait when nothing in the code changed.Ctrl+Cmd+R
TestRuns every test in the project and marks each one with a green check or a red x.Cmd+U
Test Without BuildingStarts the tests again from the existing build, useful when the code has not changed.Ctrl+Cmd+U
Test AgainRepeats the previous test run from wherever you are, with no need to find its test diamond.Ctrl+Option+Cmd+G
ProfileSame as Product > Profile: begins a performance analysis of the app in Instruments.Cmd+I

Finding and navigating 15

Apple's Xcode documentation prints few key combinations and sends readers to the menu bar, where each command shows its shortcut.

ActionMac
Open QuicklyType part of a file or symbol name, then pick from the matches the dialog lists.Shift+Cmd+O
FindShows the Find bar and its controls above the file open in the source editor.Cmd+F
Show the Find navigatorSearches the whole project; the bar at the bottom narrows the results.Shift+Cmd+F
Use Selection for FindSends the selected text to the search field and leaves the clipboard as it was.Cmd+E
Reveal in Project NavigatorSelects the open file in the navigator, handy for creating a new file next to it.Shift+Cmd+J
Jump to DefinitionThe default since Xcode 15; Navigation settings can give the click another action.Cmd+Click
Show Quick HelpOpens a pop-over with the documentation of the symbol, including summaries from your own comments.Option+Click
Show Quick Help inspectorLists the documentation parts of the selected symbol, such as its Throws section.Option+Cmd+3
Show the Test navigatorLists every test in the project in the navigator area.Cmd+6
Show the Report navigatorIts coverage report breaks the results down file by file and function by function.Cmd+9
Open the OrganizerThe Organizer window gathers analytics about the released versions of an app.Option+Shift+Cmd+O
Show Quick ActionsFinds any Xcode command from a few plain words, so less-used ones need no menu hunting.Shift+Cmd+A
Open result in a split editorIn Open Quickly, shows the chosen file beside the one that is already open.Option+Return
Show the coding assistantOpens the conversation sidebar, where New Conversation offers the enabled agents and chat models.Cmd+0
Show the coding tools popoverThe popover takes a typed prompt or offers buttons such as Explain; no selection is needed.Option+Cmd+0

Tabs, canvas and project files 15

ActionMac
Show or hide the canvasToggles the preview canvas next to the source editor.Option+Cmd+Return
Resume PreviewDoes the same as clicking the resume button of a preview that has stopped updating.Option+Cmd+P
Show LibraryOffers SwiftUI views, colors and images to insert; Esc closes it again.Shift+Cmd+L
SettingsIts Intelligence pane is where the coding model is chosen.Cmd+,
Open a file in a new tabNavigation settings decide whether the tab that appears is pinned or unpinned.Option+Click
Close all other tabsClick the close button of the one tab you want to keep.Option+Click
Open the contextual menuOn a token in the editor it lists the commands that Code Actions used to hold.Ctrl+Click
Scroll or zoom the canvas itselfScroll and zoom input goes to the canvas while Command is held; a toggle in Editor > Canvas turns this off.Cmd+Scroll
Open the structured editing popoverClick an element in the preview; the popover includes Show SwiftUI Inspector.Ctrl+Cmd+Click
Simulate a pinch gestureStands in for a two-finger pinch on the preview shown in the canvas.Option+Drag
Copy an item in the navigatorGives a new file the format of an existing one without copy and paste.Option+Drag
Select several filesIn the Project navigator, each click adds another file to the selection.Cmd+Click
Collapse sibling resultsClick the disclosure arrow of one file in the Find navigator to fold the matches of every file.Cmd+Click
Delete selected file or folderXcode then asks how the selected items should be removed from the project.Delete
Reset a build settingSelect the modified setting, shown in bold, at the level where it was overridden.Delete

Editing code 20

The completion key can be reassigned; Apple's Xcode 27 documentation gives the place as Xcode > Settings > Shortcuts.

ActionMac
Jump to Next PlaceholderMoves to the following argument placeholder that code completion or a snippet inserted.Tab
Jump to Previous PlaceholderGoes back one placeholder in the inserted method call or snippet.Shift+Tab
Accept predicted codeTakes the inline prediction that Xcode offers while you type in a Swift file.Tab
Accept the full predictionHolding Option expands a predictive completion to its entire length before you take it.Option+Tab
Insert selected completionAdds the highlighted item of the completion list to the code; a double-click does the same.Return
Complete with all argumentsChoose a completion with Option held to fill in every argument of the call.Option+Return
Show CompletionsNeeded when completion is set to On Demand; Esc does the same job while typing.Ctrl+Space
Show or hide completionsDismisses the suggestion list while you type, or brings it back.Esc
Move through completion listXcode describes the highlighted item underneath the list.UporDown
Step through issues in a popoverApplies when one line carries several issues; Esc closes the popover.UporDown
Edit All in ScopeSelect a symbol first; it and every other use of it in the open file are renamed together.Ctrl+Cmd+E
Format to Multiple LinesSplits code over several lines; Apple added the command to Editor > Structure in Xcode 15.Ctrl+M
Add a cursorEach click places another insertion point, so one edit lands in several places at once.Ctrl+Shift+Click
Add cursors at matching textWith some text selected, finds the same text elsewhere and puts a cursor there for multi-cursor editing.Option+Cmd+E
Move by wordOption+Arrow keys
Move by subwordCtrl+Arrow keys
Move to line start or endDoes what Home and End do on keyboards that have those keys.Cmd+LeftorCmd+Right
Emacs-style cursor keysPart of the native macOS text editing commands that the source editor supports.Ctrl+AorCtrl+EorCtrl+PorCtrl+N
Move Line UpOption+Cmd+[
Move Line DownOption+Cmd+]

String Catalog editor 4

ActionMac
Move up one rowKeeps the focus in the same column of the catalog.Cmd+Up
Move down one rowEither key goes to the row below without leaving the column.Cmd+DownorReturn
Move sideways through fieldsBoth move horizontally, where the Command keys of this editor move vertically.TaborShift+Tab
Type a newline or tabPlain Return and Tab move the focus on to the following text field instead.Option+ReturnorOption+Tab

Metal acceleration structure viewer 12

Apple's table also offers the Up and Down arrows as alternatives to W and S for zooming, while another row of the same table assigns them to panning.

ActionMac
Zoom inCentres the zoom on the middle of the scene view rather than on the pointer.W
Zoom outThe counterpart of W, also centred on the viewport.S
Pan leftAorLeft
Pan rightDorRight
Pan up or downUporDown
Zoom at the pointerUp moves closer and Down moves away, centred where the pointer is.Option+UporOption+Down
Rotate the cameraWith the Orbit camera the same drag circles the primitive under the pointer.Drag
Select in the scene viewWhat gets picked depends on the selection mode that is active.Ctrl+Click
Select a primitive structureCtrl+Shift+Click
Select the geometryCtrl+Option+Click
Select a primitiveAlso reveals that primitive in the structure outline on the left.Ctrl+Option+Cmd+Click
Select an instanceCtrl+Cmd+Click

Notes

What Apple documents and what it leaves to the app

Apple publishes no keyboard shortcut list for current Xcode. Its documentation says that most commands can be performed from the menus in the menu bar and tells readers to look at the menu items for the keys. That is why Build, Run, Stop, Clean Build Folder, most of the navigator number keys and the debugger step keys are not in the tables: no current Apple text states them. Read them off the Product, View and Debug menus, or search for a command in the Settings window, which Cmd + , opens.

Running and testing without a rebuild

Cmd + U runs the tests of the project. The Control variants skip the build step and start from the last build: Ctrl + Cmd + R runs the app again and Ctrl + Cmd + U runs the tests again, which helps when a crash or a failing test has to be walked through several times with no code change in between. Ctrl + Option + Cmd + G repeats the previous test run from any file, and Cmd + I starts a profiling run in Instruments.

Getting around a large project

Shift + Cmd + O is Open Quickly: type part of a file or symbol name and jump to it; pressing Option + Return on a result opens it in a split next to the current file. Cmd + Click on a token jumps to its definition, the default since Xcode 15, and Option + Click shows Quick Help for it. Shift + Cmd + J finds the open file in the Project navigator, and Shift + Cmd + A opens Quick Actions, a search over Xcode's commands for everything that has no key you remember.

Completion and multiple cursors

Tab accepts the inline prediction and Option + Tab the whole of a longer one; in the completion list, Return inserts the highlighted item and Option + Return inserts it with all of its arguments. Ctrl + Space or Esc asks for completion when it is set to On Demand. For repeated edits, Ctrl + Shift + Click adds a cursor at each place you click, Ctrl + Cmd + E renames a symbol throughout the current file, and Ctrl + M spreads code over several lines.

The coding assistant keys in Xcode 27

Apple's Xcode 27 documentation prints Cmd + 0 for the Coding Assistant and its conversation sidebar, and Option + Cmd + 0 for the coding tools popover in the source editor. Older shortcut lists give those two keys to showing and hiding the navigator and the inspectors, so check the View menu of the Xcode version you run before relying on either meaning.

Questions

Where does Xcode list all its shortcuts?

In the Settings window, which Cmd + , opens. The pane is known as Key Bindings and is called Shortcuts in Apple's Xcode 27 documentation; it lists the commands with their keys and lets you change them. Each menu item also shows its key.

Why are Build, Run and the debugger step keys not on this page?

The page only lists keys that Apple states in its own current text, and Apple's Xcode documentation does not print those; it refers readers to the menu items instead. Look at the Product and Debug menus in Xcode for them.

What is the difference between Run and Run Without Building?

Run builds the app first and then launches it. Ctrl + Cmd + R launches the existing build without compiling, which is quicker when the source has not changed.

How do I open a file by name in Xcode?

Shift + Cmd + O (Open Quickly). Type part of a file name or symbol name and choose from the matches.

Which key brings up code completion when Xcode does not offer it by itself?

Ctrl + Space, or Esc while typing. This is the way to ask for suggestions when completion is set to On Demand in Xcode's settings.

Which Xcode version do the keys on this page come from?

The documentation pages are the current edition for Xcode 27. The tutorial pages carry no version, each release-notes row names its release (Xcode 15, 16, 26 or 27), and the two WWDC session transcripts describe Xcode 16 (2024) and Xcode 15 (2023).

Sources and checks

19 more source pages

Every row on this page was matched to a line in the documentation above on . A binding that could not be found there is not listed.

47 rows from the earlier version of this page were removed in that check: duplicates, and bindings the documentation does not list or lists differently.

Found a wrong or missing key? Tell us and it gets checked against the source. How we verify describes the process and its limits.