Xcode keyboard shortcuts for Mac
59 shortcuts · Updated
These are the default Xcode keyboard shortcuts on macOS, based on Apple's official documentation. Xcode leans hard on modifier-heavy combos - Cmd runs and builds, Cmd Shift jumps around the project, and Ctrl Cmd moves through code history. Every binding here can be inspected or remapped in Xcode Settings under Key Bindings.
Nothing matches - try fewer letters, or an action word like "close" or "split".
Or stop looking them up. Super Shortcuts puts the Xcode commands you actually use one hyper key away: hold it, see every command for the app you're in, release a key to run it. No memorizing - the cheat sheet is the shortcut.
Get Super ShortcutsBuild, run & test9
| Shortcut | Action |
|---|---|
| Command R⌘R | Build and run the app |
| Command B⌘B | Build without running |
| Command U⌘U | Run the tests |
| Command .⌘. | Stop the running app |
| Command Shift K⌘⇧K | Clean the build folder |
| Command Shift B⌘⇧B | Analyze the code for issues |
| Command I⌘I | Profile the app in Instruments |
| Control Command R⌃⌘R | Run again without rebuilding |
| Command <⌘< | Edit the current scheme |
Navigation10
| Shortcut | Action |
|---|---|
| Command Shift O⌘⇧O | Open Quickly - jump to any file or symbol by name |
| Control Command J⌃⌘J | Jump to the definition of the selected symbol |
| Control Command Left Arrow⌃⌘← | Go back to the previous file |
| Control Command Right Arrow⌃⌘→ | Go forward |
| Control Command Up Arrow⌃⌘↑ | Jump to the counterpart file (header, source, or tests) |
| Command L⌘L | Go to a specific line |
| Command Shift J⌘⇧J | Reveal the current file in the Project navigator |
| Command '⌘' | Jump to the next issue |
| Command "⌘" | Jump to the previous issue |
| Command J⌘J | Move keyboard focus to an editor |
Editing12
| Shortcut | Action |
|---|---|
| Command /⌘/ | Toggle line comment |
| Control I⌃I | Re-indent the selection |
| Command ]⌘] | Shift the line right |
| Command [⌘[ | Shift the line left |
| Command Option [⌘⌥[ | Move the line up |
| Command Option ]⌘⌥] | Move the line down |
| Control Command E⌃⌘E | Edit all occurrences of the symbol in scope |
| Control Space⌃Space | Show code completion |
| Control Shift Click⌃⇧Click | Add an extra cursor where you click |
| Command Option Left Arrow⌘⌥← | Fold the current block |
| Command Option Right Arrow⌘⌥→ | Unfold the current block |
| Command Option Shift Left Arrow⌘⌥⇧← | Fold all methods and functions |
Navigators & panels6
| Shortcut | Action |
|---|---|
| Command 0⌘0 | Show or hide the Navigator sidebar |
| Command 1⌘1 | Show the Project navigator (Cmd 2-9 select the other navigators) |
| Command Option 0⌘⌥0 | Show or hide the Inspectors sidebar |
| Command Shift Y⌘⇧Y | Show or hide the debug area |
| Command Shift L⌘⇧L | Show the Library (snippets, views, modifiers) |
| Command Option J⌘⌥J | Filter in the Navigator (focus its search field) |
Assistant editor & canvas4
| Shortcut | Action |
|---|---|
| Command Return⌘↩ | Show the editor only (hide assistant and canvas) |
| Control Option Command Return⌃⌥⌘↩ | Show the Assistant editor |
| Command Option Return⌘⌥↩ | Show or hide the SwiftUI canvas |
| Command Option P⌘⌥P | Refresh the SwiftUI preview |
Debugging8
| Shortcut | Action |
|---|---|
| Command \⌘\ | Toggle a breakpoint on the current line |
| Command Y⌘Y | Activate or deactivate all breakpoints |
| F6F6 | Step over |
| F7F7 | Step into |
| F8F8 | Step out |
| Control Command Y⌃⌘Y | Pause or continue execution |
| Command K⌘K | Clear the console |
| Command Shift C⌘⇧C | Move focus to the console |
Files, tabs & windows8
| Shortcut | Action |
|---|---|
| Command N⌘N | New file |
| Command Shift N⌘⇧N | New project |
| Command T⌘T | New tab |
| Command Shift T⌘⇧T | New window |
| Command W⌘W | Close the current tab |
| Command }⌘} | Select the next tab |
| Command {⌘{ | Select the previous tab |
| Command ,⌘, | Open Xcode Settings |
Help & documentation2
| Shortcut | Action |
|---|---|
| Command Shift 0⌘⇧0 | Open the developer documentation window |
| Option Click⌥Click | Show Quick Help for the symbol you click |
Curated from the official Apple's Xcode gestures and keyboard shortcuts documentation. Defaults only - shortcuts you've remapped will differ.
Frequently asked questions
How do I see or customize keyboard shortcuts in Xcode?
Open Xcode Settings with ⌘, and go to the Key Bindings tab. It lists every command with its binding, is searchable, and lets you double-click any row to assign your own combination - Xcode flags conflicts for you.
What is the most important Xcode shortcut to learn first?
Open Quickly, ⌘⇧O. It jumps to any file, type, or function in your project by fuzzy name match, which replaces most clicking around the Project navigator. Pair it with ⌘R (run) and ⌘⇧K (clean) and you cover the core loop.
How do I jump to a symbol's definition in Xcode?
Put the cursor on the symbol and press ⌃⌘J (Navigate → Jump to Definition), or hold ⌘ and click the symbol to get a jump menu. ⌃⌘← takes you back to where you were.