# Predefined macOS keymap

> **Note:**
> You can find all shortcuts and modify them in `Settings | Keymap`.
>
>
>
> You can also print the [default keymap reference card](https://resources.jetbrains.com.cn/storage/products/intellij-idea/docs/IntelliJIDEA_ReferenceCard.pdf)  .

## IntelliJ IDEA's top keyboard shortcuts

|  |  |
| --- | --- |
|  [Search Everywhere](searching-everywhere.html)  |  Double `⇧`   |
|  [Find Action...](searching-everywhere.html#search_actions)  |  `⌘ ⇧ A`   |
|  [Show Project window](project-tool-window.html)  |  `⌘ 1`   |
|  [Rebuild](compiling-applications.html)  |  `⌘ ⇧ F9`   |
|  [Show Intention Actions](intention-actions.html#apply-intention-actions)  |  `⌥ ⏎`   |
|  [Recent Files](navigating-through-the-source-code.html)  |  `⌘ E`   |
|  [Find Usages](find-highlight-usages.html#find-usages)  |  `⌥ F7`   |
|  [Select In...](navigating-through-the-source-code.html)  |  `⌥ F1`   |
|  [Settings...](configure-project-settings.html)  |  `⌘ Comma`   |
|  [Generate...](generating-code.html)  |  `⌘ N`   |
|  [Run Anything](running-applications.html)   |  Double `⌃`   |
|  [Debug...](starting-the-debugger-session.html)  |  `⌃ ⌥ D`   |
|  [View Breakpoints...](using-breakpoints.html)  |  `⌘ ⇧ F8`   |
|  [Attach to Process...](attach-to-process.html)  |  `⌥ ⇧ F5`   |
|  [VCS Operations Popup...](version-control-integration.html)  |  `⌃ V`   |
|  [Refactor This...](refactoring-source-code.html)  |  `⌃ T`   |
|  [Reformat Code](reformat-and-rearrange-code.html)  |  `⌘ ⌥ L`   |

## Build projects

|  |  |
| --- | --- |
|  [New in This Directory](null)  |  `⌃ ⌥ N`   |
|  [Build Project](compiling-applications.html)  |  `⌘ F9`   |
|  [Rebuild](compiling-applications.html)  |  `⌘ ⇧ F9`   |

## Basic editing

|  |  |
| --- | --- |
|  [Cut](null)  |  `⌘ X`   |
|  [Copy](null)  |  `⌘ C`   |
|  [Paste](null)  |  `⌘ V`   |
|  [Paste as Plain Text](null)  |  `⌘ ⌥ ⇧ V`   |
|  [Paste from History...](null)  |  `⌘ ⇧ V`   |
|  [Copy Paths](null)  |  `⌘ ⇧ C`   |
|  [Copy Reference](null)  |  `⌘ ⌥ ⇧ C`   |
|  [Save All](saving-and-reverting-changes.html)  |  `⌘ S`   |
|  [Undo](saving-and-reverting-changes.html)  |  `⌘ Z`   |
|  [Redo](saving-and-reverting-changes.html)  |  `⌘ ⇧ Z`   |
|  [Indent Selection](reformat-and-rearrange-code.html)  |  `⇥`   |
|  [Unindent Line or Selection](reformat-and-rearrange-code.html)  |  `⇧ ⇥`   |
|  [Auto-Indent Lines](reformat-and-rearrange-code.html)  |  `⌃ ⌥ I`   |
|  [Start New Line](null)  |  `⇧ ⏎`   |
|  [Start New Line Before Current](null)  |  `⌘ ⌥ ⏎`   |
|  [Delete Line](null)  |  `⌘ ⌫`   |
|  [Join Lines](null)  |  `⌃ ⇧ J`   |
|  [Duplicate Line or Selection](null)  |  `⌘ D`   |
|  [Toggle Case](null)  |  `⌘ ⇧ U`   |
|  [Scratch File](scratches.html)  |  `⌘ ⇧ N`   |
|  [Open Source in New Window](null)  |  `⇧ F4`   |
|  [Increase Font Size in All Editors](using-code-editor.html#increase_decrease_font)  |  `⌃ ⇧ .`   |
|  [Decrease Font Size in All Editors](using-code-editor.html#increase_decrease_font)  |  `⌃ ⇧ Comma`   |

## Caret navigation

|  |  |
| --- | --- |
|  [Move Caret to Previous Word](null)  |  `⌥ ←`   |
|  [Move Caret to Next Word](null)  |  `⌥ →`   |
|  [Move Caret to Line Start](null)  |  `⌘ ←`   |
|  [Move Caret to Line End](null)  |  `⌘ →`   |
|  [Move Caret to Matching Brace](null)  |  `⌃ M`   |
|  [Move Caret to Code Block Start](null)  |  `⌘ ⌥ [`   |
|  [Move Caret to Code Block End](null)  |  `⌘ ⌥ ]`   |
|  [Next Method](navigating-through-the-source-code.html)  |  `⌃ ⇧ ↓`   |
|  [Previous Method](navigating-through-the-source-code.html)  |  `⌃ ⇧ ↑`   |
|  [Move Caret to Page Top](null)  |  `⌘ Page ↑`   |
|  [Move Caret to Page Bottom](null)  |  `⌘ Page ↓`   |
|  [Page Up](null)  |  `Page ↑`   |
|  [Page Down](null)  |  `Page ↓`   |
|  [Move Caret to Text Start](null)  |  `⌘ Home`   |
|  [Move Caret to Text End](null)  |  `⌘ End`   |

## Select text

|  |  |
| --- | --- |
|  [Select All](null)  |  `⌘ A`   |
|  [Left with Selection](null)  |  `⇧ ←`   |
|  [Right with Selection](null)  |  `⇧ →`   |
|  [Move Caret to Previous Word with Selection](null)  |  `⌥ ⇧ ←`   |
|  [Move Caret to Next Word with Selection](null)  |  `⌥ ⇧ →`   |
|  [Move Caret to Line Start with Selection](null)  |  `⌘ ⇧ ←`   |
|  [Move Caret to Line End with Selection](null)  |  `⌘ ⇧ →`   |
|  [Up with Selection](null)  |  `⇧ ↑`   |
|  [Down with Selection](null)  |  `⇧ ↓`   |
|  [Move Caret to Code Block Start with Selection](null)  |  `⌘ ⌥ ⇧ [`   |
|  [Move Caret to Code Block End with Selection](null)  |  `⌘ ⌥ ⇧ ]`   |
|  [Move Caret to Page Top with Selection](null)  |  `⌘ ⇧ Page ↑`   |
|  [Move Caret to Page Bottom with Selection](null)  |  `⌘ ⇧ Page ↓`   |
|  [Page Up with Selection](null)  |  `⇧ Page ↑`   |
|  [Page Down with Selection](null)  |  `⇧ Page ↓`   |
|  [Move Caret to Text Start with Selection](null)  |  `⌘ ⇧ Home`   |
|  [Move Caret to Text End with Selection](null)  |  `⌘ ⇧ End`   |
|  [Extend Selection](null)  |  `⌥ ↑`   |
|  [Shrink Selection](null)  |  `⌥ ↓`   |

## Code folding

|  |  |
| --- | --- |
|  [Expand](null)  |  `⌘ NumPad +`   |
|  [Collapse](null)  |  `⌘ NumPad -`   |
|  [Expand Recursively](null)  |  `⌘ ⌥ NumPad +`   |
|  [Collapse Recursively](null)  |  `⌘ ⌥ NumPad -`   |
|  [Expand All](null)  |  `⌘ ⇧ NumPad +`   |
|  [Collapse All](null)  |  `⌘ ⇧ NumPad -`   |
|  [Fold Selection](null)  |  `⌘ .`   |

## Multiple carets and selection ranges

|  |  |
| --- | --- |
|  [Add/Remove Caret](multicursor.html#add-carets-at-selected-locations)  |  `⌥ ⇧ Click`   |
|  [Toggle Column Selection Mode](multicursor.html#column_selection)  |  `⌘ ⇧ 8`   |
|  [Clone Caret Above](multicursor.html#add-carets-above-or-below-the-current-caret)  |  Double `⌥`  + `Up`  |
|  [Clone Caret Below](multicursor.html#add-carets-above-or-below-the-current-caret)  |  Double `⌥`  + `Down`  |
|  [Add Caret to Each Line in Selection](multicursor.html#add-carets-to-the-end-of-each-line-in-the-selected-region)  |  `⌥ ⇧ G`   |
|  [Add Selection for Next Occurrence](multicursor.html#multiple_words)  |  `⌃ G`   |
|  [Select All Occurrences](multicursor.html#multiple_words)  |  `⌘ ⌃ G`   |
|  [Deselect Last Occurrence](multicursor.html#multiple_words)  |  `⌃ ⇧ G`   |
|  [Create Rectangular Selection](multicursor.html#use-mouse-to-select-rectangular-fragments-of-text-in-normal-selection-mode)  |  `⌥ ⇧ Middle-Click`   |
|  [Drag to Create Rectangular Selection](multicursor.html#use-mouse-to-select-rectangular-fragments-of-text-in-normal-selection-mode)  |  `⌥ Click`   |
|  [Drag to Create Multiple Rectangular Selections](multicursor.html#use-mouse-to-select-rectangular-fragments-of-text-in-normal-selection-mode)  |  `⌘ ⌥ ⇧ Click`   |

## Coding assistance

|  |  |
| --- | --- |
|  [Show Intention Actions](intention-actions.html#apply-intention-actions)  |  `⌥ ⏎`   |
|  [Basic Completion](auto-completing-code.html)  |  `⌃ Space`   |
|  [Type-Matching Completion](auto-completing-code.html)  |  `⌃ ⇧ Space`   |
|  [Second Basic Completion](auto-completing-code.html)  |  `⌃ ⌥ Space`   |
|  [Complete Current Statement](auto-completing-code.html)  |  `⌘ ⇧ ⏎`   |
|  [Reformat Code](reformat-and-rearrange-code.html)  |  `⌘ ⌥ L`   |
|  [Parameter Info](viewing-reference-information.html#view-parameter-info)  |  `⌘ P`   |
|  [Quick Documentation](viewing-reference-information.html#inline-quick-documentation)  |  `F1`   |
|  [Move Statement Up](null)  |  `⌘ ⇧ ↑`   |
|  [Move Statement Down](null)  |  `⌘ ⇧ ↓`   |
|  [Move Element Left](null)  |  `⌘ ⌥ ⇧ ←`   |
|  [Move Statement Right](null)  |  `⌘ ⌥ ⇧ →`   |
|  [Move Line Up](null)  |  `⌥ ⇧ ↑`   |
|  [Move Line Down](null)  |  `⌥ ⇧ ↓`   |
|  [Comment with Line Comment](null)  |  `⌘ /`   |
|  [Comment with Block Comment](null)  |  `⌘ ⌥ /`   |
|  [Surround With...](surrounding-blocks-of-code-with-language-constructs.html)  |  `⌘ ⌥ T`   |
|  [Generate...](generating-code.html)  |  `⌘ N`   |

## Context navigation

|  |  |
| --- | --- |
|  [Next Method](navigating-through-the-source-code.html)  |  `⌃ ⇧ ↓`   |
|  [Previous Method](navigating-through-the-source-code.html)  |  `⌃ ⇧ ↑`   |
|  [Go to Line/Column...](navigating-through-the-source-code.html#find_line)  |  `⌘ L`   |
|  [Switcher](using-code-editor.html#ws_editor_switch_between_tabs)  |  `⌃ ⇥`   |
|  [Select In...](navigating-through-the-source-code.html)  |  `⌥ F1`   |
|  [Recent Files](navigating-through-the-source-code.html)  |  `⌘ E`   |
|  [Recent Changes](navigating-through-the-source-code.html)  |  `⌥ ⇧ C`   |
|  [Last Edit Location](navigating-through-the-source-code.html)  |  `⌘ ⇧ ⌫`   |
|  [Back](navigating-through-the-source-code.html)  |  `⌘ [`   |
|  [Forward](navigating-through-the-source-code.html)  |  `⌘ ]`   |
|  [Select Next Tab](using-code-editor.html)  |  `⌘ ⇧ ]`   |
|  [Select Previous Tab](using-code-editor.html)  |  `⌘ ⇧ [`   |
|  [Toggle Anonymous Bookmark](bookmarks.html)  |  `F3`   |
|  [Toggle Bookmark with Digit](bookmarks.html)  |  `⌃ ⇧ [digit]`   |
|  [Toggle Bookmark with Mnemonic](bookmarks.html)  |  `⌥ F3`   |
|  [Show All Bookmarks](bookmarks.html)  |  `⌘ F3`   |
|  [Go to Bookmark with Digit](bookmarks.html)  |  `⌃ [digit]`   |
|  [Show Mnemonic Bookmarks](bookmarks.html)  |  `⌘ ⌥ F3`   |
|  [Show Bookmarks window](bookmarks.html)  |  `⌘ 2`   |
|  [Show Structure window](viewing-structure-of-a-source-file.html#structure-tool-window)  |  `⌘ 7`   |
|  [Show Find window](find-tool-window.html)  |  `⌘ 3`   |
|  [Next Occurrence](null)  |  `⌘ ⌥ ↓`   |
|  [Previous Occurrence](null)  |  `⌘ ⌥ ↑`   |

## Find everything

|  |  |
| --- | --- |
|  [Search Everywhere](searching-everywhere.html)  |  Double `⇧`   |
|  [Find...](finding-and-replacing-text-in-file.html#find_in_file)  |  `⌘ F`   |
|  [Find Next / Move to Next Occurrence](finding-and-replacing-text-in-file.html#find_in_file)  |  `⌘ G`   |
|  [Find Previous / Move to Previous Occurrence](finding-and-replacing-text-in-file.html#find_in_file)  |  `⌘ ⇧ G`   |
|  [Replace...](finding-and-replacing-text-in-file.html#replace_search_string)  |  `⌘ R`   |
|  [Find in Files...](finding-and-replacing-text-in-project.html#find_in_project)  |  `⌘ ⇧ F`   |
|  [Replace in Files...](finding-and-replacing-text-in-project.html#replace_search_string_in_project)  |  `⌘ ⇧ R`   |
|  [Next Occurrence of the Word at Caret](null)  |  `N/A`   |
|  [Go to File...](navigating-through-the-source-code.html)  |  `⌘ ⇧ O`   |
|  [File Structure](viewing-structure-of-a-source-file.html#structure-popup)  |  `⌘ F12`   |
|  [Go to Symbol...](navigating-through-the-source-code.html)  |  `⌘ ⌥ O`   |
|  [Find Action...](searching-everywhere.html#search_actions)  |  `⌘ ⇧ A`   |

## Navigate from symbols

|  |  |
| --- | --- |
|  [Find Usages](find-highlight-usages.html#find-usages)  |  `⌥ F7`   |
|  [Go to Declaration or Usages](navigating-through-the-source-code.html)  |  `⌘ B`   |
|  [Go to Type Declaration](navigating-through-the-source-code.html)  |  `⌘ ⇧ B`   |
|  [Show Usages](navigating-through-the-source-code.html)  |  `⌘ ⌥ F7`   |
|  [Go to Super Method](navigating-through-the-source-code.html#go_to_implementation)  |  `⌘ U`   |
|  [Go to Implementation(s)](navigating-through-the-source-code.html#go_to_implementation)  |  `⌘ ⌥ B`   |
|  [Go to Test](create-tests.html#test-code-navigation)  |  `⌘ ⇧ T`   |
|  [Highlight Usages in File](find-highlight-usages.html#usages_in_file)  |  `⌘ ⇧ F7`   |

## Code analysis

|  |  |
| --- | --- |
|  [Show Intention Actions](intention-actions.html#apply-intention-actions)  |  `⌥ ⏎`   |
|  [Error Description](using-code-editor.html)  |  `⌘ F1`   |
|  [Next Highlighted Error](navigating-through-the-source-code.html#navigate-errors-warnings)  |  `F2`   |
|  [Previous Highlighted Error](navigating-through-the-source-code.html#navigate-errors-warnings)  |  `⇧ F2`   |
|  [Run Inspection by Name...](running-inspections.html#run-inspections-manually)  |  `⌘ ⌥ ⇧ I`   |
|  [Show Problems window](problems-tool-window.html)  |  `⌘ 6`   |

## Run and debug

|  |  |
| --- | --- |
|  [Run Anything](running-applications.html)   |  Double `⌃`   |
|  [Run context configuration](run-debug-configuration.html)  |  `⌃ R`   |
|  [Run...](run-debug-configuration.html)  |  `⌃ ⌥ R`   |
|  [Debug context configuration](starting-the-debugger-session.html)  |  `⌃ D`   |
|  [Debug...](starting-the-debugger-session.html)  |  `⌃ ⌥ D`   |
|  [Attach to Process...](attach-to-process.html)  |  `⌥ ⇧ F5`   |
|  [Stop](starting-the-debugger-session.html)  |  `⌘ F2`   |
|  [Resume Program](starting-the-debugger-session.html)  |  `⌘ ⌥ R`   |
|  [Stop Background Processes...](null)  |  `⌘ ⇧ F2`   |
|  [Step Over](stepping-through-the-program.html)  |  `F8`   |
|  [Force Step Over](stepping-through-the-program.html)  |  `⌥ ⇧ F8`   |
|  [Step Into](stepping-through-the-program.html)  |  `F7`   |
|  [Smart Step Into](stepping-through-the-program.html)  |  `⇧ F7`   |
|  [Force Step Into](stepping-through-the-program.html)  |  `⌥ ⇧ F7`   |
|  [Step Out](stepping-through-the-program.html)  |  `⇧ F8`   |
|  [Run To Cursor](stepping-through-the-program.html)  |  `⌥ F9`   |
|  [Force Run To Cursor](stepping-through-the-program.html)  |  `⌘ ⌥ F9`   |
|  [Show Execution Point](stepping-through-the-program.html)  |  `⌥ F10`   |
|  [Evaluate Expression...](examining-suspended-program.html)  |  `⌥ F8`   |
|  [Quick Evaluate Expression](examining-suspended-program.html)  |  `⌘ ⌥ F8`   |
|  [Toggle Line Breakpoint](using-breakpoints.html)  |  `⌘ F8`   |
|  [Toggle Temporary Line Breakpoint](using-breakpoints.html)  |  `⌘ ⌥ ⇧ F8`   |
|  [View Breakpoints...](using-breakpoints.html)  |  `⌘ ⇧ F8`   |
|  [Edit Breakpoint](using-breakpoints.html)  |  `⌘ ⇧ F8`   |
|  [Show Run window](run-tool-window.html)  |  `⌘ 4`   |
|  [Show Debug window](debug-tool-window.html)  |  `⌘ 5`   |
|  [Show Services window](services-tool-window.html)  |  `⌘ 8`   |

## Refactorings

|  |  |
| --- | --- |
|  [Refactor This...](refactoring-source-code.html)  |  `⌃ T`   |
|  [Rename...](rename-refactorings.html)  |  `⇧ F6`   |
|  [Change Signature...](change-signature.html)  |  `⌘ F6`   |
|  [Inline...](inline.html)  |  `⌘ ⌥ N`   |
|  [Move...](move-refactorings.html)  |  `F6`   |
|  [Extract Method...](extract-method.html)  |  `⌘ ⌥ M`   |
|  [Introduce Field...](null)  |  `⌘ ⌥ F`   |
|  [Introduce Parameter...](null)  |  `⌘ ⌥ P`   |
|  [Introduce Variable...](extract-variable.html)  |  `⌘ ⌥ V`   |
|  [Safe Delete...](safe-delete.html)  |  `⌘ ⌦`   |

## Global VCS actions

|  |  |
| --- | --- |
|  [VCS Operations Popup...](version-control-integration.html)  |  `⌃ V`   |
|  [Commit...](commit-and-push-changes.html)  |  `⌘ K`   |
|  [Update Project](sync-with-a-remote-repository.html)  |  `⌘ T`   |
|  [Rollback](undo-changes.html)  |  `⌘ ⌥ Z`   |
|  [Push...](using-git-integration.html)  |  `⌘ ⇧ K`   |
|  [Next Change](null)  |  `⌃ ⌥ ⇧ ↓`   |
|  [Previous Change](null)  |  `⌃ ⌥ ⇧ ↑`   |
|  [Show Version Control window](version-control-integration.html)  |  `⌘ 9`   |
|  [Show Commit window](commit-and-push-changes.html)  |  `⌘ 0`   |

## Diff Viewer

|  |  |
| --- | --- |
|  [Show Diff](null)  |  `⌘ D`   |
|  [Compare Files](null)  |  `⌘ D`   |
|  [Next Difference](null)  |  `F7`   |
|  [Previous Difference](null)  |  `⇧ F7`   |
|  [Accept Left Side](null)  |  `⌘ ⌃ →`   |
|  [Accept Right Side](null)  |  `⌘ ⌃ ←`   |
|  [Select Opposite Diff Pane](null)  |  `⌃ ⇧ ⇥`   |
|  [Show Diff Settings Popup...](null)  |  `⌘ ⇧ D`   |

## Tool windows

|  |  |
| --- | --- |
|  [Hide Active Tool Window](tool-windows.html)  |  `⇧ ⎋`   |
|  [Hide All Tool Windows](tool-windows.html)  |  `⌘ ⇧ F12`   |
|  [Jump to Last Tool Window](tool-windows.html)  |  `F12`   |
|  [Stretch to Left](manipulating-the-tool-windows.html)  |  `⌃ ⌥ ←`   |
|  [Stretch to Right](manipulating-the-tool-windows.html)  |  `⌃ ⌥ →`   |
|  [Stretch to Top](manipulating-the-tool-windows.html)  |  `⌃ ⌥ ↑`   |
|  [Stretch to Bottom](manipulating-the-tool-windows.html)  |  `⌃ ⌥ ↓`   |
|  [Show Project window](project-tool-window.html)  |  `⌘ 1`   |
|  [Show Bookmarks window](bookmarks.html)  |  `⌘ 2`   |
|  [Show Find window](find-tool-window.html)  |  `⌘ 3`   |
|  [Show Run window](run-tool-window.html)  |  `⌘ 4`   |
|  [Show Debug window](debug-tool-window.html)  |  `⌘ 5`   |
|  [Show Problems window](problems-tool-window.html)  |  `⌘ 6`   |
|  [Show Structure window](viewing-structure-of-a-source-file.html#structure-tool-window)  |  `⌘ 7`   |
|  [Show Services window](services-tool-window.html)  |  `⌘ 8`   |
|  [Show Version Control window](version-control-integration.html)  |  `⌘ 9`   |
|  [Show Commit window](commit-and-push-changes.html)  |  `⌘ 0`   |
|  [Show Terminal window](null)  |  `⌥ F12`   |

