DEV Community

Cover image for In favor of a keyboard-first navigation
Henrique Ramos
Henrique Ramos

Posted on

In favor of a keyboard-first navigation

The year is 2014 and I was very excited to start my freshman year on the Technical School I got approved. I chose to do an IT course, since I wanted to make a game. However, things got different when I met my Programming Logic I teacher: Gilmar, a nostalgic man, who was in his mid 50s, and wanted to teach us how to program in the old fashioned way: Using C++, Borland's IDE (which we had to run on a Windows XP Virtual Machine) and save as much resources as possible.

Borland C++ Interface
Borland C++ (I really like that ncurses look though)

Nowadays, I rarely use C++, since I'm a front-end engineer, and never used XP again. But the old man also taught me not to be a "Windows Pilot". What does it mean? Well, according to him:

True programmers don't use a mouse.

While I don't think that's true, not using a mouse can be good for your productivity.

Why?

You must be asking yourself: "What difference does it make? This looks really dumb!", well, at first glance, it is. For those of you are dragging your cursor towards the X button right now, stick around because I'm about to change your mind.

Navigate Faster

One of the main advantages is that navigating on files, folders and applications can be way faster. You can close, undo, re-do, go up, down, select and a lot more in the blink of an eye. For instance, if you used the CTRL+F4 Hotkey, you could've closed this tab and wouldn't be reading so far (But I wouldn't tell you that before, of course).

Avoiding health issues

Repetitive Strain Injury is a common problem in today's world, specially for IT professionals. Clicking many times with your index or middle finger is bad for your tendons, and can lead to injuries that cause a lot of pain, affecting your productivity, hobbies and daily activities. When typing on a keyboard, you'll use most of your fingers, thus varying your movements.

How?

Adapting to a keyboard-first workflow isn't an easy task. Anyhow, there are some tools that can help you to achieve this goal.

Hotkeys

First things first: learn how to use hotkeys. Everybody knows how to close an application on windows by using ALT+F4, or change the focus through ALT+Tab. Windows, Chrome, IDEs and Social Media Platforms have a lot of keyboard shortcuts for navigation and editing. Twitter, for instance, has hotkeys to everything: From Writing a new Tweet with n, to navigating to someone's profile with g + u.

Twitter Keyboard shortcuts: <br>
n to Write a new tweet;<br>
l to Like a Tweet;<br>
r to Reply;<br>
t to Retweet;<br>
m to Direct message an account;<br>
u to Mute an account;<br>
b to Block an account;<br>
enter to Open tweet details;<br>
o to  Expand photo;<br>
/ to Search;<br>
Cmd + enter or ctrl + enter to Send a tweet;<br>
g + h to go to Home timeline;<br>
g + o to go to Moments;<br>
g + n to go to Notifications tab;<br>
g + r to go to Mentions;<br>
g + p to go to Profile;<br>
g + l to go to Likes tab;<br>
g + i to go to Lists tab;<br>
g + m to go to Direct messages;<br>
g + s to go to Settings and privacy;<br>
g + u to go to Go to someone’s profile.

Twitter Keyboard shortcuts

(Neo)Vim

Vim is a text editor created in 1991 that gives you superpowers. It has a lot of shortcuts, which can be combined to edit your files a hundred times faster. However, it has a very steep learning curve. Some tools try to make it easier to learn, like games and vimtutor, which is built into Vim itself (none of those makes it a piece of cake, though).

You can also add plugins to Vim. This helps you to customize its appearance (Like I did)and add features such as autocomplete, fuzzy finder, file tree searching and much more. Nowadays, a lot of people use Neovim, which is a refactor of that tool, aimed at maximizing extensibility. There's also VeoNim, which tries to bring VSCode extension support. Any of those are definitely worth a shot.

Customized Vim Setup

Vim with plugins and a nice terminal color scheme. Taken from r/unixporn.

Tiling Window Manager

A Window Manager is a software that controls the placement and appearance of windows in a Graphical User Interface. For example: Windows and OSX native WMs lets you draw a window above other, with some 3D and 2D effects, this is called a compositing window manager. While each type of Manager has its pros and cons, I'm here to talk in favor of the Tiling ones.

For those who use Linux and like ricing, a Tiling Window Manager is not something new. This tool organizes the screen into non-overlapping frames, which are evenly divided. It's odd in the beginning, but, once you get used to it, its keyboard-only navigation will give a big boost for your speed. Personally, I like BSPWM, but there are a lot of options out there: i3, awesomewm and herbstluftwm for Linux, AquaSnap and SplitView for Windows and Chunkwm and Amethyst on OSX.
My BSPWM setup

My BSPWM setup with SXHKD

Conclusion

I gotta admit, quitting my career as a "Windows Pilot" is no easy task! Sometimes, I use my mouse because it's faster than pressing Tab a hundred times to highlight an option and there are no shortcuts, or I'm using Illustrator and there's no keyboard-only navigation. Yet, being careful and curious enough to always search for a hotkey instead of dragging the cursor around really gave me a speed boost. You should definitely give it a try!

The cover image was made by Philipp Kühn, check it out on Dribbble

Top comments (0)