Super Shortcuts

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.

59 shortcuts

Build, run & test9

ShortcutAction
Command RBuild and run the app
Command BBuild without running
Command URun the tests
Command .Stop the running app
Command Shift KClean the build folder
Command Shift BAnalyze the code for issues
Command IProfile the app in Instruments
Control Command RRun again without rebuilding
Command <Edit the current scheme

Navigation10

ShortcutAction
Command Shift OOpen Quickly - jump to any file or symbol by name
Control Command JJump to the definition of the selected symbol
Control Command Left ArrowGo back to the previous file
Control Command Right ArrowGo forward
Control Command Up ArrowJump to the counterpart file (header, source, or tests)
Command LGo to a specific line
Command Shift JReveal the current file in the Project navigator
Command 'Jump to the next issue
Command "Jump to the previous issue
Command JMove keyboard focus to an editor

Editing12

ShortcutAction
Command /Toggle line comment
Control IRe-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 EEdit all occurrences of the symbol in scope
Control SpaceShow code completion
Control Shift ClickAdd an extra cursor where you click
Command Option Left ArrowFold the current block
Command Option Right ArrowUnfold the current block
Command Option Shift Left ArrowFold all methods and functions

Navigators & panels6

ShortcutAction
Command 0Show or hide the Navigator sidebar
Command 1Show the Project navigator (Cmd 2-9 select the other navigators)
Command Option 0Show or hide the Inspectors sidebar
Command Shift YShow or hide the debug area
Command Shift LShow the Library (snippets, views, modifiers)
Command Option JFilter in the Navigator (focus its search field)

Assistant editor & canvas4

ShortcutAction
Command ReturnShow the editor only (hide assistant and canvas)
Control Option Command ReturnShow the Assistant editor
Command Option ReturnShow or hide the SwiftUI canvas
Command Option PRefresh the SwiftUI preview

Debugging8

ShortcutAction
Command \Toggle a breakpoint on the current line
Command YActivate or deactivate all breakpoints
F6Step over
F7Step into
F8Step out
Control Command YPause or continue execution
Command KClear the console
Command Shift CMove focus to the console

Files, tabs & windows8

ShortcutAction
Command NNew file
Command Shift NNew project
Command TNew tab
Command Shift TNew window
Command WClose the current tab
Command }Select the next tab
Command {Select the previous tab
Command ,Open Xcode Settings

Help & documentation2

ShortcutAction
Command Shift 0Open the developer documentation window
Option ClickShow 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.

More Mac shortcut guides