- According to the official PDF translation: Https://www.jetbrains.com/idea/docs/IntelliJIDEA_ReferenceCard_Mac.pdf
- In IntelliJ idea there are two Mac versions of the shortcut keys, one called: Mac OS X, one called: Mac OS X 10.5+
- Currently used: Mac OS X 10.5+
- There are two sets of reasons: https://intellij-support.jetbrains.com/hc/en-us/community/posts/206159109-Updated-Mac-OS-X-keymap-Feedback-needed
It is recommended that you cancel or change the shortcut keys in your MAC system that conflict with IntelliJ idea, and do not recommend changing the default shortcut key for IntelliJ.
Description of Mac keyboard symbols and modifier keys
?
Command
?
Shift
?
Option
?
Control
??
Return/enter
?
Delete
?
Forward Delete key (Fn+delete)
↑
Up ARROW
↓
Down ARROW
←
Left Arrow
→
Right Arrow
?
Page Up (fn+↑)
?
Page Down (fn+↓)
Home
Fn +←
End
Fn +→
?
Right tab (Tab key)
?
Left tab (SHIFT+TAB)
?
Escape (ESC)
First, Editing (edit)
Control + Space
Basic code completion (complete any class, method, variable)
Control + Shift + Space
Smart Code Completion (Filter method list and expected types of variables)
Command + Shift + Enter
Auto-end code, automatically add semicolon at end of line
Command + P
Display parameter information for a method
Control + J
Quickly view documents
Shift + F1
View external documents (on some code triggers open browser display related documents)
Command + 鼠标放在代码上
Display Code Summary information
Command + F1
Display specific description information at error or warning
Command + N, Control + Enter, Control + N
Generate code (getter, setter, constructor, hashcode/equals,tostring)
Control + O
overriding methods (overriding parent class methods)
Control + I
Implementation method (implements the method in the interface)
Command + Option + T
Surround the code (using the IF: else, try: Catch, for, synchronized, etc. surround the selected code)
Command + /
Comment/Uncomment and line comment
Command + Option + /
Commenting/canceling comments and block annotations
Option + 方向键上
Continuous selection of code blocks
Option + 方向键下
Reduce the code block currently selected
Control + Shift + Q
Display contextual information
Option + Enter
Show intent actions and quick fix codes
Command + Option + L
Formatting code
Control + Option + O
Optimize import
Control + Option + I
Auto Indent Line
Tab / Shift + Tab
Indent code/anti-indent code
Command + X
Cuts the current row or selected block to the Clipboard
Command + C
Copy the current line or selected block to the Clipboard
Command + V
Paste from clipboard
Command + Shift + V
Paste from the nearest buffer
Command + D
Copy the current row or selected block
Command + Delete
Delete the row of the current row or selected block
Control + Shift + J
Intelligently stitching code into a single line
Command + Enter
Smart Split stitching Lines
Shift + Enter
Start a new line
Command + Shift + U
Case switching
Command + Shift + ] / Command + Shift + [
Select until code block ends/starts
Option + Fn + Delete
Delete to the end of a word
Option + Delete
Delete to the beginning of a word
Command + 加号 / Command + 减号
Expand/Collapse Code blocks
Command + Shift + 加号
Expand so the code block
Command + Shift + 减号
Collapse All code blocks
Command + W
Close the Active editor tab
Second, search/replace (query/replace)
Double Shift
Check anything.
Command + F
Find in Files
Command + G
Find mode, look down
Command + Shift + G
Find mode, look up
Command + R
In-file replacement
Command + Shift + F
Global lookup (depending on path)
Command + Shift + R
Global substitution (based on path)
Command + Shift + S
Query structure (Ultimate Edition version is dedicated, need to be set in Keymap)
Command + Shift + M
Replacement structure (Ultimate Edition version, need to be set in Keymap)
Iii. usage search (using queries)
Option + F7 / Command + F7
Find usages in files/find usages in a class
Command + Shift + F7
The usage highlighted in the file
Command + Option + F7
Display usage
Iv. Compile and run (compiling and running)
Command + F9
Compiling project
Command + Shift + F9
Compiling a selected file, package, or module
Control + Option + R
Pop-up Run's selectable menu
Control + Option + D
Pop-up Debug selectable menu
Control + R
Run
Control + D
Debugging
Control + Shift + R, Control + Shift + D
To run the context environment configuration from the editor
Five, debugging (commissioning)
F8
Enter next, if the current line breakpoint is a method, do not enter the current method body
F7
In the next step, if the current line breakpoint is a method, enter the current method body, and if the method body has a method, it will not enter the inline method
Shift + F7
Smart step in, there are multiple method calls on the line of the breakpoint, which will pop into which method
Shift + F8
Jump
Option + F9
Run to the cursor, if there are other breakpoints in front of the cursor to enter the breakpoint
Option + F8
Evaluate an expression (you can change the value of the variable to take effect)
Command + Option + R
The recovery program runs and stops at the next breakpoint if the code below the breakpoint has a breakpoint
Command + F8
Toggle Breakpoint (If the cursor has a breakpoint at the current line, the breakpoint is canceled and no breakpoint is added)
Command + Shift + F8
Viewing breakpoint information
Vi. Navigation (Navigation)
Command + O
Find class file
Command + Shift + O
Find all types of files, open files, open directories, open directories you need to add a backslash before or after the input/
Command + Option + O
Go to the specified variable/method
Control + 方向键左 / Control + 方向键右
Toggle open Edit Tab left and right
F12
Go back to the previous tool window
Esc
Enter the code file window from the tool window
Shift + Esc
Hides the current or last active window, and the cursor enters the code file window
Command + Shift + F4
Close Activity run/messages/find/... tab
Command + L
Jumps to a line at the specified point in the current file
Command + E
Displays a list of recently opened file records
Option + 方向键左 / Option + 方向键右
Cursor jumps to the left/right start position of the current word/Chinese sentence
Command + Option + 方向键左 / Command + Option + 方向键右
Go back/forward to the last action place
Command + Shift + Delete
Jump to the last edit place
Option + F1
Display the current file selection target pop-up layer, there are many targets in the pop-up layer can be selected (such as in the Code editing window can select the Finder to display the file)
Command + B / Command + 鼠标点击
Enter the interface or definition of the method/variable where the cursor is located
Command + Option + B
Jump to the implementation, use the method name on a call will jump to the specific implementation, you can skip the interface
Option + Space, Command + Y
Quick Open cursor method, class definition
Control + Shift + B
Jump to type declaration
Command + U
Go to the method/interface definition of the parent class of the method where the cursor is currently located
Control + 方向键下 / Control + 方向键上
The current cursor jumps to the previous/next method name location of the current file
Command + ] / Command + [
Move the cursor to the start/end position of the curly brace of the current code
Command + F12
pops up the current file structure layer, which can be filtered directly on the popup layer (can be used to search for methods in the class)
Control + H
Displays the hierarchy of the current class
Command + Shift + H
Show method Hierarchies
Control + Option + H
Show Call Hierarchy
F2 / Shift + F2
Jump to Next/previous highlight error or warning location
F4 / Command + 方向键下
Edit/View Code source
Option + Home
Display the navigation bar to the current file
F3
Select File/folder/Line of code, add/Remove bookmarks
Option + F3
Select File/folder/Line of code, use mnemonics to add/Remove bookmarks
Control + 0...Control + 9
Position the bookmark location to the corresponding value
Command + F3
Show All bookmarks
Vii. Refactoring (reconstruction)
F5
Copy files to the specified directory
F6
Move files to the specified directory
Command + Delete
Delete file on file for safe, popup confirmation box
Shift + F6
Renaming files
Command + F6
Change signature
Command + Option + N
Consistency
Command + Option + M
Extract the selected code as a method
Command + Option + V
Extracting variables
Command + Option + F
Extract fields
Command + Option + C
Extracting constants
Command + Option + P
Extracting parameters
Viii. vcs/local History (version control/local record)
Command + K
Submit code to version controller
Command + T
Updating code from a version controller
Option + Shift + C
View the most recent change history
Control + C
Quick Eject version Controller operator panel
Ix. Live Templates (Dynamic code template)
Command + Option + J
Pop-up template selection window, use dynamic template to wrap selected code
Command + J
Inserting custom dynamic Code templates
X. General (GM)
Command + 1...Command + 9
Open the corresponding numbered tool window
Command + S
Save All
Command + Option + Y
Sync, Refresh
Control + Command + F
Toggle Full Screen mode
Command + Shift + F12
Toggle Maximize Editor
Option + Shift + F
Add to Favorites
Option + Shift + I
Check the current file with the current configuration file
- Control + ' quick switch to Current scheme (toggle theme, code style, etc.)
Command + ,
Open Idea System settings
Command + ;
Open the Project Structure dialog box
Shift + Command + A
Find actions (you can set related options)
Control + Shift + Tab
Toggle between the Edit Window label and the tool window (if you press DELETE in the toggle process, the selected window is closed)
Xi. Other (shortcut keys not shown on some official documents)
Command + Shift +8
Vertical edit mode
IntelliJ idea for Mac shortcut keys