whexy1999

CapsLock and Productivity

Whexy /
December 03, 2022
8 min read

The keyboard has a fundamental design fault that I can't tolerate: It puts

⇪ CapsLock
in the middle row. This key is almost useless because you can always use your left pinky finger to hold down
⇧ Shift
to type uppercase letters.

Think about this: your left pinky is the finger that moves most often using the QWERT keyboard. Almost all shortcut keys require the use of it. It has to move up and down to press

⌃ Ctrl
,
⇧ Shift
,
⌥ Option
, and
⌘ Cmd
. However, the most convenient key for it to press - in other words, the key that it can reach naturally without much effort - is
⇪ CapsLock
! The most useless key in the left half of the keyboard!

Your right pinky feels much more comfortable than your left pinky. The only thing it needs to do is to press

Return
. I mean, it's not fair! Your right pinky can do its important work without jumping around, while your left pinky is too busy finding the correct modifier key to press!

Some keyboard manufacturers want to solve this problem. For example, the famous HHKB keyboard replaces

⇪ CapsLock
with
⌃ Ctrl
. The CapsLock instead becomes a combination of Fn+Tab. According to the frequency of CapsLock usage, this is undoubtedly a good change.

But I don't like HHKB for the lack of function keys. As a keyboard designed for programmers, aren't F1-F12 essential for them too? Just imagine how many keys you must press to switch TTY in Linux.

I do prefer my "clicky" standard keyboard with brown switches. But it doesn't mean my left pinky finger has to suffer. Some changes to the

⇪ CapsLock
key can make it easier to use. For example, remap it to other modifier keys.

Remapping

Remapping a key is easy. There is software like Karabiner on macOS or KMonad on Linux to handle the annoying details. What matters is to design a shortcut system with keys that make sense.

Yes. A shortcut system must make sense. Otherwise, it's just a collection of random gorilla presses. Here is an example of a sensible shortcut system:

⌃ Ctrl
and
⌘ Cmd
are separate keys for different works in macOS. All the terminal stuff uses Control, which means you can press
⌃ Ctrl
C
to send SIGINT to a task to terminate it. At the same time,
⌘ Cmd
C
is used to copy the outputs to the clipboard. This design allows "copy" operations to use the same shortcut keys globally. In contrast, a bad design is that you have to use
⌃ Ctrl
⇧ Shift
C
to copy in a Linux terminal emulator, breaking global consistency.

A friend of mine used to interchange

⇪ CapsLock
and
Esc
. He was blindly enthusiastic about vim, and after a heated discussion, he recently upgraded to a more advanced keyboard diagram. When
⇪ CapsLock
is pressed alone, it acts like Esc. When the
⇪ CapsLock
key is pressed with another key, it works like Ctrl.

Hyper and Meh

I'm a vim user who only knows how to quit it (just kidding). In most cases, I use VSCode with a vim keymap binding. I'm not interested in making

⇪ CapsLock
another Ctrl. So I remap
⇪ CapsLock
to a complex combination of
⌃ Ctrl
⇧ Shift
⌥ Option
⌘ Cmd
. The modified key is the so-called Hyper key by the advanced users in the forum.

Why would I need a "Hyper" key anyway? That is because I'm a programmer who shamefully uses IDEs. They define so many keyboard shortcuts that I cannot avoid conflict with them when creating my own. So I decided to give my shortcuts a unique trigger. That is when the Hyper key comes in.

There is another key called Meh used by some advanced users as an addition to Hyper. Meh usually refers to combining

⌃ Ctrl
⇧ Shift
⌥ Option
. Guess which key I remapped for Meh? It's
Tab
!

So, you mapped your CapsLock to some weird modifier keys and wrote a whole blog about it? What's the point?

Yes, it may sound boring until I show you how amazing it works with my window manager.

Window Manager

I'm a proud user of window managers. Mainly, I use tiling window managers. A window manager (WM) is software that controls the placement and appearance of windows. Tiling window managers "tile" the windows so that none are overlapping. When there is only one window in the display, it takes up the whole screen. When you open another window, they will automatically share the screen in half and half.

I analyze my workflow regularly to increase my productivity. The most frequent scenario of my daily work is opening an editor and writing codes. About half the time, I open the browser to search for documentation. Then I switch between the editor and browser frequently to figure out why the code I copied from Stackoverflow doesn't work. About one-third of the time, I open a terminal to run tests.

As a result, in 80% of my work time, I need more than two windows open with no overlap. It can be challenging to find and manage these windows on a cluttered desktop. So I use a window manager to help me do that. I also try to avoid using the mouse, as having my hands on the keyboard helps me to type and check the code. So I need a shortcut to switch between windows quickly and precisely.

Note that

⌘ Cmd
Tab
(or
⌥ Option
Tab
for Windows users, I guess you guys are more familiar with the name "Alt") cannot count as "precisely" because I always get the wrong window on another virtual desktop with it. Instead, with the power of window managers, I use
Hyper
and
Meh
to switch between them.

Keyboard FunctionShortcuts
Hyper + HJKLfocuses on windows on the left, down, up, or right.
Meh + HJKLswaps the current window to the left, down, up, or right.
Hyper + 1-9switches between virtual desktop 1~9.
Meh + 1-9move the current window to virtual desktop 1~9.

Since the browser and terminal are so frequently used in my workflow, I created two shortcuts to open them.

Hyper
Return
creates a new terminal window, and
Hyper
\
opens a new Chrome window. I also have many shortcuts triggered by Hyper to create new ToDo lists, open Spotify, and turn on the bulb in my room.

Using the keyboard to control everything can significantly reduce the frequency of using the mouse, thus motivating you to become a keyboardist. Recall that my Hyper key is actually the

⇪ CapsLock
key on the keyboard. When swapping between code and terminal, I simply move my pinky finger left one key away from
A
while keeping my right hand still. Now my pinky and I are both happy with it.

When these shortcuts form muscle memory, it becomes so natural, precise, and fast that it's as if I'm using my mind to interact with the computer. I heard someone is working on window switching based on an attention mechanism (using a webcam to capture human eye movement). Until that happens, why not boost your productivity with the methods I described here?

© LICENSED UNDER CC BY-NC-SA 4.0