IntelliJ keyboard shortcuts
IntelliJ IDEA is JetBrains' Java and Kotlin IDE; PyCharm, WebStorm and the other JetBrains IDEs share most of these default keymap shortcuts.
Most used IntelliJ keyboard shortcuts
The IntelliJ shortcuts worth learning first. The full list follows, grouped by task.
- Search EverywhereMacShift,ShiftWindowsShift,ShiftLinuxShift,Shift
- Find an actionMacShiftCmdAWindowsCtrlShiftALinuxCtrlShiftA
- Go to a fileMacShiftCmdOWindowsCtrlShiftNLinuxCtrlShiftN
- Go to declarationMacCmdBWindowsCtrlBLinuxCtrlB
- Find usagesMacOptionF7WindowsAltF7LinuxAltF7
- Show intention actions and quick fixesMacOptionEnterWindowsAltEnterLinuxAltEnter
- Generate code (getters, constructors)MacCmdNWindowsAltInsertLinuxAltInsert
- Reformat codeMacOptionCmdLWindowsCtrlAltLLinuxCtrlAltL
- Duplicate the line or selectionMacCmdDWindowsCtrlDLinuxCtrlD
- RenameMacShiftF6WindowsShiftF6LinuxShiftF6
- Find in filesMacShiftCmdFWindowsCtrlShiftFLinuxCtrlShiftF
- RunMacCtrlRWindowsShiftF10LinuxShiftF10
- CommitMacCmdKWindowsCtrlKLinuxCtrlK
Search and navigation
14 shortcuts| Action | Mac | Windows | Linux |
|---|---|---|---|
| Search Everywhere | Shift,Shift | Shift,Shift | Shift,Shift |
| Find an action | ShiftCmdA | CtrlShiftA | CtrlShiftA |
| Go to a class | CmdO | CtrlN | CtrlN |
| Go to a file | ShiftCmdO | CtrlShiftN | CtrlShiftN |
| Go to a symbol | OptionCmdO | CtrlAltShiftN | CtrlAltShiftN |
| Recent files | CmdE | CtrlE | CtrlE |
| Go to a line | CmdL | CtrlG | CtrlG |
| File structure | CmdF12 | CtrlF12 | CtrlF12 |
| Go to declaration | CmdB | CtrlB | CtrlB |
| Go to implementation | OptionCmdB | CtrlAltB | CtrlAltB |
| Go to the super method | CmdU | CtrlU | CtrlU |
| Find usages | OptionF7 | AltF7 | AltF7 |
| Navigate back | Cmd[ | CtrlAlt← | CtrlAlt← |
| Navigate forward | Cmd] | CtrlAlt→ | CtrlAlt→ |
Editing
22 shortcuts| Action | Mac | Windows | Linux |
|---|---|---|---|
| Basic code completion | CtrlSpace | CtrlSpace | CtrlSpace |
| Smart code completion | CtrlShiftSpace | CtrlShiftSpace | CtrlShiftSpace |
| Show intention actions and quick fixes | OptionEnter | AltEnter | AltEnter |
| Parameter info | CmdP | CtrlP | CtrlP |
| Quick documentation | F1 | CtrlQ | CtrlQ |
| Generate code (getters, constructors) | CmdN | AltInsert | AltInsert |
| Surround with | OptionCmdT | CtrlAltT | CtrlAltT |
| Comment with line comment | Cmd/ | Ctrl/ | Ctrl/ |
| Comment with block comment | OptionCmd/ | CtrlShift/ | CtrlShift/ |
| Reformat code | OptionCmdL | CtrlAltL | CtrlAltL |
| Optimize imports | CtrlOptionO | CtrlAltO | CtrlAltO |
| Duplicate the line or selection | CmdD | CtrlD | CtrlD |
| Delete the line | CmdBackspace | CtrlY | CtrlY |
| Move the line up | OptionShift↑ | AltShift↑ | AltShift↑ |
| Move the line down | OptionShift↓ | AltShift↓ | AltShift↓ |
| Move the statement up | ShiftCmd↑ | CtrlShift↑ | CtrlShift↑ |
| Move the statement down | ShiftCmd↓ | CtrlShift↓ | CtrlShift↓ |
| Extend the selection | Option↑ | CtrlW | CtrlW |
| Shrink the selection | Option↓ | CtrlShiftW | CtrlShiftW |
| Add the next occurrence | CtrlG | AltJ | AltJ |
| Select all occurrences | CtrlCmdG | CtrlAltShiftJ | CtrlAltShiftJ |
| Expand or collapse a block | Cmd=orCmd- | Ctrl=orCtrl- | Ctrl=orCtrl- |
Refactoring
5 shortcuts| Action | Mac | Windows | Linux |
|---|---|---|---|
| Rename | ShiftF6 | ShiftF6 | ShiftF6 |
| Refactor This menu | CtrlT | CtrlAltShiftT | CtrlAltShiftT |
| Extract variable | OptionCmdV | CtrlAltV | CtrlAltV |
| Extract method | OptionCmdM | CtrlAltM | CtrlAltM |
| Inline | OptionCmdN | CtrlAltN | CtrlAltN |
Search
5 shortcuts| Action | Mac | Windows | Linux |
|---|---|---|---|
| Find in the file | CmdF | CtrlF | CtrlF |
| Replace in the file | CmdR | CtrlR | CtrlR |
| Next occurrence | CmdG | F3 | F3 |
| Find in files | ShiftCmdF | CtrlShiftF | CtrlShiftF |
| Replace in files | ShiftCmdR | CtrlShiftR | CtrlShiftR |
Run and debug
7 shortcuts| Action | Mac | Windows | Linux |
|---|---|---|---|
| Run | CtrlR | ShiftF10 | ShiftF10 |
| Debug | CtrlD | ShiftF9 | ShiftF9 |
| Toggle a breakpoint | CmdF8 | CtrlF8 | CtrlF8 |
| Step over | F8 | F8 | F8 |
| Step into | F7 | F7 | F7 |
| Step out | ShiftF8 | ShiftF8 | ShiftF8 |
| Resume the program | OptionCmdR | F9 | F9 |
Tool windows and VCS
8 shortcuts| Action | Mac | Windows | Linux |
|---|---|---|---|
| Project tool window | Cmd1 | Alt1 | Alt1 |
| Terminal | OptionF12 | AltF12 | AltF12 |
| Hide all tool windows | ShiftCmdF12 | CtrlShiftF12 | CtrlShiftF12 |
| Close the editor tab | CmdW | CtrlF4 | CtrlF4 |
| Commit | CmdK | CtrlK | CtrlK |
| Push | ShiftCmdK | CtrlShiftK | CtrlShiftK |
| Update the project (pull) | CmdT | CtrlT | CtrlT |
| Settings | Cmd, | CtrlAltS | CtrlAltS |
No shortcuts match. Try fewer words, the key names only, or search every app.
Show the key map: which keys IntelliJ uses mostDarker orange = used by more shortcuts
IntelliJ editing shortcuts: format code, comment, delete and move lines
- Comment with block commentMacOptionCmd/WindowsCtrlShift/LinuxCtrlShift/
- Optimize importsMacCtrlOptionOWindowsCtrlAltOLinuxCtrlAltO
- Delete the lineMacCmdBackspaceWindowsCtrlYLinuxCtrlY
- Move the line upMacOptionShift↑WindowsAltShift↑LinuxAltShift↑
- Move the line downMacOptionShift↓WindowsAltShift↓LinuxAltShift↓
- Move the statement upMacShiftCmd↑WindowsCtrlShift↑LinuxCtrlShift↑
- Move the statement downMacShiftCmd↓WindowsCtrlShift↓LinuxCtrlShift↓
- Extend the selectionMacOption↑WindowsCtrlWLinuxCtrlW
- Shrink the selectionMacOption↓WindowsCtrlShiftWLinuxCtrlShiftW
- Add the next occurrenceMacCtrlGWindowsAltJLinuxAltJ
- Select all occurrencesMacCtrlCmdGWindowsCtrlAltShiftJLinuxCtrlAltShiftJ
- Expand or collapse a blockMacCmd=orCmd-WindowsCtrl=orCtrl-LinuxCtrl=orCtrl-
- Surround withMacOptionCmdTWindowsCtrlAltTLinuxCtrlAltT
- System.out.println and main
- Type sout and press Tab for System.out.println(), and psvm (or main) then Tab for a main method. These are live templates, listed in Settings > Editor > Live Templates.
- Getters and setters
- Alt+Insert (Cmd+N on Mac) opens Generate, which writes constructors, getters, setters, equals and toString.
- Edit several lines at once
- Alt+Shift+click adds a caret, and Alt+Shift+Insert switches to column selection.
- Uppercase and collapse all
- Ctrl+Shift+U (Cmd+Shift+U) toggles the case of the selection; Ctrl+Shift+Minus (Cmd+Shift+Minus) folds every block in the file.
Code completion, quick fixes and refactoring in IntelliJ
- Smart code completionMacCtrlShiftSpaceWindowsCtrlShiftSpaceLinuxCtrlShiftSpace
- Parameter infoMacCmdPWindowsCtrlPLinuxCtrlP
- Quick documentationMacF1WindowsCtrlQLinuxCtrlQ
- Refactor This menuMacCtrlTWindowsCtrlAltShiftTLinuxCtrlAltShiftT
- Extract variableMacOptionCmdVWindowsCtrlAltVLinuxCtrlAltV
- Extract methodMacOptionCmdMWindowsCtrlAltMLinuxCtrlAltM
- InlineMacOptionCmdNWindowsCtrlAltNLinuxCtrlAltN
- Import classes
- Alt+Enter on a red class name imports it. To import as you type, turn on Add unambiguous imports on the fly in Settings > Editor > General > Auto Import.
Run, debug and breakpoint shortcuts in IntelliJ
- Step intoMacF7WindowsF7LinuxF7
- Step outMacShiftF8WindowsShiftF8LinuxShiftF8
- Resume the programMacOptionCmdRWindowsF9LinuxF9
- PushMacShiftCmdKWindowsCtrlShiftKLinuxCtrlShiftK
- Update the project (pull)MacCmdTWindowsCtrlTLinuxCtrlT
- TerminalMacOptionF12WindowsAltF12LinuxAltF12
- Hide all tool windowsMacShiftCmdF12WindowsCtrlShiftF12LinuxCtrlShiftF12
- Close the editor tabMacCmdWWindowsCtrlF4LinuxCtrlF4
- Project tool windowMacCmd1WindowsAlt1LinuxAlt1
- Remove all breakpoints
- Ctrl+Shift+F8 (Cmd+Shift+F8) opens the Breakpoints dialog: select them all and press Delete.
Change, reset or switch the IntelliJ IDEA keymap
Every IntelliJ IDEA shortcut is listed in Settings > Keymap (Ctrl+Alt+S, or Cmd+Comma on Mac), where you can search by action name or by pressing the keys.
- Eclipse, Visual Studio or VS Code keys
- The keymap menu at the top switches the whole set to Eclipse, Visual Studio, VS Code or Emacs keys, so you can keep the shortcuts you already know.
- Change one shortcut
- Right-click an action, choose Add Keyboard Shortcut and press the keys; the dialog warns when they are already used.
- Reset
- Choose the default keymap again, or open the ⚙ next to a changed keymap and pick Restore Defaults.
IntelliJ keyboard shortcuts: questions
- What is Search Everywhere in IntelliJ?
- Press Shift twice to search classes, files, symbols, actions and settings from one box.
- Do these shortcuts work in PyCharm and WebStorm?
- Yes. All JetBrains IDEs use the same default keymap, so these keys work in PyCharm, WebStorm, PhpStorm, GoLand, Rider and the rest.
- Why are IntelliJ keyboard shortcuts not working?
- Your system may use the same keys first: on Ubuntu, Ctrl+Alt+arrow keys switch workspaces, and on a Mac some F-keys control Mission Control. Free them in the system settings, or change the IntelliJ keymap. Also check the keymap has not been switched to another set.
- How do I learn IntelliJ shortcuts faster?
- Press Ctrl+Shift+A (Cmd+Shift+A) and type an action to see its shortcut, or install the Key Promoter X plugin, which shows the shortcut each time you use the mouse for an action.
These are the default key bindings in IntelliJ IDEA 2025.3, as published by JetBrains. Shortcuts that need an extension, an add-in or a changed keymap are left out. Where two combinations do the same thing, both are shown.
Single-system lists: IntelliJ keyboard shortcuts for Mac, IntelliJ keyboard shortcuts for Windows, IntelliJ keyboard shortcuts for Linux.
Each shortcut has its own page with the keys for every system, related shortcuts and the same action in other apps. The printable cheat sheet fits the whole list on one or two pages.