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.
| Action | Shortcut |
| Build | Cmd + B |
| Run | Cmd + R |
| Test | Cmd + U |
| Stop | Cmd + . |
| Clean | Shift + Cmd + K |
| Open Quickly | Shift + Cmd + O |
| Find in Project | Shift + Cmd + F |
| Comment Selection | Cmd + / |
| Show Quick Help | Cmd + ? |
| Preferences / Settings | Cmd + , |
Build & Run Shortcuts
| Action | Shortcut |
| Build | Cmd + B |
| Analyze | Shift + Cmd + B |
| Run | Cmd + R |
| Run Without Building | Ctrl + Cmd + R |
| Test | Cmd + U |
| Test Without Building | Ctrl + Cmd + U |
| Profile | Cmd + I |
| Profile Without Building | Ctrl + Cmd + I |
| Clean | Shift + Cmd + K |
| Clean Build Folder | Option + Shift + Cmd + K |
| Clear Console | Cmd + K |
| Stop | Cmd + . |
| Select Next Scheme | Ctrl + Cmd + ] |
| Select Previous Scheme | Ctrl + Cmd + [ |
| Edit Scheme | Cmd + < |
| Choose Destination | Ctrl + Shift + 0 |
Code Editing Shortcuts
| Action | Shortcut |
| Comment Selection | Cmd + / |
| Add Documentation | Option + Cmd + / |
| Fold Method or Block | Option + Cmd + Left Arrow |
| Unfold Method or Block | Option + Cmd + Right Arrow |
| Fold Methods & Functions | Option + Shift + Cmd + Left Arrow |
| Unfold Methods & Functions | Option + Shift + Cmd + Right Arrow |
| Edit All in Scope | Ctrl + Cmd + E |
| Show Completions | Ctrl + Space |
| Next Completion | Ctrl + . |
| Previous Completion | Ctrl + Shift + . |
| Accept Completion | Tab |
| Next Placeholder | Ctrl + / |
| Previous Placeholder | Ctrl + Shift + / |
| Move Line Up | Option + Cmd + [ |
| Move Line Down | Option + Cmd + ] |
| Indent (Shift Right) | Cmd + ] |
| Outdent (Shift Left) | Cmd + [ |
| Show Code Actions (Fix-it) | Shift + Cmd + A |
| Duplicate Line | Cmd + D |
Code Navigation Shortcuts
| Action | Shortcut |
| Beginning of Line | Cmd + Left Arrow |
| End of Line | Cmd + Right Arrow |
| Top of File | Cmd + Up Arrow |
| End of File | Cmd + Down Arrow |
| Previous Word | Option + Left Arrow |
| Next Word | Option + Right Arrow |
| Previous Subword | Ctrl + Left Arrow |
| Next Subword | Ctrl + Right Arrow |
| Go to Line | Cmd + L |
| Find in File | Cmd + F |
| Find in Project (Workspace) | Shift + Cmd + F |
| Find and Replace | Option + Cmd + F |
| Find Next | Cmd + G |
| Find Previous | Shift + Cmd + G |
| Jump to Definition | Ctrl + Cmd + J |
| Jump to Selection | Option + Cmd + L |
File & Project Navigation Shortcuts
| Action | Shortcut |
| New File | Cmd + N |
| New Project | Shift + Cmd + N |
| Open Quickly | Shift + Cmd + O |
| Show Related Items | Ctrl + 1 |
| Go Forward | Ctrl + Cmd + Right Arrow |
| Go Backward | Ctrl + Cmd + Left Arrow |
| Save | Cmd + S |
| Save All | Option + Cmd + S |
| Close Tab | Shift + Cmd + W |
| New Tab | Cmd + T |
Debugging Shortcuts
| Action | Shortcut |
| Next Issue | Cmd + ‘ |
| Previous Issue | Cmd + “ |
| Fix Next Issue | Ctrl + Cmd + ‘ |
| Fix Previous Issue | Ctrl + Cmd + “ |
| Add Breakpoint at Current Line | Cmd + \ |
| Activate / Deactivate Breakpoints | Cmd + Y |
| Pause / Continue | Ctrl + Cmd + Y |
| Continue to Current Line | Ctrl + Cmd + C |
| Step Over | F6 |
| Step Into | F7 |
| Step Out | F8 |
| Create Symbolic Breakpoint | Option + 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.
| Action | Shortcut |
| Show Source Control Navigator | Cmd + 2 |
| Commit | Option + Cmd + C |
| Pull | Option + Cmd + X |
Window & Interface Shortcuts
| Action | Shortcut |
| Toggle Navigator | Cmd + 0 |
| Toggle Utilities (Inspectors) | Option + Cmd + 0 |
| Toggle Debug Area | Shift + Cmd + Y |
| Show Library | Shift + Cmd + L |
| Switch Navigators (Project, Source Control, Symbol, Find, Issue, Test, Debug, Breakpoint, Report) | Cmd + 1 through Cmd + 9 |
| Switch Inspectors | Option + Cmd + 1 through Option + Cmd + 7 |
| Show Standard Editor | Cmd + Return |
| Show Assistant Editor | Option + Cmd + Return |
| Show Version Editor | Option + Shift + Cmd + Return |
| Minimize Window | Cmd + M |
| Enter Full Screen | Ctrl + Cmd + F |
Selection & Multi-Cursor Editing Shortcuts
| Action | Shortcut |
| Select All | Cmd + A |
| Use Selection for Find | Cmd + E |
| Select Next Occurrence (multi-cursor style edit) | Option + Cmd + E |
| Select Previous Occurrence | Option + Shift + Cmd + E |
| Duplicate Line | Cmd + 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.
- Open Xcode in the menu bar and choose Settings (older versions: Preferences).
- Click the Key Bindings tab.
- Use the search field to find the command you want to change, for example “Build.”
- Double-click the key binding field next to that command.
- Press your new key combination.
- 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.
| Action | Xcode | VS Code |
| Build | Cmd + B | Shift + Cmd + B |
| Run | Cmd + R | F5 |
| Comment line | Cmd + / | Cmd + / |
| Find in file | Cmd + F | Cmd + F |
| Find in project | Shift + Cmd + F | Shift + Cmd + F |
| Go to line | Cmd + L | Ctrl + G |
| Go to definition | Ctrl + Cmd + J | F12 |
| Command palette / Open quickly | Shift + Cmd + O | Shift + 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:





