
To put the focus back on the editor, press escape. You can navigate the tree using the arrow keys and search by typing. ⌘1 (MacOS) or Alt+1 (Windows/Linux) opens the project window and puts the focus in there. We don’t need the mouse to open tool windows either. Combine this with either Alt+Enter, to see all suggestions and pick one, or Shift+Alt+Enter to apply the first suggestion. We don’t want to use the mouse when navigating between errors and warnings in the editor, so use F2 to jump to the next error, warning or suggestion. We can even use Alt+Enter on code that doesn’t have an error, warning or suggestion: it will show us Intention Actions (one of my personal favourites is to add static imports) and Inspections that are enabled but not set to warn us. We can also use Alt and Enter where we see warnings and suggestions and we can choose to accept one of these suggestions. When we see an error in our code, if we place the cursor on the error and press Alt+Enter we get a list of suggested fixes for the problem.

This keyboard shortcut can be used to fix just about anything by showing us actions for the current context. There’s a video of all these shortcuts in action on the IntelliJ IDEA YouTube channel. Learning and practicing these shortcuts so they get loaded into our muscle memory can help us to stay in the state of flow. IntelliJ IDEA has keyboard shortcuts for most of its commands related to editing, navigation, refactoring, debugging, and pretty much everything else we might want to do regularly.
