Files
openidea/docs/en/reference/shortcuts.mdx
T

206 lines
12 KiB
Plaintext
Raw Blame History

This file contains ambiguous Unicode characters
This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.
---
title: "Keyboard shortcuts"
description: "The most-used default shortcuts of OpenIDEA's IntelliJ IDEA keymaps, for macOS and for Windows and Linux."
---
These are the default shortcuts: the **macOS** keymap on macOS, and the **Windows** keymap on Windows and Linux. Both follow IntelliJ IDEA. If you switched to a VS Code or Eclipse keymap, or changed shortcuts, see **Help › Keymap Reference** in the IDE for the bindings in effect, or **Settings › Keymap** to change them ([Keymaps](/en/guide/keymap)).
macOS symbols: `⌘` Command, `⌥` Option, `⌃` Control, `⇧` Shift, `↵` Return, `⌫` Delete, `⌦` Forward Delete, `⎋` Escape, `⇥` Tab. `⇧⇧` and `Shift Shift` mean pressing Shift twice; `⌃⌃` and `Ctrl Ctrl` mean pressing Control twice. Where two shortcuts are listed, either works.
Some shortcuts depend on where the focus is. For example `⌘N` / `Alt+Insert` is **Generate…** in an editor and **New** in the Project tool window, and `⌘R` / `Ctrl+F5` reruns the selected configuration in the Run and Debug tool windows.
## Search
| Action | macOS | Windows / Linux |
| ---------------------- | ------ | ------------------ |
| Search Everywhere | `⇧⇧` | `Shift Shift` |
| Find Action… | `⇧⌘A` | `Ctrl+Shift+A` |
| Go to Class… | `⌘O` | `Ctrl+N` |
| Go to File… | `⇧⌘O` | `Ctrl+Shift+N` |
| Go to Symbol… | `⌥⌘O` | `Ctrl+Alt+Shift+N` |
| Search Text Everywhere | `⌥⇧⌘E` | `Ctrl+Alt+Shift+E` |
| Find in Files… | `⇧⌘F` | `Ctrl+Shift+F` |
| Replace in Files… | `⇧⌘R` | `Ctrl+Shift+R` |
| Recent Files | `⌘E` | `Ctrl+E` |
| Recent Locations | `⇧⌘E` | `Ctrl+Shift+E` |
| Switcher | `⌃⇥` | `Ctrl+Tab` |
## Navigation
| Action | macOS | Windows / Linux |
| --------------------------- | ------------- | ---------------------- |
| Go to Line:Column… | `⌘L` | `Ctrl+G` |
| Back | `⌘[` / `⌥⌘←` | `Ctrl+Alt+Left` |
| Forward | `⌘]` / `⌥⌘→` | `Ctrl+Alt+Right` |
| Last Edit Location | `⇧⌘⌫` | `Ctrl+Shift+Backspace` |
| Go to Declaration or Usages | `⌘B` | `Ctrl+B` |
| Go to Implementation(s) | `⌥⌘B` | `Ctrl+Alt+B` |
| Go to Type Declaration | `⇧⌘B` / `⌃⇧B` | `Ctrl+Shift+B` |
| Navigate › Super Method | `⌘U` | `Ctrl+U` |
| Navigate › Test | `⇧⌘T` | `Ctrl+Shift+T` |
| Find Usages | `⌥F7` | `Alt+F7` |
| Show Usages | `⌥⌘F7` | `Ctrl+Alt+F7` |
| Highlight Usages in File | `⇧⌘F7` | `Ctrl+Shift+F7` |
| File Structure | `⌘F12` | `Ctrl+F12` |
| Call Hierarchy | `⌃⌥H` | `Ctrl+Alt+H` |
| Type Hierarchy | `⌃H` | `Ctrl+H` |
| Jump to Navigation Bar | `⌘↑` / `⌥↖` | `Alt+Home` |
| Select In… | `⌥F1` | `Alt+F1` |
| Next Highlighted Error | `F2` | `F2` |
| Previous Highlighted Error | `⇧F2` | `Shift+F2` |
| Toggle Bookmark | `F3` | `F11` |
| Show Bookmarks | `⌘F3` | `Shift+F11` |
## Find in the current file
| Action | macOS | Windows / Linux |
| ------------------------ | ----- | --------------------------- |
| Find | `⌘F` | `Ctrl+F` |
| Replace | `⌘R` | `Ctrl+R` |
| Find Next Occurrence | `⌘G` | `F3` / `Ctrl+L` |
| Find Previous Occurrence | `⇧⌘G` | `Shift+F3` / `Ctrl+Shift+L` |
## Editing
| Action | macOS | Windows / Linux |
| --------------------------------- | --------------- | ------------------ |
| Code Completion › Basic | `⌃Space` | `Ctrl+Space` |
| Show Context Actions | `⌥↵` | `Alt+Enter` |
| Parameter Info | `⌘P` | `Ctrl+P` |
| Quick Documentation | `F1` / `⌃J` | `Ctrl+Q` |
| Quick Definition | `⌥Space` / `⌘Y` | `Ctrl+Shift+I` |
| Error Description | `⌘F1` | `Ctrl+F1` |
| Generate… | `⌘N` | `Alt+Insert` |
| Override Methods… | `⌃O` | `Ctrl+O` |
| Implement Methods… | `⌃I` | `Ctrl+I` |
| Surround With… | `⌥⌘T` | `Ctrl+Alt+T` |
| Insert Live Template… | `⌘J` | `Ctrl+J` |
| Comment with Line Comment | `⌘/` | `Ctrl+/` |
| Comment with Block Comment | `⌥⌘/` / `⌃⇧/` | `Ctrl+Shift+/` |
| Reformat Code | `⌥⌘L` | `Ctrl+Alt+L` |
| Optimize Imports | `⌃⌥O` | `Ctrl+Alt+O` |
| Extend Selection | `⌥↑` | `Ctrl+W` |
| Shrink Selection | `⌥↓` | `Ctrl+Shift+W` |
| Duplicate Line or Selection | `⌘D` | `Ctrl+D` |
| Delete Line | `⌘⌫` | `Ctrl+Y` |
| Move Line Up | `⌥⇧↑` | `Alt+Shift+Up` |
| Move Line Down | `⌥⇧↓` | `Alt+Shift+Down` |
| Move Statement Up | `⇧⌘↑` | `Ctrl+Shift+Up` |
| Move Statement Down | `⇧⌘↓` | `Ctrl+Shift+Down` |
| Complete Current Statement | `⇧⌘↵` | `Ctrl+Shift+Enter` |
| Join Lines | `⌃⇧J` | `Ctrl+Shift+J` |
| Toggle Case | `⇧⌘U` | `Ctrl+Shift+U` |
| Add Selection for Next Occurrence | `⌃G` | `Alt+J` |
| Select All Occurrences | `⌃⌘G` | `Ctrl+Alt+Shift+J` |
| Column Selection Mode | `⇧⌘8` | `Alt+Shift+Insert` |
| Paste from History… | `⇧⌘V` | `Ctrl+Shift+V` |
| Cyclic Expand Word | `⌥/` | `Alt+/` |
| Collapse | `⌘-` | `Ctrl+-` |
| Expand | `⌘=` | `Ctrl+=` |
| Collapse All | `⇧⌘-` | `Ctrl+Shift+-` |
| Expand All | `⇧⌘=` | `Ctrl+Shift+=` |
## Refactoring
| Action | macOS | Windows / Linux |
| -------------------- | ----- | ------------------ |
| Refactor This… | `⌃T` | `Ctrl+Alt+Shift+T` |
| Rename… | `⇧F6` | `Shift+F6` |
| Change Signature… | `⌘F6` | `Ctrl+F6` |
| Introduce Variable… | `⌥⌘V` | `Ctrl+Alt+V` |
| Introduce Constant… | `⌥⌘C` | `Ctrl+Alt+C` |
| Introduce Field… | `⌥⌘F` | `Ctrl+Alt+F` |
| Introduce Parameter… | `⌥⌘P` | `Ctrl+Alt+P` |
| Extract Method… | `⌥⌘M` | `Ctrl+Alt+M` |
| Inline… | `⌥⌘N` | `Ctrl+Alt+N` |
| Move… | `F6` | `F6` |
| Safe Delete… | `⌘⌦` | `Alt+Delete` |
## Run and build
| Action | macOS | Windows / Linux |
| ------------------------------- | ------ | ---------------- |
| Run Anything… | `⌃⌃` | `Ctrl Ctrl` |
| Run | `⌃R` | `Shift+F10` |
| Debug | `⌃D` | `Shift+F9` |
| Run Context Configuration | `⌃⇧R` | `Ctrl+Shift+F10` |
| Debug Context Configuration | `⌃⇧D` | — |
| Select Run/Debug Configuration… | `⌃⌥R` | `Alt+Shift+F10` |
| Debug… | `⌃⌥D` | `Alt+Shift+F9` |
| Edit Configurations… | `⌃⌥⇧R` | — |
| Stop | `⌘F2` | `Ctrl+F2` |
| Build Project | `⌘F9` | `Ctrl+F9` |
## Debugging
| Action | macOS | Windows / Linux |
| ------------------------- | ------------ | --------------- |
| Toggle Line Breakpoint | `⌘F8` | `Ctrl+F8` |
| View Breakpoints… | `⇧⌘F8` | `Ctrl+Shift+F8` |
| Resume Program | `⌥⌘R` / `F9` | `F9` |
| Step Over | `F8` | `F8` |
| Step Into | `F7` | `F7` |
| Smart Step Into | `⇧F7` | `Shift+F7` |
| Step Out | `⇧F8` | `Shift+F8` |
| Run to Cursor | `⌥F9` | `Alt+F9` |
| Evaluate Expression… | `⌥F8` | `Alt+F8` |
| Quick Evaluate Expression | `⌥⌘F8` | `Ctrl+Alt+F8` |
| Show Execution Point | `⌥F10` | `Alt+F10` |
| Attach to Process… | `⌥⇧F5` | `Ctrl+Alt+F5` |
## Version control
| Action | macOS | Windows / Linux |
| --------------- | ------ | --------------------- |
| VCS Operations… | `⌃V` | `` Alt+` `` |
| Commit | `⌘K` | `Ctrl+K` |
| Push… | `⇧⌘K` | `Ctrl+Shift+K` |
| Update Project… | `⌘T` | `Ctrl+T` |
| Rollback… | `⌥⌘Z` | `Ctrl+Alt+Z` |
| Add to VCS | `⌥⌘A` | `Ctrl+Alt+A` |
| Branches… | — | `` Ctrl+Shift+` `` |
| Next Change | `⌃⌥⇧↓` | `Ctrl+Alt+Shift+Down` |
| Previous Change | `⌃⌥⇧↑` | `Ctrl+Alt+Shift+Up` |
| Recent Changes | `⌥⇧C` | `Alt+Shift+C` |
## Tool windows
| Action | macOS | Windows / Linux |
| ------------------------ | ------- | ------------------ |
| Project | `⌘1` | `Alt+1` |
| Bookmarks | `⌘2` | `Alt+2` |
| Find | `⌘3` | `Alt+3` |
| Run | `⌘4` | `Alt+4` |
| Debug | `⌘5` | `Alt+5` |
| Problems | `⌘6` | `Alt+6` |
| Structure | `⌘7` | `Alt+7` |
| Services | `⌘8` | `Alt+8` |
| Git | `⌘9` | `Alt+9` |
| Commit | `⌘0` | `Alt+0` |
| Terminal | `⌥F12` | `Alt+F12` |
| Hide All Tool Windows | `⇧⌘F12` | `Ctrl+Shift+F12` |
| Maximize Tool Window | `⇧⌘'` | `Ctrl+Shift+'` |
| Jump to Last Tool Window | `F12` | `F12` |
| Hide Active Tool Window | `⇧⎋` | `Shift+Escape` |
| Focus Editor | `⎋` | `Escape` |
| New Agent Task | `⇧⌘I` | `Ctrl+Alt+Shift+I` |
## Files, tabs and view
| Action | macOS | Windows / Linux |
| -------------------- | ------------ | ----------------------- |
| Settings… | `⌘,` | `Ctrl+Alt+S` |
| Project Structure… | `⌘;` | `Ctrl+Alt+Shift+S` |
| Save All | `⌘S` | `Ctrl+S` |
| New Scratch File… | `⇧⌘N` | `Ctrl+Alt+Shift+Insert` |
| Close Tab | `⌘W` | `Ctrl+F4` |
| Select Next Tab | `⌃→` / `⇧⌘]` | `Alt+Right` |
| Select Previous Tab | `⌃←` / `⇧⌘[` | `Alt+Left` |
| Quick Switch Scheme… | `` ⌃` `` | `` Ctrl+` `` |
| Zoom In IDE | `⌃⌥=` | `Alt+Shift+=` |
| Zoom Out IDE | `⌃⌥-` | `Alt+Shift+-` |
| Reset IDE Zoom | `⌃⌥0` | `Alt+Shift+0` |
| Increase Font Size | `⌥⇧.` | `Alt+Shift+.` |
| Decrease Font Size | `⌥⇧,` | `Alt+Shift+,` |
| Toggle Full Screen | `⌃⌘F` | — |