To be honest, I used to be quite a power mouse user. Looking back and trying to figure out why I got addicted, it probably happened when Microsoft released Word 6.0 with its twenty-some toolbars with thirty-some buttons in each toolbar. I didn't remember many shortcuts, except
ctrl+s, which I did learn and instantly became a full-stack Word guru in the eyes of toolbar-only users.
Ready to be inspired?
Thank you for signing up
Join our newsletter for expert tips and inspirational case studies
Your welcome email is on its way! You can pick the emails you’d like to receive by clicking the link to the Preference Centre.
Slowly, but inevitably, IntelliJ IDEA and Visual Studio replaced my command-line Turbo Pascal and Fortran compilers. Few years later, one nice person showed me ReSharper... Still, I'd rather made jokes about 3,721 IDE shortcuts and Spiderman skills to execute 9-fingers keyboard shortcut combinations, instead of learning one shortcut per week – and hence my right hand became a devoted Logitech docking station.
But the truth is, when we're coding, by switching between the keyboard and the mouse, we lose some time. It might not be a big number in terms of seconds, but over the course of the day it can add up to a significant sum. And there's another side effect – if you need mouse often, it's tempting to have several toolbars and nice gadget frames visible, which in turn decreases the available space for our core business, coding. To get rid of this bad habit, I recorded two videos, one performing some common coding tasks using a mouse, and the second with the keyboard only. In the videos below, you can see the result.
Part I - Programming With Mouse and Keyboard
Part II - Programming With Keyboard Only
To sum it up, mouseless programming took almost one minute less than programming with the mouse and the keyboard, which is around 15% improvement.
The comparison is of course not a precise scientific experiment. Some actions were slower with one scenario, some with another one, but overall they should have a more or less the same effect. I used only the standard IDE and ReSharper with the IntelliJ IDEA keyboard scheme, except moving an open document to a new vertical tab group. I use this action often, that's why I created a custom shortcut for it. I also take advantage of my custom File Template and two Live Templates, which I created in the ReSharper Template Explorer. I'll write more detailed about them in my next post – 'Setting up a productive programming environment'.
To eliminate or at least minimise the bad habit, you can use a simple healing method – a 10 to 15 minutes 'mouseless' session per day with these simple rules:
- Use only the keyboard.
- If you encounter a situation where you would usually use a mouse, search for a shortcut – in the IDE itself or on the internet, with a side-effect of getting accustomed with your default internet browser's shortcuts.
- If you cannot find appropriate shortcut in approx. 3 minutes, use the mouse to continue.
It could be a bit stressful in the beginning, sometimes you might have to even hide the mouse in a drawer to keep the discipline. But it gets better after each session, as you memorise new keyboard shortcuts and the mouse gradually becomes more and more obsolete, while productivity increases. Several tools can help finding a substitute for the mouse clicks. For example, Java developers have Key Promoter, .NET developers might take a look at Presentation Assistant etc.
It should not take you long to be able to use your favourite IDE in the full-screen mode, without any toolbars, focusing solely on coding. Moreover, if you are used to handling source control actions through visual dialogs, you might find out it's much faster to use command line tools (e.g. Git Bash instead of the GitHub extension). Switching back to the normal IDE view will become a very rare event, reserved for slower operations or tasks that are too complex to be handled by the keyboard.
Additional resources for the most common shortcuts:
- Open, wiki-style Reference Database for Keyboard Shortcuts
- Visual Studio keyboard shortcuts
- IntelliJ ReSharper Default Keymap Visual Studio Scheme
- IntelliJ ReSharper Default Keymap IDEA Scheme
- IntelliJ IDEA Keymap Scheme
Many thanks to Sandro, Franzi, David, Mani, and Alessandro for suggestions and feedback for the blog post and videos.