Journey of an aspiring software craftsman
Fingers on the home row - Mind on the problem - Craft at the workplace

27 October 2020 - Fingers on the Home Row

We interact with our tools through typing, pointing/clicking and shortcuts. Here’s a simple challenge: are you able to imagine what going keyboard-only looks like? Let’s confront.

There are things you don’t want to know you can do.

Robin McKinley, Sunshine

 

So let’s think together: What does going keyboard-only look like?

The Home Row

YourF and J keys are special. If you look closely at them, you should see some sort of markers.

Why?

Well, because if you are using a keyboard, you are supposed to have your index fingers placed on F and J in order to be able to reach all keys with the least effort.

It is the first thing that touch typists (people who can type without looking at their keyboard) learn, followed by learning which finger should go to which key.

home row

When you use your keyboard that way, you’ll notice that your fingers do all the work from muscle memory and your hands should almost not move.

Personally, I find that one key difference between using a mouse and using the keyboard is that:

Usually, I feel more proactive and in control with a keyboard whereas I feel more guided with a mouse.

 

Item selection, but without the mouse

Because our tools are suited to the mouse & keyboard paradigm, trying to select items without a mouse cannot feel natural.

Let me list 4 selection workflows you might find yourself using when going full-keyboard.

Fuzzy Finding

A fuzzy finder is a program that takes a list of strings as input, and allows you to select one or several of its items through fuzzy search.

What’s fuzzy search you ask?

Here’s a small showcase:

fuzzyfinder

You’ll see:

There are several fuzzy finders out there - I’m using fzf. This video goes more into details with how you can use that amazing utility:

Click-to-shortcut transformation

Sometimes you have to stick with a visual representation of things (web browsers, for instance). In that case you can use something like vimium - the hacker’s browser:

vimium

Pressing one key allows you to display all the links you could otherwise click on, and attach a shortcut that simulates a click.

More basic things

While the previous examples require some sort of program or script, other ways are out-of-the-box, such as global searching and good old autocompletion:

globalcommand

 

About the ergonomics of your keyboard…

The truth is, keyboards suffer from some design issues…

For this reason, I created the following remappings for myself using autohotkey (Windows only):

Original key Mapped to…
Esc CapsLock (pressed)
Ctrl CapsLock(held down)
Enter CapsLock+m
§ “focus my IDE’s window”
Tab CapsLock+i
Shift+Tab CapsLock+o
Backspace CapsLock+h
Delete CapsLock+l
Enter CapsLock+m
Up CapsLock+p
Down CapsLock+n
Left CapsLock+j
Right CapsLock+k
Home ^+j
End ^+k
AltGr+alphanumKey ^ + consonantLetter

I’m using a French azerty keyboard ; here’s the gist behind these mappings:

You can find my autohotkey script here!

Text edition

I’m dedicating next post for this topic, and most likely a series of other ones… The topic is vast, and it has one hell of a big name : vim - the ubiquitous text editor