IntelliJ IDEA Keyboard Shortcuts: Complete Guide for Windows, Mac & Linux (2026)
IntelliJ shortcuts (also called IntelliJ IDEA keyboard shortcuts or hotkeys) are key combinations that trigger commands in the IntelliJ IDEA IDE without using a menu or mouse. They cover every function in the IDE from editing and navigation to debugging, refactoring, and Git operations.
IntelliJ IDEA is the most widely used Java IDE in the world 41% of Java developers use it as their primary development environment, according to the JRebel Java Developer Productivity Report 2024. The reason developers stick with it comes down to one thing: speed. And speed in IntelliJ comes from keyboard shortcuts.
Mastering IntelliJ shortcuts can save a developer 30 or more minutes every single day time that adds up to over 120 hours per year. Every time you reach for your mouse to click a menu, you break your flow. Shortcuts keep your hands on the keyboard and your mind on the code.
All shortcuts are listed for Windows, Mac, and Linux.
The 15 Most Important IntelliJ Shortcuts (Start Here)
If you are new to IntelliJ IDEA, do not try to memorize all 150 shortcuts at once. Start with these 15. They cover 80% of what you will do every day as a developer and most professional IntelliJ users consider these non-negotiable.
| Action | Windows / Linux | Mac | Why it matters |
|---|---|---|---|
| Find Action (the most important shortcut) | Ctrl + Shift + A | Cmd + Shift + A | Searches every IntelliJ action by name if you forget any shortcut, use this |
| Smart code completion | Ctrl + Shift + Space | Cmd + Shift + Space | Context-aware completion, far more powerful than basic Tab completion |
| Reformat code | Ctrl + Alt + L | Cmd + Option + L | Instantly formats your entire file to match your code style settings |
| Go to class | Ctrl + N | Cmd + N | Jump to any class in your project by name faster than any file tree |
| Go to file | Ctrl + Shift + N | Cmd + Shift + N | Jump to any file in your project by name |
| Recent files | Ctrl + E | Cmd + E | Shows your recently opened files fastest way to switch between files |
| Rename (refactor) | Shift + F6 | Shift + F6 | Safely renames variables, methods, classes across your entire project |
| Show intentions / quick fix | Alt + Enter | Option + Return | The single most powerful key in IntelliJ fixes errors, suggests improvements |
| Duplicate line | Ctrl + D | Ctrl + D | Duplicates the current line or selection instantly |
| Delete line | Ctrl + Y | Cmd + Y | Deletes the entire current line without selecting it first |
| Comment / uncomment line | Ctrl + / | Cmd + / | Toggles line comment on the current line or selection |
| Expand / collapse code block | Ctrl + + / Ctrl + – | Cmd + + / Cmd + – | Fold and unfold methods, classes, and blocks |
| Toggle breakpoint | Ctrl + F8 | Cmd + F8 | Adds or removes a breakpoint on the current line during debugging |
| Find in path (global search) | Ctrl + Shift + F | Cmd + Shift + F | Searches across all files in your entire project |
| VCS operations popup | Alt + ` | Ctrl + V | Opens all Git/VCS actions in one popup commit, push, pull, diff |
Memorize Ctrl + Shift + A (Find Action) on day one. If you ever forget any other shortcut, type its name into Find Action and IntelliJ will show you both the command and its keyboard shortcut then you can learn it in context.
Editing Shortcuts
| Action | Windows / Linux | Mac |
|---|---|---|
| Basic code completion | Ctrl + Space | Cmd + Space |
| Complete statement | Ctrl + Shift + Enter | Cmd + Shift + Return |
| Parameter info | Ctrl + P | Cmd + P |
| Quick documentation | Ctrl + Q | Cmd + Q |
| Show error description | Ctrl + F1 | Cmd + F1 |
| Generate code | Alt + Insert | Option + Insert |
| Override methods | Ctrl + O | Cmd + O |
| Implement methods | Ctrl + I | Cmd + I |
| Surround with (if/else, try/catch) | Ctrl + Alt + T | Cmd + Option + T |
| Block comment / uncomment | Ctrl + Shift + / | Cmd + Shift + / |
| Extend selection | Ctrl + W | Cmd + W |
| Shrink selection | Ctrl + Shift + W | Cmd + Shift + W |
| Context info | Alt + Q | Option + Q |
| Optimize imports | Ctrl + Alt + O | Cmd + Option + O |
| Auto-indent lines | Ctrl + Alt + I | Cmd + Option + I |
| Indent selected lines | Tab | Tab |
| Unindent selected lines | Shift + Tab | Shift + Tab |
| Cut current line | Ctrl + X | Cmd + X |
| Copy current line | Ctrl + C | Cmd + C |
| Paste from clipboard | Ctrl + V | Cmd + V |
| Paste from history | Ctrl + Shift + V | Cmd + Shift + V |
| Smart line join | Ctrl + Shift + J | Cmd + Shift + J |
| Smart line split | Ctrl + Enter | Cmd + Return |
| Start new line | Shift + Enter | Shift + Return |
| Toggle case | Ctrl + Shift + U | Cmd + Shift + U |
| Select to code block end | Ctrl + Shift + ] | Cmd + Shift + ] |
| Select to code block start | Ctrl + Shift + [ | Cmd + Shift + [ |
| Delete to word end | Ctrl + Delete | Cmd + Delete |
| Delete to word start | Ctrl + Backspace | Cmd + Backspace |
| Collapse all blocks | Ctrl + Shift + − | Cmd + Shift + − |
| Expand all blocks | Ctrl + Shift + + | Cmd + Shift + + |
| Close active editor tab | Ctrl + F4 | Cmd + F4 |
| Find usages | Alt + F7 | Option + F7 |
| Find usages in file | Ctrl + F7 | Cmd + F7 |
| Highlight usages in file | Ctrl + Shift + F7 | Cmd + Shift + F7 |
| Show usages popup | Ctrl + Alt + F7 | Cmd + Option + F7 |
Refactoring Shortcuts
| Action | Windows / Linux | Mac |
|---|---|---|
| Refactor This (all options) | Ctrl + Alt + Shift + T | Ctrl + T |
| Rename | Shift + F6 | Shift + F6 |
| Change method signature | Ctrl + F6 | Cmd + F6 |
| Extract method | Ctrl + Alt + M | Cmd + Option + M |
| Extract variable | Ctrl + Alt + V | Cmd + Option + V |
| Extract constant | Ctrl + Alt + C | Cmd + Option + C |
| Extract field | Ctrl + Alt + F | Cmd + Option + F |
| Extract parameter | Ctrl + Alt + P | Cmd + Option + P |
| Inline variable / method | Ctrl + Alt + N | Cmd + Option + N |
| Move class or file | F6 | F6 |
| Copy class or file | F5 | F5 |
| Safe delete | Alt + Delete | Cmd + Delete |
Navigation Shortcuts
| Action | Windows / Linux | Mac |
|---|---|---|
| Go to symbol | Ctrl + Alt + Shift + N | Cmd + Option + Shift + N |
| Go to class | Ctrl + N | Cmd + N |
| Go to file | Ctrl + Shift + N | Cmd + Shift + N |
| Go to previous tool window | F12 | F12 |
| Go to editor | Esc | Esc |
| Hide active window | Shift + Esc | Shift + Esc |
| Go to line | Ctrl + G | Cmd + G |
| Recent files popup | Ctrl + E | Cmd + E |
| Navigate backward | Ctrl + Alt + Left | Cmd + Option + [ |
| Navigate forward | Ctrl + Alt + Right | Cmd + Option + ] |
| Last edit location | Ctrl + Shift + Backspace | Cmd + Shift + Backspace |
| Go to declaration | Ctrl + B | Cmd + B |
| Go to implementation | Ctrl + Alt + B | Cmd + Option + B |
| Quick definition lookup | Ctrl + Shift + I | Cmd + Shift + I |
| Go to type declaration | Ctrl + Shift + B | Cmd + Shift + B |
| Go to super-method | Ctrl + U | Cmd + U |
| Go to previous method | Alt + Up | Option + Up |
| Go to next method | Alt + Down | Option + Down |
| Move to code block end | Ctrl + ] | Cmd + ] |
| Move to code block start | Ctrl + [ | Cmd + [ |
| File structure popup | Ctrl + F12 | Cmd + F12 |
| Type hierarchy | Ctrl + H | Cmd + H |
| Method hierarchy | Ctrl + Shift + H | Cmd + Shift + H |
| Call hierarchy | Ctrl + Alt + H | Cmd + Option + H |
| Next highlighted error | F2 | F2 |
| Previous highlighted error | Shift + F2 | Shift + F2 |
| Toggle bookmark | F11 | F11 |
| Toggle mnemonic bookmark | Ctrl + F11 | Cmd + F11 |
| Show bookmarks | Shift + F11 | Shift + F11 |
| Show navigation bar | Alt + Home | Option + Home |
| Select in any view | Alt + F1 | Option + F1 |
Debugging Shortcuts
| Action | Windows / Linux | Mac |
|---|---|---|
| Step over | F8 | F8 |
| Step into | F7 | F7 |
| Smart step into | Shift + F7 | Shift + F7 |
| Step out | Shift + F8 | Shift + F8 |
| Run to cursor | Alt + F9 | Option + F9 |
| Evaluate expression | Alt + F8 | Option + F8 |
| Resume program | F9 | F9 |
| Toggle breakpoint | Ctrl + F8 | Cmd + F8 |
| View breakpoints | Ctrl + Shift + F8 | Cmd + Shift + F8 |
| Next error | F2 | F2 |
| Previous error | Shift + F2 | Shift + F2 |
Git / VCS Shortcuts
| Action | Windows / Linux | Mac |
|---|---|---|
| VCS Operations popup | Alt + ` | Ctrl + V |
| Commit changes | Ctrl + K | Cmd + K |
| Push to remote | Ctrl + Shift + K | Cmd + Shift + K |
| Update project (pull) | Ctrl + T | Cmd + T |
| View recent changes | Alt + Shift + C | Option + Shift + C |
| Rollback / revert changes | Ctrl + Alt + Z | Cmd + Option + Z |
Find & Replace Shortcuts
| Action | Windows / Linux | Mac |
|---|---|---|
| Find | Ctrl + F | Cmd + F |
| Find next | F3 | F3 |
| Find previous | Shift + F3 | Shift + F3 |
| Replace | Ctrl + R | Cmd + R |
| Find in path | Ctrl + Shift + F | Cmd + Shift + F |
| Replace in path | Ctrl + Shift + R | Cmd + Shift + R |
Compile & Run Shortcuts
| Action | Windows / Linux | Mac |
|---|---|---|
| Make project (compile) | Ctrl + F9 | Cmd + F9 |
| Compile selected file | Ctrl + Shift + F9 | Cmd + Shift + F9 |
| Run | Shift + F10 | Shift + F10 |
| Debug | Shift + F9 | Shift + F9 |
| Select config and run | Alt + Shift + F10 | Option + Shift + F10 |
| Select config and debug | Alt + Shift + F9 | Option + Shift + F9 |
| Run context configuration | Ctrl + Shift + F10 | Cmd + Shift + F10 |
How to Customize IntelliJ Shortcuts (Keymap Settings)
Every IntelliJ shortcut can be changed. If a shortcut conflicts with your OS, another application, or your muscle memory from a different IDE, you can reassign it in under a minute.
How to Change a Shortcut in IntelliJ IDEA (Step by Step)
Step 1: Open Settings
Press Ctrl + Alt + S (Windows/Linux) or Cmd + Option + S (Mac) to open the Settings dialog.
Step 2: Navigate to Keymap
In the left panel, click “Keymap”. You will see your current keymap (usually “Windows” or “macOS” depending on your OS).
Step 3: Find the action you want to change
Use the search box at the top of the Keymap panel. Type the name of the action for example, type “reformat” to find the Reformat Code action.
Step 4: Right-click the action and select “Add Keyboard Shortcut”
In the dialog that appears, press the key combination you want to assign. IntelliJ will warn you if that combination is already used by another action.
Step 5: Click OK and save
Your new shortcut is immediately active. IntelliJ saves it to a custom keymap file automatically.
How to Reset IntelliJ Shortcuts to Default
If your shortcuts get into a broken state, you can reset them:
- Go to Settings → Keymap (Ctrl + Alt + S → Keymap)
- Click the dropdown at the top that shows your current keymap name
- Select “Windows” (or “macOS”) from the predefined keymaps list
- Click OK
This restores all shortcuts to IntelliJ’s defaults for your operating system.
Frequently Asked Questions About IntelliJ Shortcuts
What is the most important IntelliJ shortcut to learn first?
The single most important IntelliJ shortcut is Ctrl + Shift + A (Windows/Linux) or Cmd + Shift + A (Mac) the Find Action shortcut. It lets you search for any IntelliJ command by name. If you forget any other shortcut, type its action name into Find Action and IntelliJ will show you both the command and its shortcut key.
How do I reformat code in IntelliJ?
To reformat code in IntelliJ, press Ctrl + Alt + L on Windows and Linux, or Cmd + Option + L on Mac. This instantly reformats the current file according to your code style settings. To reformat a specific selection only, select the code first, then press the same shortcut.
What is the shortcut to collapse code in IntelliJ?
To collapse (fold) a code block in IntelliJ:
- Windows / Linux: Ctrl + Minus (–)
- Mac: Cmd + Minus (–)
To collapse all code blocks at once:
- Windows / Linux: Ctrl + Shift + Minus (–)
- Mac: Cmd + Shift + Minus (–)
To expand a collapsed block, use Ctrl + Plus (+) on Windows/Linux or Cmd + Plus (+) on Mac.
How do I go to a specific line number in IntelliJ?
Press Ctrl + G on Windows and Linux, or Cmd + G on Mac. A dialog box will appear where you can type the line number you want to jump to. You can also type “line:column” (for example “142:8”) to jump to a specific line and column simultaneously.
How do I duplicate a line in IntelliJ?
Press Ctrl + D on Windows and Linux, or Cmd + D on Mac. This duplicates the current line and places the cursor on the duplicate. If you have a selection active, it duplicates the entire selection instead of just the line.
What is the shortcut to rename a variable in IntelliJ?
Press Shift + F6 on all platforms (Windows, Mac, and Linux). This opens IntelliJ’s rename refactoring dialog, which safely renames the variable, method, or class everywhere it is referenced across your entire project not just the current file.
How do I open the terminal in IntelliJ?
Press Alt + F12 on Windows and Linux, or Option + F12 on Mac. This opens the built-in terminal panel at the bottom of the IDE. Press the same shortcut again to hide it.
Are IntelliJ shortcuts the same on Windows and Mac?
Most IntelliJ shortcuts follow the same pattern with one substitution: Ctrl on Windows/Linux becomes Cmd on Mac, and Alt on Windows/Linux becomes Option on Mac. The function keys (F1–F12) are identical across all platforms. A small number of shortcuts differ entirely between platforms these are noted throughout this guide.
Can I use Eclipse shortcuts in IntelliJ?
Yes. IntelliJ IDEA includes a built-in Eclipse keymap. Go to Settings → Keymap (Ctrl + Alt + S) and select “Eclipse” from the
predefined keymaps dropdown. This maps the most common Eclipse shortcuts to their IntelliJ equivalents, making the transition from Eclipse to IntelliJ significantly easier.
How do I find all usages of a method or variable in IntelliJ?
Place your cursor on the method or variable name and press Alt + F7 on Windows/Linux, or Option + F7 on Mac. IntelliJ will show every usage across your entire project in the Find tool window at the bottom of the screen, organized by file and usage type.
Master IntelliJ Shortcuts and Code Like a Pro
Keyboard shortcuts are not just a convenience they are the difference between a developer who fights their IDE and one who flows through it. Every shortcut you internalize removes one more moment of friction from your day. Those moments add up to hours every week.
Here is the honest truth about learning IntelliJ shortcuts: you do not need to memorize all 150 at once. Nobody does. The developers who are most productive in IntelliJ did not sit down one day and study a list. They learned five shortcuts, used them until they became muscle memory, then picked up five more.
Start with the Top 15 shortcuts from this guide. Use them for one week. By day three, most of them will feel natural. By day seven, you will catch yourself reaching for the mouse less and less.
Then come back and pick up the refactoring shortcuts Ctrl + Alt + M to extract a method, Ctrl + Alt + V to extract a variable, Shift + F6 to rename anything safely. These three alone will change how you write and clean up code.
After that, the debugging shortcuts. Then the Git shortcuts. Build the habit one category at a time, and within 30 days you will be operating IntelliJ at a level that looks effortless to anyone watching.
READ NEXT:





