Xcode keyboard shortcuts worth learning first
Learn the build loop first: Command-B (⌘B) builds, Command-R runs, Command-period stops and Command-U runs your tests. Then learn Open Quickly, Shift-Command-O, which opens any file or symbol by name, and Command-1 to Command-9, which switch between the navigators on the left. The rest can come a few at a time, and you can change any of them in Xcode > Settings > Key Bindings.
The shortcuts below were checked against the key bindings that ship inside Xcode 26.3. Most have been the same for years; the navigator numbers have moved between versions, so if one lands somewhere unexpected, check View > Navigators.
The build loop
These are the keys you press dozens of times a day, so they repay learning before anything else.
| Shortcut | Command |
|---|---|
| ⌘B | Build |
| ⌘R | Run |
| ⌘. | Stop |
| ⌘U | Test |
| ⌃⌘R | Run Without Building |
| ⇧⌘K | Clean Build Folder |
| ⌘I | Profile |
| ⌘< | Edit Scheme |
Two notes. Run Without Building launches the last build again, which saves time when you only want to see the app once more. And Edit Scheme is Command with the less-than sign, which on a US keyboard means Shift-Command-comma.
Getting around a project
Most time in Xcode goes on finding the right file and the right line. These keys do that without the mouse:
- Shift-Command-O, Open Quickly. Type part of a file, type or function name and press Return. It is the fastest way to any file in the project.
- Shift-Command-J, Reveal in Project Navigator. Shows where the file you are editing sits in the project.
- Control-Command-J, Jump to Definition. Goes to where the symbol under the cursor is defined.
- Control-Command-Left Arrow and Control-Command-Right Arrow. Back and forward through the places you have been, like a browser.
- Control-6, Show Document Items. Opens the list of types and functions in the current file.
- Command-L, Jump to. Type a line number and press Return.
- Shift-Command-F, Find in Workspace. Searches every file in the project.
One more needs no keyboard shortcut at all: hold Option and click a symbol to see its Quick Help, the short documentation for it.
The navigators, Command-1 to Command-9
The navigator area on the left of the window has a navigator for each of Command-1 to Command-9. In Xcode 26.3:
| Shortcut | Navigator |
|---|---|
| ⌘1 | Project |
| ⌘2 | Source Control |
| ⌘3 | Bookmarks |
| ⌘4 | Find |
| ⌘5 | Issues |
| ⌘6 | Tests |
| ⌘7 | Debug |
| ⌘8 | Breakpoints |
| ⌘9 | Reports |
After Command-1, learn Command-4 and Command-5: search results, and the list of build errors and warnings.
A few layout keys go with them. Shift-Command-Y shows or hides the debug area at the bottom, and Shift-Command-C jumps to its console. Command-Return shows the editor on its own, Control-Option-Command-Return adds the assistant editor beside it, and Option-Command-Return shows the canvas for SwiftUI previews. When a preview stops updating, Option-Command-P refreshes the canvas.
Editing keys that save the most time
| Shortcut | Command |
|---|---|
| ⌘/ | Comment Selection |
| ⌃I | Re-Indent |
| ⌥⌘[ / ⌥⌘] | Move Line Up / Down |
| ⌃⌘E | Edit All in Scope |
| ⌃Space | Show Completions |
| ⌘\ | Create Breakpoint at Current Line |
| ⇧⌘L | Show Library |
Edit All in Scope is the one people wish they had learned sooner: put the cursor in a variable name, press Control-Command-E, and every use of it in that scope is selected, so one edit renames them all.
If Control-Space switches your keyboard language instead of showing completions, macOS is using it to change input sources. You can turn that off in System Settings > Keyboard > Keyboard Shortcuts > Input Sources.
The debugger uses the function keys: F6 steps over, F7 steps into, F8 steps out, and Control-Command-Y pauses or continues. On a MacBook those F keys control the Mac first (Do Not Disturb and media playback on recent models), so hold fn or the Globe key with them, or use the buttons on the debug bar. Function keys on a MacBook explains how to make the top row send F keys by default.
Changing a shortcut, and remembering what you changed
Open Xcode > Settings (Command-comma) and choose Key Bindings. Search for a command by name, edit its Key column, and press the new combination. Xcode’s menus show the shortcut you set, so the menu bar stays a reliable reference.
Your changes are saved as a key bindings file in ~/Library/Developer/Xcode/UserData/KeyBindings. That is the folder to copy if you want the same keys on another Mac.
The trouble with custom bindings is that nothing outside Xcode knows about them. Printed cheat sheets and online lists show the defaults, so after a few changes they are wrong in exactly the places you care about. Typebar fixes that on screen: it reads your own Xcode key bindings from their settings file, alongside a hand-made Xcode pack for shortcuts the menus leave out. Hold Command, Option, Control or Shift for a moment in Xcode and the on-screen keyboard relabels each key with what it does there. The Cheatsheet List is searchable, and it can show which keys Xcode leaves free, which helps before you bind something new. Which keys does an app leave free? covers picking one.
If you record Swift tutorials, the keystroke pill names each shortcut with its name from Xcode’s menus as you press it, so viewers see “⌘B Build” rather than a key they have to guess. Making a coding screencast where viewers can follow every shortcut has the rest of that setup, and VS Code on a Mac covers the same ground for the other editor many Swift developers keep open.
Typebar is $9 once, and free for 24 hours.
Questions
What is the shortcut for Open Quickly in Xcode?
Shift-Command-O. Type part of a file, type or function name and press Return.
How do I show and hide the debug area in Xcode?
Shift-Command-Y. Shift-Command-C opens the debug area and puts the cursor in the console.
Where does Xcode keep custom key bindings?
In ~/Library/Developer/Xcode/UserData/KeyBindings. You change them in Xcode > Settings > Key Bindings.
Why does Control-Space not show code completions?
macOS may be using Control-Space to switch input sources. Turn that shortcut off in System Settings > Keyboard > Keyboard Shortcuts > Input Sources, or pick another key for Show Completions in Xcode’s Key Bindings settings.