Using keyboard shortcuts while writing code helps you speed up your work because as developers you will be majorly using keyboard. So doing most of the stuffs using keyboard helps you reduce switching between mouse and keyboard which takes more time comparatively. The only thing is that you have to do is to memorize and keep on using the shortcuts to use them effectively.
Here are some of the keymaps that I often use in Android Studio. These shortcuts are tested in Android Studio Giraffe version 2022.3.1.
To search a file in the project.
To search for a class.
By default there will be code completion dropdown showing up automatically. But somtimes you might need to trigger the dropdown manually using the following keymap.
To get quick fix suggestions for an editor error/warning.
Press the following keys to display the generate dropdown menu to generate things like tests, equals and hashcode functions, etc.
Win: Ctrl+W to increment and Ctrl+Shift+W to decrement
To move a line or multiple lines of code, select them and then press.
If you want to move a single line, then you can move that without even selecting it.
You can move a block of code up or down logically based on it's position. For example, a line within a function can be moved within that function and not outside that, using the below keymap. Similarly, the whole function can be moved up or down, within or even outside the class. So the code can be moved without causing any syntax issues.
Similarly IntelliJ offers a lot of options to quickly perform refactoring. I suggest you to checkout
Refactor option from Actions menu (press Ctrl+Shift+A and type Refactor) to know about the different refactoring options and their shortcuts.
To have multiple cursors at multiple lines.
Win: Double tap Ctrl + Up/Down
Mac: Double tap Option + Up/Down
Allows you to select multiple occurences of a text to edit those occurences in one go. To do that select the text whose occurences you want to multi select, then press
Win: Alt+J to add occurences and Alt+Shift+J to remove occurences
Mac: Ctrl+G to add occurences and Ctrl+Shift+G to remove occurences
The keymaps provided above are not the exhaustive list. These are some of the keymaps I regularly use. To see all the different keymaps available, go to Settings -> Keymaps.
Start using these in your daily work. Soon you will memorize it.