Mac keyboard symbols and modifiers description

  •  Command
  •  Shift
  •  Option
  •  Control
  • ↩︎ Return / Enter
  •  Delete
  •  Delete Forward (Fn + Delete)
  •  Up arrow
  •  Down arrow
  •  Left arrow
  •  Right arrow
  •  Page Up (Fn + ↑)
  •  Page Down (Fn + ↓)
  • Home Fn + ←
  • End Fn + →
  •  Right Tab (Tab)
  •  Left Tab (Shift + Tab)
  •  Escape (Esc)

Editing

  • ⌃Space Basic code completion (complete any class, method, variable)
  • ⌃⇧Space Smart code completion (expected type of filter method list and variables)
  • ⌘⇧↩ End code automatically, semicolon is added automatically at the end of the line
  • ⌘P Display method parameter information
  • ⌃J, Mid. button click Quickly view documents
  • ⇧F1 View external documents (on some code, it will trigger the browser to display related documents)
  • ⌘F1 Display specific descriptions at errors or warnings
  • ⌘N, ⌃↩, ⌃N Generate code (getter, setter, constructor, hashCode / equals, toString)
  • ⌃O Override method (override parent method)
  • ⌃I Implementation method (implementation method in interface)
  • ⌘⌥T Surrounding code (use if… else, try… catch, for, synchronized, etc. to surround selected code)
  • ⌘/ Comment / uncomment and line comment
  • ⌘⌥/ Comment / Uncomment vs. Block Comment
  • ⌥↑ Select consecutive code blocks
  • ⌥↓ Reduce the currently selected code block
  • ⌃⇧Q Display context information
  • ⌥↩ Show intent actions and quick fix code
  • ⌘⌥L Formatting code
  • ⌃⌥O Optimize import
  • ⌃⌥I Automatic indentation
  • ⇥ / ⇧⇥ Indented code / de-indented code
  • ⌘X Cut the current line or selected block to the clipboard
  • ⌘C Copy the current line or selected block to the clipboard
  • ⌘V Paste from clipboard
  • ⌘⇧V Paste from nearest buffer
  • ⌘D Copy the current line or selected block
  • ⌘⌫ Delete the current line or the selected block’s line
  • ⌃⇧J Intelligently splicing code into one line
  • ⌘↩ Smart splitting stitched rows
  • ⇧↩ Start a new line
  • ⌘⇧U Case switch
  • ⌘⇧] / ⌘⇧[ Select until end / start of code block
  • ⌥⌦ Delete to the end of the word (⌦ key is Fn + Delete)
  • ⌥⌫ Delete to the beginning of the word
  • ⌘+ / ⌘- Expand / collapse code block
  • ⌘⇧+ Expand all code blocks
  • ⌘⇧- Collapse all code blocks
  • ⌘W Close active editor tab

Search / Replace

  • Double ⇧ Query anything
  • ⌘F Find within file
  • ⌘G In search mode, look down
  • ⌘⇧G In search mode, look up
  • ⌘R In-file replacement
  • ⌘⇧F Global lookup (by path)
  • ⌘⇧R Global replacement (by path)
  • ⌘⇧S Query Structure (Exclusive for Ultimate Edition, need to be set in Keymap)
  • ⌘⇧M Replacement structure (only for Ultimate Edition, need to be set in Keymap)

Usage Search

  • ⌥F7 / ⌘F7 Find usage in files / find usage in classes
  • ⌘⇧F7 Highlighted usage in files
  • ⌘⌥F7 Show usage

Compile and Run

  • ⌘F9 Compile Project
  • ⌘⇧F9 Compile the selected file, package or module
  • ⌃⌥R Pop-up select menu for Run
  • ⌃⌥D Popup Debug selectable menu
  • ⌃R run
  • ⌃D debugging
  • ⌃⇧R, ⌃⇧D Run context configuration from editor

Debugging

  • F8 Go to the next step, if the current line breakpoint is a method, do not enter the current method body
  • F7 Go to the next step. If the current line breakpoint is a method, enter the current method body. If the method body has methods, it will not enter the embedded method.
  • ⇧F7 Smart step in, there are multiple method calls on the line where the breakpoint is, which method will pop up
  • ⇧F8 Jump out
  • ⌥F9 Run to the cursor, if there is another breakpoint before the cursor, it will enter the breakpoint
  • ⌥F8 Calculation expression (you can change the value of a variable to make it effective)
  • ⌘⌥R Resume program running. If there is a breakpoint in the code below the breakpoint, stop at the next breakpoint.
  • ⌘F8 Switch breakpoint (if there is a breakpoint on the current line of the cursor, cancel the breakpoint, and add a breakpoint if there is no)
  • ⌘⇧F8 View breakpoint information
  • ⌘O Find class files
  • ⌘⇧O Find all types of files, open files, open directories, and open directories with a backslash before or after the input/
  • ⌘⌥O Go to specified variable / method
  • ⌃← / ⌃→ Open the edit tab page left or right
  • F12 Return to the previous tool window
  •  Enter the code file window from the tool window
  • ⇧⎋ Hide the current or last active window and enter the code file window with the cursor
  • ⌘⇧F4 Close activity run / messages / find / … tab
  • ⌘L Jump to the specified position of a line in the current file
  • ⌘E Display a list of recently opened file records
  • ⌘⌥← / ⌘⌥→ Go back / forward to the previous operation
  • ⌘⇧⌫ Jump to the last edit
  • ⌥F1 Display the current file selection target pop-up layer, there are many targets in the pop-up layer to select (such as the Finder that can choose to display the file in the code editing window)
  • ⌘B / ⌘ click mouse Enter the interface or definition of the method / variable under the cursor
  • ⌘⌥B Jump to the implementation. If you use it on a method name, it will jump to the specific implementation. You can skip the interface.
  • ⌥ Space, ⌘Y Quickly open the definition of the method and class under the cursor
  • ⌃⇧B Jump to type declaration
  • ⌘U Go to the method / interface definition of the parent class of the method under the current cursor
  • ⌃↓ / ⌃↑ The current cursor jumps to the previous / next method name position of the current file
  • ⌘] / ⌘[ Move the cursor to the start / end position of the curly brackets of the current code
  • ⌘F12 Pop-up the current file structure layer, you can directly input on the pop-up layer to filter (can be used to search methods in the class)
  • ⌃H Display the hierarchy of the current class
  • ⌘⇧H Show method hierarchy
  • ⌃⌥H Show call hierarchy
  • F2 / ⇧F2 Jump to the next / previous position where errors or warnings are highlighted
  • F4 / ⌘↓ Edit / view code source
  • ⌥ Home Display the navigation bar to the current file
  • F3Select file / folder / line of code, add / unbookmark
  • ⌥F3 Select file / folder / line of code, add / unbookmark with mnemonics
  • ⌃0...⌃9 Navigate to the bookmark position corresponding to the value
  • ⌘F3 Show all bookmarks

Refactoring

  • F5 Copy files to the specified directory
  • F6 Move files to the specified directory
  • ⌘⌫ Delete files on the file for safety
  • ⇧F6 Rename file
  • ⌘F6 Change signature
  • ⌘⌥N consistency
  • ⌘⌥M Extract the selected code as a method
  • ⌘⌥V Extracting variables
  • ⌘⌥F Extracting fields
  • ⌘⌥C Extract constant
  • ⌘⌥P Extracting parameters

VCS / Local History

  • ⌘K Submit code to version controller
  • ⌘T Update code from version controller
  • ⌥⇧C View recent change history
  • ⌃C Quickly pop-up version controller operation panel

Live Templates

  • ⌘⌥J Pop-up template selection window, wrap the selected code with dynamic template
  • ⌘J Insert custom dynamic code template

General

  • ⌘1...⌘9 Open the corresponding numbered tool window
  • ⌘S Save all
  • ⌘⌥Y Sync, refresh
  • ⌃⌘F Toggle full screen mode
  • ⌘⇧F12 Toggle maximize editor
  • ⌥⇧F Add to Favorites
  • ⌥⇧I Check the current file and the current configuration file
  • `§⌃, ⌃“ Quickly switch the current scheme (switch theme, code style, etc.)
  • ⌘, Open IDEA system settings
  • ⌘; Open project structure dialog
  • ⇧⌘A Find action (set related options)
  • ⌃⇥ Switch between the editing window label and the tool window (if you press delete during the switching process, the corresponding window is closed)

Other (shortcuts not reflected in some official documents)

  • ⌘⇧8 Vertical edit mode

navigation

  • ⌘O Find class files Ctrl + N
  • ⌘⌥O Go to specified variable / method Ctrl + Shift + Alt + N
  • ⌃←⌃→Left / right switch the open editing tab page Alt←/Alt→
  •  Enter the code file window from the tool window ESC
  • ⌘L Jump to the specified position of a line in the current file Ctrl + G
  • ⌘E Display a list of recently opened file records Ctrl + E
  • ⌘⌥←⌘⌥→Return / advance to the previous operation Ctrl + Alt + ←/Ctrl + Alt + →
  • ⌘⇧⌫ Jump to the last edit
  • ⌃H Display the hierarchy of the current classCtrl + H
  • ⌘⇧H Show method hierarchy
  • ⌃⌥H Show call hierarchy
  • F4⌘↓Edit / view code source
  • ⌘⌥U Display UML Class
  • ⌃J View comments

edit

  • ⌥⌦Delete to the end of the word ( key is Fn+Delete)
  • ⌥⌫ Delete to the beginning of the word
  • ⌘+⌘-Expand / collapse code block
  • ⌘F1 Display specific descriptions at errors or warnings
  • ⌘⌥L Formatting code
  • ⌃⌥O Optimize import
  • ⇧↩ Start a new line
  • ⌘⇧↩ End code automatically, semicolon is added automatically at the end of the line
  • ⌃I Implementation method (implementation method in interface)
  • ⇧F6 Rename file or variable
  • ⌘N⌃↩⌃NGenerating code (getter, setter, constructor, hashCode / equals, toString)
  • ⌘P Display method parameter information

Find

  • Double⇧ Find anything
  • ⌘⇧F Global lookup (by path)
  • ⌘F Find within file
  • ⌘G In search mode, look down
  • ⌘⇧G In search mode, look up

navigation

  • ⌘⌥B Jump to the implementation of the interface
  • ⌘U View interface definition
  • ⌘⌥←⌘⌥→Return / advance to the previous operation
  • ⌘B⌘ click mouseEnter the interface or definition of the method / variable where the cursor is located
  • ⌃⇧B Jump to type declaration
  • ⌥ SpaceTo ⌘Yquickly open the definition of the method and class under the cursor
  • ⌘O Find class files
  • ⌘⇧O Find all types of files, open files, open directories, and open directories by adding a backslash before / after
  • F12 Return to the previous tool window
  •  Enter the code file window from the tool window
  • ⇧⎋ Hide the current or last active window and enter the code file window with the cursor
  • ⌃0…⌃9 Navigate to the bookmark position corresponding to the value
  • ⌘F3 Show all bookmarks
  • ⌥F1 Display the current file selection target pop-up layer, there are many targets in the pop-up layer to select (such as the Finder that can choose to display the file in the code editing window)
  • ⌘F12 Pop-up the current file structure layer, you can directly input on the pop-up layer to filter (can be used to search methods in the class)

Universal

  • ⌃⌘F Toggle full screen mode