There are few low-investment, yet incredibly high-gain, productivity hacks to supercharge your developer skills, such as learning a few keyboard shortcuts. If you’re like me, you might’ve thought that starting with your favorite IDE’s typical keyboard shortcut reference documentation might be an excellent place to start… that is, until you open it up and feel your head start to spin:
Thankfully, there are only a couple of challenges you’ll need to overcome to learn keyboard shortcuts more effectively.
Challenge #1: There are so many!! Where to start? 🤷🏽♂️
Pair programming
Arguably, one of the easiest ways to learn keyboard shortcuts (among other things!) is through pair programming.
Regardless of experience level, chances are both engineers already know a few shortcuts. For example, if you’re pairing, and your pair uses a shortcut you don’t know, you could stop and ask: “How did you do that?” If you don’t want to interrupt the “flow” of your pairing session, jot a note down on a sticky and ask during your next break.
Or better yet, make it easier for you to discern what keyboard shortcuts are being used by installing a plugin such as Presentation Assistant (for JetBrains IDEs), which displays the keyboard shortcuts along the bottom of the screen as you type them.
Another tool to consider for macOS is KeyLimePie which displays keyboard shortcuts typed with any IDE or application.
Soloing
If you don’t have a pair to learn from, then you might need to do a little digging to find a good place to start. If you know what you want to do but don’t know how to do it, there are a few ways to discover these.
(I’m using a JetBrains IDE for these examples, however many of these tips apply across IDEs.)
Have the IDE teach you
There’s nothing like getting reprimanded when not doing something correctly to help you learn! 😅 Yet another excellent example of feedback!
Plugins like Key Promoter X will let you know each time you use the mouse for an action that has a corresponding keyboard shortcut.
And as if scolding you each time wasn’t enough, it keeps track of how many times you’ve made a mistake, so that you can feel even more guilty.
Dig through menus
Have an idea of what you want to do but aren’t sure what the shortcut is? With most IDEs, there are a few ways you can go digging for this information, the first of which is the menus.
JetBrians’ menus, in particular, are intuitively organized. Whether it’s navigation, code, refactoring, or any other topic, a simple peek at the menu shows the commands with their respective keyboard shortcut right next to them.
Search all
Another approach specific to JetBrains is their handy “search all” feature. Double-tap the shift key in any Jetbrains IDE to show a list of everything the IDE has. Options here include commands with keyboard shortcuts, IDE settings, and all sorts of other goodies.
Keymap settings
Accessing the preferences (⌘ + ,
) and selecting Keymap
displays the complete list. Conveniently, you can search by title or by keystroke as well. IntelliJ will also warn you of duplicate mappings.
Challenge #2: Remembering them
Step #1: Put it in view
When I first joined Pivotal Labs (now Tanzu Labs), the idea of using sticky notes to the extent that they do just wasn’t natural to me (nowadays it seems their reputation proceeds them 😂). However, I saw these experienced practitioners using sticky notes for everything and found this very inspiring! So much so that I ended up ditching my Moleskin for a sharpie and stack of stickies.
Therefore, when I struggled to remember keyboard shortcuts, I started to write them down on a sticky note and stick it on my monitor.
Anytime I forget, it just takes a glance down to jog my mind.
Step #2: Make a point to practice
When learning a new command or keyboard shortcut, I’ll go out of my way to try it a few times to get the feel of it. You could compare this to increasing your vocabulary when studying a new language: the more times you recall it with high accuracy, the longer you can go without quizzing yourself. When learning a new shortcut for the first time, practice it a few times. Increase your awareness and be deliberate to try out your new skill. After several days, it should start to sink in.
Step #3: Removing the guard rails
Toss the sticky note into the trash before you feel comfortable with your new skill. Or better yet, replace it with a new one.
If you find yourself struggling to remember several shortcuts, make a cheat sheet and put them all on a single sticky note.
If you added a sticky note to your monitor for even just one new keyboard shortcut each day, you’d be surprised at how quickly these add up!
BONUS: Task Switching
Having been initially most comfortable with Xcode, I was admittedly hesitant about learning a new IDE, afraid that my brain would not be able to tell them apart. However, after learning how to navigate IntelliJ on macOS effectively, I gained additional confidence.
However, at one point, I found myself assisting with a workshop held outside my company’s office in an external classroom equipped with only Windows machines. Using IntelliJ, my fingers instinctively tried the familiar macOS keyboard shortcuts. Simply switching the command key to the control key got me part of the way there, but alas, many of them were different.
Whether switching IDEs or OSs, using the “sticky note” method mentioned above, I was surprised at how quickly my brain and fingers could adapt.
I like to compare this to renting a car. When you first sit in a rental car, most aspects of your environment are familiar. However, there might be some notable differences. For example, whether the vehicle is an automatic or manual transmission or if you are traveling outside your native country, you may find yourself driving while sitting on the car’s left-hand side or the right-hand side. While at first uncomfortable, once you’ve acquired the skill, these cues are enough to switch your brain to the right setting for the action you’re about to take. Likewise, task-switching from one OS to another or one IDE to another provides a similar cue to help you switch to the proper keyboard shortcut settings in your mind.
Practice most certainly helps, too!
Further Personalization
Sometimes there aren’t keyboard shortcuts for aspects of the IDE that I want further control over. But, particularly for JetBrains, I have a few favorites that I find to be productivity boosters that I always tend to use.
If you’re pair programming, talk this through with your pair to ensure that you don’t have any keyboard shortcut conflicts between the two of you. Ideally, try to find an agreement on a keymap within the team of engineers who are pairing, and maybe take advantage of JetBrain’s feature for sharing these settings across machines.
Wrapping Up
It won’t take long until you feel increased productivity after learning even just a few keyboard shortcuts. You can make this process more effective by:
- Learning new shortcuts through pair programming or installing a plugin to remind you when you miss one
- Writing new keyboard shortcuts down on sticky notes and putting them into easy view
- Practicing these shortcuts and refreshing your sticky notes regularly
Do you have any other helpful tips for learning keyboard shortcuts? Let me know!