Xcode

⌘ (Command) ⌃ (Control) ⌥ (Option) ⇧ (Shift)

MacOS-Shortcuts

https://developer.apple.com/library/content/documentation/IDEs/Conceptual/xcode_help-command_shortcuts/Introduction/Introduction.html#//apple_ref/doc/uid/TP40010560-CH1-SW1

About Xcode Gestures and Keyboard Shortcuts

关于Xcode手势和键盘快捷键

You can perform many Xcode operations and commands with gestures or keyboard shortcuts.

Keyboard shortcuts are established through key bindings, which you can modify in the Key Bindings Preferences pane.

At a Glance

Using gestures and keyboard shortcuts can simplify and enhance your experience using Xcode. Some gestures and many shortcuts are configurable, allowing you to customize Xcode to your personal preferences.

Multi-Touch Gesture Highlights

Besides the common Multi-Touch gestures, three are particularly applicable within Xcode:

Three-finger swipe: up or down in the source editor, to switch between a source file (.m) and the associated header (.h) file. Two-finger tap: in a main user interface element or area to open a contextual menu for that element or area, or on an object in Interface Builder to open the object’s connections dialog. Two-finger swipe: up/down or left/right, to scroll vertically or horizontally, respectively.

File Navigation Is Configurable

In the General preferences pane, Xcode provides navigation pop-up menus that help you to customize what happens when you navigate to and select a file in the project navigator or jump bar.

For simple navigation (clicking or choosing a file), two choices are available:

Uses Primary Editor: Opens the file in the primary editor pane of the window and tab already open. Uses Focused Editor: Opens the file in the editor pane with the current focus. For optional navigation (Option-clicking or Option-choosing a file), four choices are available:

Uses Single Assistant Editor: Opens the file in an Assistant editor pane. Uses Separate Assistant Editor: Opens the file in a new Assistant editor pane. Uses Separate Tab: Opens the file in a new tab. If the file is already open in another tab, that tab receives focus. Uses Separate Window: Opens the file in a new window. If the file is already open in a separate window, that window receives focus. For double-click navigation (double-clicking a file in the project navigator), two choices are available:

Uses Separate Tab: Opens the file in a new tab. If the file is already open in another tab, that tab receives focus. (Same behavior as for optional navigation.) Uses Separate Window: Opens the file in a new window. If the file is already open in a separate window, that window receives focus. (Same behavior as for optional navigation.) For Option-Shift navigation (Option-Shift-click or Option-Shift-choose a file), Xcode displays a graphical navigation chooser showing the current layout. The chooser prompts you to open the file in any open editor pane in any window and tab, or to open the file in a new editor pane, window, or tab.

How to Use This Document

The rest of this document lists keyboard shortcuts available to you while using Xcode.

The tables use the following symbols to represent the modifier keys used in conjunction with a primary key to form a shortcut (these symbols are the same ones displayed in Xcode menus)

This document consists of three sections, each with tables of commands and shortcuts presented in a particular order:

Last updated