IntelliJ IDEA Keyboard Shortcuts
IntelliJ IDEA's shortcuts are denser and more refactoring-focused than a general text editor's, reflecting its identity as a full IDE built around deep code understanding rather than just text manipulation. Because IntelliJ's keymap is shared as a base across the whole JetBrains product family (PyCharm, WebStorm, Android Studio, and others all use closely related defaults), learning IntelliJ's shortcuts pays off across several other tools at once, which isn't true to the same degree for most editor comparisons on this site. Live Templates, short abbreviations that expand into common code patterns (typing 'psvm' and pressing Tab generates a full public static void main method), speed up boilerplate-heavy code in a way that goes beyond simple autocomplete, and IntelliJ ships with an extensive built-in set while also letting developers define their own custom templates for project-specific patterns. Because IntelliJ performs continuous background code analysis rather than only checking on save or build, many of its most valuable navigation and refactoring shortcuts rely on that always-current semantic index, which is part of why the IDE's initial project indexing on first open can take noticeably longer than a simpler text editor needs before becoming fully responsive. IntelliJ IDEA's breakpoint properties popup and its Extract Method refactor both lean on Java's specific type system and exception model in ways that genuinely differ from the equivalent tools in PyCharm or other JetBrains IDEs, since Extract Method here has to correctly infer a static return type and enumerate checked exceptions that must be declared or caught, a class of static analysis problem that simply doesn't exist in a dynamically typed language.
Navigation Search
| Action | Windows | Mac | Description |
|---|---|---|---|
| Search Everywhere | Double Shift | Double Shift | Two quick taps of Shift opens one search box that simultaneously covers files, classes, symbols, and every IDE action IntelliJ knows about, effectively merging what other editors split into a separate quick-open and command palette. |
| Go to Class | Ctrl+N | Cmd+O | Jumps directly to a class definition by typing its name, with fuzzy matching supporting camelCase abbreviations — typing 'UC' can match 'UserController' by matching capital letters specifically. |
| Go to Declaration/Definition | Ctrl+B | Cmd+B | Takes you to wherever the symbol under the cursor was originally declared, powered entirely by IntelliJ's own indexing and static analysis engine rather than an external language server the way many lighter editors work. |
| Find Usages | Alt+F7 | Option+F7 | Finds every place in the project that references the symbol under the cursor, opening a dedicated results panel — essential before renaming or removing anything to understand its actual blast radius. |
| View recent files | Ctrl+E | Cmd+E | Opens a popup list of recently opened files, faster than Search Everywhere when you know you just had the file open a few minutes ago. |
Refactoring
| Action | Windows | Mac | Description |
|---|---|---|---|
| Rename symbol (refactor) | Shift+F6 | Shift+F6 | Renames the symbol under the cursor project-wide, updating every genuine reference based on IntelliJ's semantic understanding of the code rather than blind text matching. |
| Extract Variable | Ctrl+Alt+V | Cmd+Option+V | Extracts the selected expression into a new local variable, automatically inferring a reasonable type and prompting for a name. |
| Extract Method | Ctrl+Alt+M | Cmd+Option+M | Lifts the highlighted code out into a freshly created method, working out the required parameters and return value automatically by tracing which variables the selected code reads from and writes to. |
| Reformat code | Ctrl+Alt+L | Cmd+Option+L | Runs IntelliJ's formatter over the selection, or the whole file if nothing is highlighted, snapping indentation, spacing, and line breaks into line with whatever code style scheme the project has configured under Settings. |
| Optimize imports | Ctrl+Alt+O | Cmd+Option+O | Strips out import statements nothing in the file actually references and reshuffles the survivors into the order the project's conventions expect, a habit many teams pair with Reformat Code right before committing. |
| Expand a Live Template abbreviation | Type abbreviation + Tab | Type abbreviation + Tab | Expands a short typed abbreviation (like 'psvm') into a common code pattern such as a full method signature, going beyond simple autocomplete for genuinely boilerplate-heavy code structures. |
| Surround selection with code construct | Ctrl+Alt+T | Cmd+Option+T | Wraps the selected code in a chosen construct (if statement, try/catch, for loop) from a quick picker, faster than manually typing the wrapping structure and correctly re-indenting the selection yourself. |
| Generate code (constructors, getters/setters) | Alt+Insert | Cmd+N | Opens a menu for generating common boilerplate code like constructors, getters and setters, or equals/hashCode implementations based on the current class's fields. |
| Toggle breakpoint | Ctrl+F8 | Cmd+F8 | Sets or removes a line breakpoint in the gutter; right-clicking an existing breakpoint opens IntelliJ's breakpoint properties popup supporting conditional expressions, exception breakpoints tied to Java's own exception class hierarchy, and field watchpoints that pause on read or write access to a specific class field, a Java-specific breakpoint type without a direct equivalent in most other language IDEs. |
| Evaluate expression during debug session | Alt+F8 | Option+F8 | Opens a dialog for evaluating any Java expression against the current paused debug session's live variable scope, including calling methods on live objects, useful for probing object state without adding a temporary log statement. |
| Open Refactor This menu | Ctrl+Alt+Shift+T | Ctrl+T | Opens a context-aware list of every applicable refactoring for the current selection, including Extract Method, which in Java specifically infers the method's return type, checked exceptions to declare, and access modifier from static analysis of the extracted code block, with a live diff preview before committing. |
Frequently Asked Questions
Why does Double Shift sometimes not register as Search Everywhere?
This shortcut requires two quick presses of the Shift key within a short time window — pressing it too slowly registers as two separate, unrelated Shift presses rather than the combined trigger. If it's unreliable, Search Everywhere is also accessible by clicking the magnifying glass icon, and the timing threshold can sometimes be adjusted in keymap-related settings depending on your IDE version.
Is Find Usages the same as a project-wide text search?
No — Find Usages (Alt+F7 / Option+F7) uses IntelliJ's semantic understanding of the code to find genuine references to the specific symbol under the cursor, correctly distinguishing between, say, a variable named 'count' in one function versus an unrelated variable with the same name elsewhere. A plain text search would match both indiscriminately, which is exactly the kind of false-positive problem semantic search avoids.
Do these shortcuts work the same in PyCharm and other JetBrains IDEs?
Largely yes — JetBrains maintains a shared base keymap across its product family, so muscle memory built in IntelliJ IDEA transfers well to PyCharm, WebStorm, Android Studio, and others. Language-specific refactorings naturally differ (Python doesn't have the same extract-interface options Java does, for instance), but the core navigation and general refactoring shortcuts remain consistent across the family.
What are Live Templates, and how are they different from normal autocomplete?
Live Templates expand a short typed abbreviation into a larger, structured code pattern — typing 'psvm' and pressing Tab generates a complete public static void main method signature, for instance — which goes beyond simple word-completion autocomplete since it inserts a whole multi-part structure rather than just finishing a single identifier.
Why does IntelliJ take longer to open a project for the first time than a simple text editor would?
That first-open delay is IntelliJ building a semantic index of every class, symbol, and reference in your project, which is what makes shortcuts like Go to Declaration or Find Usages actually work correctly rather than just doing a dumb text search. A plain text editor skips this step entirely because it has no such understanding to build, which is exactly why it opens instantly and IntelliJ doesn't.
Can I generate a constructor or getters and setters automatically instead of typing them by hand?
Yes, the Generate code menu can create constructors, getters and setters, and other common boilerplate directly from a class's existing fields, saving considerable manual typing for the kind of repetitive structural code Java classes often require.
How does IntelliJ's breakpoint system differ across the JetBrains IDE family for different languages?
The core breakpoint mechanism (line, conditional, exception-based) is shared across JetBrains IDEs, but the specific breakpoint types available reflect each language's own runtime model — IntelliJ IDEA's Java exception breakpoints hook into Java's checked and unchecked exception hierarchy specifically, while a field watchpoint pausing on read or write access to a class field is a distinctly Java/JVM-flavored debugging feature that doesn't translate identically into a dynamically typed language like Python in PyCharm.