Xcode Keyboard Shortcuts: The Complete List for macOS (2026)

In short: Xcode includes well over 150 default keyboard shortcuts across build, editing, navigation, debugging, source control, and window management. This guide organizes every commonly used shortcut into 12 categories, explains how to customize your own key bindings, and answers the most common Xcode shortcut questions.

When you’re deep in a project, reaching for the mouse breaks your flow. Xcode, Apple’s IDE for building macOS, iOS, iPadOS, watchOS, and tvOS apps, ships with a large set of keyboard shortcuts that let you build, run, debug, and navigate code without ever touching the trackpad. Learning them is one of the fastest ways to become a more productive iOS or macOS developer.

Below, shortcuts use these symbols for modifier keys:

  • Cmd = Command (⌘)
  • Ctrl = Control (⌃)
  • Option = Option/Alt (⌥)
  • Shift = Shift (⇧)

Most-Used Xcode Shortcuts

These are the shortcuts you’ll reach for constantly, worth memorizing first.

ActionShortcut
BuildCmd + B
RunCmd + R
TestCmd + U
StopCmd + .
CleanShift + Cmd + K
Open QuicklyShift + Cmd + O
Find in ProjectShift + Cmd + F
Comment SelectionCmd + /
Show Quick HelpCmd + ?
Preferences / SettingsCmd + ,

Build & Run Shortcuts

ActionShortcut
BuildCmd + B
AnalyzeShift + Cmd + B
RunCmd + R
Run Without BuildingCtrl + Cmd + R
TestCmd + U
Test Without BuildingCtrl + Cmd + U
ProfileCmd + I
Profile Without BuildingCtrl + Cmd + I
CleanShift + Cmd + K
Clean Build FolderOption + Shift + Cmd + K
Clear ConsoleCmd + K
StopCmd + .
Select Next SchemeCtrl + Cmd + ]
Select Previous SchemeCtrl + Cmd + [
Edit SchemeCmd + <
Choose DestinationCtrl + Shift + 0

Code Editing Shortcuts

ActionShortcut
Comment SelectionCmd + /
Add DocumentationOption + Cmd + /
Fold Method or BlockOption + Cmd + Left Arrow
Unfold Method or BlockOption + Cmd + Right Arrow
Fold Methods & FunctionsOption + Shift + Cmd + Left Arrow
Unfold Methods & FunctionsOption + Shift + Cmd + Right Arrow
Edit All in ScopeCtrl + Cmd + E
Show CompletionsCtrl + Space
Next CompletionCtrl + .
Previous CompletionCtrl + Shift + .
Accept CompletionTab
Next PlaceholderCtrl + /
Previous PlaceholderCtrl + Shift + /
Move Line UpOption + Cmd + [
Move Line DownOption + Cmd + ]
Indent (Shift Right)Cmd + ]
Outdent (Shift Left)Cmd + [
Show Code Actions (Fix-it)Shift + Cmd + A
Duplicate LineCmd + D

Code Navigation Shortcuts

ActionShortcut
Beginning of LineCmd + Left Arrow
End of LineCmd + Right Arrow
Top of FileCmd + Up Arrow
End of FileCmd + Down Arrow
Previous WordOption + Left Arrow
Next WordOption + Right Arrow
Previous SubwordCtrl + Left Arrow
Next SubwordCtrl + Right Arrow
Go to LineCmd + L
Find in FileCmd + F
Find in Project (Workspace)Shift + Cmd + F
Find and ReplaceOption + Cmd + F
Find NextCmd + G
Find PreviousShift + Cmd + G
Jump to DefinitionCtrl + Cmd + J
Jump to SelectionOption + Cmd + L

File & Project Navigation Shortcuts

ActionShortcut
New FileCmd + N
New ProjectShift + Cmd + N
Open QuicklyShift + Cmd + O
Show Related ItemsCtrl + 1
Go ForwardCtrl + Cmd + Right Arrow
Go BackwardCtrl + Cmd + Left Arrow
SaveCmd + S
Save AllOption + Cmd + S
Close TabShift + Cmd + W
New TabCmd + T

Debugging Shortcuts

ActionShortcut
Next IssueCmd + ‘
Previous IssueCmd + “
Fix Next IssueCtrl + Cmd + ‘
Fix Previous IssueCtrl + Cmd + “
Add Breakpoint at Current LineCmd + \
Activate / Deactivate BreakpointsCmd + Y
Pause / ContinueCtrl + Cmd + Y
Continue to Current LineCtrl + Cmd + C
Step OverF6
Step IntoF7
Step OutF8
Create Symbolic BreakpointOption + Cmd + \

Source Control (Git) Shortcuts

Xcode’s built-in Git integration has its own dedicated shortcuts, worth learning if you commit directly from the IDE instead of the terminal.

ActionShortcut
Show Source Control NavigatorCmd + 2
CommitOption + Cmd + C
PullOption + Cmd + X

Window & Interface Shortcuts

ActionShortcut
Toggle NavigatorCmd + 0
Toggle Utilities (Inspectors)Option + Cmd + 0
Toggle Debug AreaShift + Cmd + Y
Show LibraryShift + Cmd + L
Switch Navigators (Project, Source Control, Symbol, Find, Issue, Test, Debug, Breakpoint, Report)Cmd + 1 through Cmd + 9
Switch InspectorsOption + Cmd + 1 through Option + Cmd + 7
Show Standard EditorCmd + Return
Show Assistant EditorOption + Cmd + Return
Show Version EditorOption + Shift + Cmd + Return
Minimize WindowCmd + M
Enter Full ScreenCtrl + Cmd + F

Selection & Multi-Cursor Editing Shortcuts

ActionShortcut
Select AllCmd + A
Use Selection for FindCmd + E
Select Next Occurrence (multi-cursor style edit)Option + Cmd + E
Select Previous OccurrenceOption + Shift + Cmd + E
Duplicate LineCmd + D

How to Customize Xcode Shortcuts

If a default shortcut clashes with a macOS system shortcut, or you simply prefer a different combination, Xcode lets you rebind almost any command.

  1. Open Xcode in the menu bar and choose Settings (older versions: Preferences).
  2. Click the Key Bindings tab.
  3. Use the search field to find the command you want to change, for example “Build.”
  4. Double-click the key binding field next to that command.
  5. Press your new key combination.
  6. Close Settings. The new shortcut takes effect immediately.

A quick warning worth repeating: avoid overriding key combinations that macOS itself uses system-wide (like Cmd + Space for Spotlight), since macOS will usually intercept those before Xcode ever sees them.

Xcode Shortcuts vs Visual Studio Code Equivalents

If you split time between Xcode and VS Code (common for backend or cross-platform work), here’s how the core commands line up.

ActionXcodeVS Code
BuildCmd + BShift + Cmd + B
RunCmd + RF5
Comment lineCmd + /Cmd + /
Find in fileCmd + FCmd + F
Find in projectShift + Cmd + FShift + Cmd + F
Go to lineCmd + LCtrl + G
Go to definitionCtrl + Cmd + JF12
Command palette / Open quicklyShift + Cmd + OShift + Cmd + P

Download the Xcode Shortcuts PDF

Save this list as a printable cheat sheet so it’s on hand while you code, no need to keep this tab open in the background.

Frequently Asked Questions

What is the Xcode shortcut to build a project?

Cmd + B builds the current project without running it. Use Cmd + R to build and run.

What is the Xcode shortcut to run a project?

Cmd + R builds and runs the active scheme on the selected simulator or device.

How do I hide the debug area in Xcode?

Shift + Cmd + Y toggles the debug area open and closed. It works as a single shortcut for both showing and hiding it.

What is the Xcode shortcut for comment and uncomment?

Cmd + / toggles a line or selected block comment on and off.

How do I find a file quickly in Xcode?

Shift + Cmd + O opens the Open Quickly panel, which lets you fuzzy-search for any file, class, or symbol in your project.

What is the shortcut to clean a build in Xcode?

Shift + Cmd + K runs Clean. Option + Shift + Cmd + K runs Clean Build Folder, which is more thorough and useful when you’re seeing stale build errors.

How do I stop a running app in Xcode?

Cmd + . (period) stops the current build, run, test, or profile action.

Can I change or customize Xcode’s default keyboard shortcuts?

Yes. Go to Xcode > Settings > Key Bindings, search for the command, and double-click its shortcut field to record a new key combination.

What is the shortcut to jump to a function definition in Xcode?

Ctrl + Cmd + J jumps to the definition of the symbol under your cursor.

What is the Xcode shortcut for Quick Help?

Cmd + ? shows Quick Help for the item under the cursor. Ctrl + Cmd + ? shows documentation for selected text.

Conclusion

Xcode’s keyboard shortcuts cover everything from basic file navigation to Git commits and low-level debugging. You don’t need to memorize all of them at once. Start with the “Most-Used” table at the top of this guide, add two or three new shortcuts a week from the category tables, and within a month reaching for the mouse will feel like the slower option.

READ NEXT:

Pratik

Pratik is the founder of Tutorial Tactic and a productivity tools specialist with 15 years of hands-on experience in Google Workspace, Microsoft Office, and software automation. He has published over 1,500 guides on keyboard shortcuts, software commands, how-to tutorials and workflow optimization, helping readers across the US and India work faster with the tools they use every day. Tutorial Tactic was founded in 2021 with one goal: cut through the noise and give readers exactly what they need fast, verified, and beginner-friendly.
Back to top button