IntelliJ IDEA keyboard shortcuts

IntelliJ IDEA is JetBrains' flagship IDE for Java, Kotlin, and JVM development, famous for deep code intelligence and powerful refactorings. JetBrains designed it to be driven almost entirely from the keyboard. Mastering its shortcuts is the difference between using IntelliJ and merely opening it. This cheat sheet covers 79 default shortcuts for Windows and Mac.

General

Search EverywhereDouble ShiftDouble Shift
Find ActionCtrl+Shift+ACmd+Shift+A
Show intention actions / quick fixesAlt+EnterOption+Enter
Open SettingsCtrl+Alt+SCmd+,
Open Project StructureCtrl+Alt+Shift+SCmd+;
Generate code (getters, constructors, ...)Alt+InsertCmd+N
Paste from clipboard historyCtrl+Shift+VCmd+Shift+V

Editing

Duplicate line or selectionCtrl+DCmd+D
Delete lineCtrl+YCmd+Backspace
Toggle line commentCtrl+/Cmd+/
Toggle block commentCtrl+Shift+/Cmd+Option+/
Move line up/downShift+Alt+Up/DownShift+Option+Up/Down
Move statement up/downCtrl+Shift+Up/DownCmd+Shift+Up/Down
Reformat codeCtrl+Alt+LCmd+Option+L
Optimize importsCtrl+Alt+OCtrl+Option+O
Join linesCtrl+Shift+JCtrl+Shift+J
Toggle case of selectionCtrl+Shift+UCmd+Shift+U
Extend selectionCtrl+WOption+Up
Shrink selectionCtrl+Shift+WOption+Down
UndoCtrl+ZCmd+Z
RedoCtrl+Shift+ZCmd+Shift+Z

Code Completion & Info

Basic code completionCtrl+SpaceCtrl+Space
Smart (type-matching) completionCtrl+Shift+SpaceCtrl+Shift+Space
Parameter infoCtrl+PCmd+P
Quick documentationCtrl+QF1
Quick definition popupCtrl+Shift+ICmd+Y
Surround with (if, try, ...)Ctrl+Alt+TCmd+Option+T
Insert live templateCtrl+JCmd+J

Navigation

Go to classCtrl+NCmd+O
Go to fileCtrl+Shift+NCmd+Shift+O
Go to symbolCtrl+Alt+Shift+NCmd+Option+O
Go to lineCtrl+GCmd+L
Go to declaration / usagesCtrl+BCmd+B
Go to implementationCtrl+Alt+BCmd+Option+B
Go to super method / classCtrl+UCmd+U
Find usagesAlt+F7Option+F7
File structure popupCtrl+F12Cmd+F12
Recent filesCtrl+ECmd+E
Recent locationsCtrl+Shift+ECmd+Shift+E
Navigate backCtrl+Alt+LeftCmd+[
Navigate forwardCtrl+Alt+RightCmd+]
Next error / warningF2F2
Previous error / warningShift+F2Shift+F2

Refactoring

RenameShift+F6Shift+F6
Refactor This menuCtrl+Alt+Shift+TCtrl+T
Extract methodCtrl+Alt+MCmd+Option+M
Extract variableCtrl+Alt+VCmd+Option+V
Extract fieldCtrl+Alt+FCmd+Option+F
Extract constantCtrl+Alt+CCmd+Option+C
Extract parameterCtrl+Alt+PCmd+Option+P
MoveF6F6
CopyF5F5

Search & Replace

Find in fileCtrl+FCmd+F
Replace in fileCtrl+RCmd+R
Find in files (project-wide)Ctrl+Shift+FCmd+Shift+F
Replace in files (project-wide)Ctrl+Shift+RCmd+Shift+R
Find next occurrenceF3Cmd+G
Find previous occurrenceShift+F3Cmd+Shift+G

Multi-Cursor

Add selection for next occurrenceAlt+JCtrl+G
Unselect last occurrenceShift+Alt+JCtrl+Shift+G
Select all occurrencesCtrl+Alt+Shift+JCtrl+Cmd+G
Add cursor at click positionShift+Alt+ClickShift+Option+Click

Run & Debug

RunShift+F10Ctrl+R
DebugShift+F9Ctrl+D
StopCtrl+F2Cmd+F2
Toggle breakpointCtrl+F8Cmd+F8
Step overF8F8
Step intoF7F7
Step outShift+F8Shift+F8
Resume programF9Cmd+Option+R
Evaluate expressionAlt+F8Option+F8

Version Control

Commit changesCtrl+KCmd+K
Push commitsCtrl+Shift+KCmd+Shift+K
VCS operations popupAlt+`Ctrl+V

Tool Windows

Project tool windowAlt+1Cmd+1
Terminal tool windowAlt+F12Option+F12
Hide active tool windowShift+EscShift+Esc
Hide all tool windowsCtrl+Shift+F12Cmd+Shift+F12
Return focus to editorEscEsc

Put your top IntelliJ IDEA shortcuts on real keys

The five IntelliJ IDEA actions most worth binding to a physical macropad key:

Alt+EnterOption+Enter Show intention actions / quick fixes The universal fix-it key in IntelliJ; pressed constantly all day.
Ctrl+Alt+LCmd+Option+L Reformat code One tap keeps every file styled before commits and reviews.
Shift+F6Shift+F6 Rename The most-used refactoring; a dedicated key removes friction from renaming safely.
Alt+F7Option+F7 Find usages Understanding where code is used is the core of navigating a large codebase.
Shift+F10Ctrl+R Run Re-running the current configuration is the tightest loop in development.

I hand-build small-batch programmable macropads (QMK/VIA) in Barcelona. One press, any shortcut, any app.

See the macropads

IntelliJ IDEA shortcut FAQs

What is the most useful shortcut in IntelliJ IDEA?
Double Shift (Search Everywhere) and Ctrl+Shift+A / Cmd+Shift+A (Find Action). Together they let you reach any class, file, symbol, setting, or command without touching the mouse.
How do I see all keyboard shortcuts in IntelliJ IDEA?
Open Settings (Ctrl+Alt+S on Windows, Cmd+, on Mac) and go to Keymap. You can search commands, view their bindings, and remap anything. JetBrains also publishes a printable default keymap PDF under Help.
Why are IntelliJ shortcuts different on Mac and Windows?
IntelliJ ships separate default keymaps per OS: 'Windows' and 'macOS'. The macOS keymap leans on Cmd and Option to match platform conventions, so many chords differ from Windows beyond a simple Ctrl-to-Cmd swap.
What does Alt+Enter do in IntelliJ IDEA?
Alt+Enter (Option+Enter on Mac) shows intention actions and quick fixes for the code under the caret: fixing errors, adding imports, converting code, and dozens of context-aware suggestions.
How do I format code in IntelliJ IDEA?
Press Ctrl+Alt+L on Windows or Cmd+Option+L on Mac to reformat the file or selection according to your code style settings. Ctrl+Alt+O (Ctrl+Option+O on Mac) optimizes imports.