Xcode Keyboard Shortcuts

Complete Xcode keyboard shortcuts reference — 66 shortcuts across 7 categories. Quick reference cheat sheet for macOS.

Xcode is Mac-only, so every binding on this page is written with Cmd, Option and Ctrl as Apple labels them. The shortcuts cluster around one loop — edit, build, run, read the issue, jump to it — and the ones that shave seconds off that loop are worth more than any of the panel toggles.

Build & Run (11)

ShortcutAction
Cmd + BBuild
Cmd + RRun
Ctrl + Cmd + RRun Without Building
Cmd + .Stop
Cmd + UTest
Ctrl + Cmd + UTest Without Building
Cmd + IProfile
Shift + Cmd + BAnalyze
Shift + Cmd + KClean
Option + Shift + Cmd + KClean Build Folder
Cmd + <Edit Scheme

Navigation (10)

ShortcutAction
Shift + Cmd + OOpen Quickly
Cmd + LGo to Line
Ctrl + Cmd + JJump to Definition
Ctrl + Cmd + LeftGo Back
Ctrl + Cmd + RightGo Forward
Ctrl + Cmd + UpJump to Counterpart
Shift + Cmd + JReveal in Project Navigator
Cmd + 'Jump to Next Issue
Cmd + "Jump to Previous Issue
Ctrl + 6Show Document Items

Editor & Panels (11)

ShortcutAction
Cmd + 0Show/Hide Navigator
Cmd + 1Project Navigator
Option + Cmd + 0Show/Hide Inspectors
Shift + Cmd + YShow/Hide Debug Area
Shift + Cmd + LShow Library
Shift + Cmd + CActivate Console
Shift + Cmd + 0Developer Documentation
Cmd + ReturnEditor Only
Ctrl + Option + Cmd + ReturnAssistant Editor
Option + Cmd + ReturnShow Canvas
Option + Cmd + PResume Preview

Editing (14)

ShortcutAction
Cmd + /Comment Selection
Ctrl + IRe-Indent
Cmd + ]Shift Right
Cmd + [Shift Left
Option + Cmd + ]Move Line Down
Option + Cmd + [Move Line Up
Ctrl + SpaceShow Completions
Ctrl + Cmd + EEdit All in Scope
Option + Cmd + /Add Documentation
Cmd + FFind
Option + Cmd + FFind and Replace
Shift + Cmd + FFind in Workspace
Cmd + GFind Next
Cmd + EUse Selection for Find

Code Folding (4)

ShortcutAction
Option + Cmd + LeftFold
Option + Cmd + RightUnfold
Option + Shift + Cmd + LeftFold Methods & Functions
Option + Shift + Cmd + RightUnfold Methods & Functions

Debugging (7)

ShortcutAction
Cmd + \Toggle Breakpoint
Cmd + YActivate/Deactivate Breakpoints
Ctrl + Cmd + YPause/Continue
F6Step Over
F7Step Into
F8Step Out
Cmd + KClear Console

Files & Project (9)

ShortcutAction
Cmd + NNew File
Shift + Cmd + NNew Project
Option + Cmd + NNew Group
Option + Cmd + AAdd Files
Cmd + SSave
Option + Cmd + SSave All
Cmd + ,Settings
Cmd + TNew Tab
Shift + Cmd + 2Devices and Simulators
📄 View Printable Cheat Sheet — Download as PDF or print · 🧩 Combine with other tools

Related Shortcut Pages

VS Code Android Studio Visual Studio Mac IntelliJ IDEA Git

Search 18,500+ shortcuts across 268 platforms

Explore All Platforms Practice Shortcuts
📜 Every shortcut on this page is taken from the official Xcode documentation — developer.apple.com
🔧 Spotted an error or a missing shortcut? Suggest an edit on GitHub — every accepted fix goes live on this page, the API and the CLI.

The build loop

Cmd + B builds, Cmd + R builds and runs, and Cmd + . stops whatever is running. Cmd + U runs the test target; the Ctrl variants — Ctrl + Cmd + R and Ctrl + Cmd + U — skip the build step and reuse the last binary, which is the right choice when you only changed a scheme argument. When a build fails, Cmd + ' jumps to the next issue in the editor and Cmd + " to the previous one, so you can walk through compiler errors without opening the Issue navigator. Shift + Cmd + K cleans, and Option + Shift + Cmd + K cleans the whole build folder, which is the one that actually fixes stale-module problems.

Getting around a large project

Shift + Cmd + O is Open Quickly: type part of a file, type, or symbol name and jump to it, which replaces the Project navigator for anyone who knows what they are looking for. Ctrl + Cmd + J takes you to where the symbol under the cursor is declared, Ctrl + Cmd + Left goes back, and Ctrl + Cmd + Up switches between a file and its counterpart — header and implementation in Objective-C, or a view and its test in Swift projects that follow the convention. Shift + Cmd + J reveals the current file in the navigator when you have lost track of where it lives.

Panels, and the one editing trick worth knowing

Cmd + 0 and Option + Cmd + 0 hide the left navigator and right inspectors, and Shift + Cmd + Y toggles the debug area at the bottom; on a laptop, hiding all three is the difference between a usable editor and a postage stamp. Cmd + Return returns to a single editor after opening the assistant with Ctrl + Option + Cmd + Return. In the editor, Ctrl + Cmd + E is Edit All in Scope: it selects every occurrence of the symbol under the cursor within its scope so a rename is one edit, and Ctrl + I re-indents the selection according to the project settings.

Debugging

Cmd + \ toggles a breakpoint on the current line and Cmd + Y enables or disables all breakpoints at once without removing them, which is how you get a quick clean run without losing your setup. The stepping keys are F6 for step over, F7 step into and F8 step out — a different assignment from the JetBrains and Visual Studio convention — and Cmd + K clears the console.

Frequently asked questions

What is the difference between Cmd + R and Ctrl + Cmd + R?

Cmd + R builds and then runs. Ctrl + Cmd + R runs the existing build without compiling, which is faster when the source has not changed.

How do I open a file by name in Xcode?

Shift + Cmd + O (Open Quickly). It matches partial file names, types and symbols.

Why does Clean not fix my build error?

Shift + Cmd + K cleans the current target only. Option + Shift + Cmd + K cleans the whole build folder, including cached modules.

Where does Xcode list all its shortcuts?

Xcode › Settings › Key Bindings lists every command with its binding and lets you search or change them.

🤖 Ask AI about Xcode shortcuts

Open your assistant with this page preloaded as the source — great for follow-up questions like "which of these work in other apps?"

ChatGPT Claude Perplexity Gemini Grok