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 Everywhere | Double ShiftDouble Shift |
| Find Action | Ctrl+Shift+ACmd+Shift+A |
| Show intention actions / quick fixes | Alt+EnterOption+Enter |
| Open Settings | Ctrl+Alt+SCmd+, |
| Open Project Structure | Ctrl+Alt+Shift+SCmd+; |
| Generate code (getters, constructors, ...) | Alt+InsertCmd+N |
| Paste from clipboard history | Ctrl+Shift+VCmd+Shift+V |
Editing
| Duplicate line or selection | Ctrl+DCmd+D |
| Delete line | Ctrl+YCmd+Backspace |
| Toggle line comment | Ctrl+/Cmd+/ |
| Toggle block comment | Ctrl+Shift+/Cmd+Option+/ |
| Move line up/down | Shift+Alt+Up/DownShift+Option+Up/Down |
| Move statement up/down | Ctrl+Shift+Up/DownCmd+Shift+Up/Down |
| Reformat code | Ctrl+Alt+LCmd+Option+L |
| Optimize imports | Ctrl+Alt+OCtrl+Option+O |
| Join lines | Ctrl+Shift+JCtrl+Shift+J |
| Toggle case of selection | Ctrl+Shift+UCmd+Shift+U |
| Extend selection | Ctrl+WOption+Up |
| Shrink selection | Ctrl+Shift+WOption+Down |
| Undo | Ctrl+ZCmd+Z |
| Redo | Ctrl+Shift+ZCmd+Shift+Z |
Code Completion & Info
| Basic code completion | Ctrl+SpaceCtrl+Space |
| Smart (type-matching) completion | Ctrl+Shift+SpaceCtrl+Shift+Space |
| Parameter info | Ctrl+PCmd+P |
| Quick documentation | Ctrl+QF1 |
| Quick definition popup | Ctrl+Shift+ICmd+Y |
| Surround with (if, try, ...) | Ctrl+Alt+TCmd+Option+T |
| Insert live template | Ctrl+JCmd+J |
Navigation
| Go to class | Ctrl+NCmd+O |
| Go to file | Ctrl+Shift+NCmd+Shift+O |
| Go to symbol | Ctrl+Alt+Shift+NCmd+Option+O |
| Go to line | Ctrl+GCmd+L |
| Go to declaration / usages | Ctrl+BCmd+B |
| Go to implementation | Ctrl+Alt+BCmd+Option+B |
| Go to super method / class | Ctrl+UCmd+U |
| Find usages | Alt+F7Option+F7 |
| File structure popup | Ctrl+F12Cmd+F12 |
| Recent files | Ctrl+ECmd+E |
| Recent locations | Ctrl+Shift+ECmd+Shift+E |
| Navigate back | Ctrl+Alt+LeftCmd+[ |
| Navigate forward | Ctrl+Alt+RightCmd+] |
| Next error / warning | F2F2 |
| Previous error / warning | Shift+F2Shift+F2 |
Refactoring
| Rename | Shift+F6Shift+F6 |
| Refactor This menu | Ctrl+Alt+Shift+TCtrl+T |
| Extract method | Ctrl+Alt+MCmd+Option+M |
| Extract variable | Ctrl+Alt+VCmd+Option+V |
| Extract field | Ctrl+Alt+FCmd+Option+F |
| Extract constant | Ctrl+Alt+CCmd+Option+C |
| Extract parameter | Ctrl+Alt+PCmd+Option+P |
| Move | F6F6 |
| Copy | F5F5 |
Search & Replace
| Find in file | Ctrl+FCmd+F |
| Replace in file | Ctrl+RCmd+R |
| Find in files (project-wide) | Ctrl+Shift+FCmd+Shift+F |
| Replace in files (project-wide) | Ctrl+Shift+RCmd+Shift+R |
| Find next occurrence | F3Cmd+G |
| Find previous occurrence | Shift+F3Cmd+Shift+G |
Multi-Cursor
| Add selection for next occurrence | Alt+JCtrl+G |
| Unselect last occurrence | Shift+Alt+JCtrl+Shift+G |
| Select all occurrences | Ctrl+Alt+Shift+JCtrl+Cmd+G |
| Add cursor at click position | Shift+Alt+ClickShift+Option+Click |
Run & Debug
| Run | Shift+F10Ctrl+R |
| Debug | Shift+F9Ctrl+D |
| Stop | Ctrl+F2Cmd+F2 |
| Toggle breakpoint | Ctrl+F8Cmd+F8 |
| Step over | F8F8 |
| Step into | F7F7 |
| Step out | Shift+F8Shift+F8 |
| Resume program | F9Cmd+Option+R |
| Evaluate expression | Alt+F8Option+F8 |
Version Control
| Commit changes | Ctrl+KCmd+K |
| Push commits | Ctrl+Shift+KCmd+Shift+K |
| VCS operations popup | Alt+`Ctrl+V |
Tool Windows
| Project tool window | Alt+1Cmd+1 |
| Terminal tool window | Alt+F12Option+F12 |
| Hide active tool window | Shift+EscShift+Esc |
| Hide all tool windows | Ctrl+Shift+F12Cmd+Shift+F12 |
| Return focus to editor | EscEsc |
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.
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.