I only uploaded this so that it may serve as inspiration. It is still being tweaked. It currently only supports Linux.
Touch typing on a standard keyboard is not a great experience. Your thumbs idle while your weakest finger contorts to reach keys like Esc and BkSp. Numbers and other common symbols require you to abandon a comfortable hand position entirely. Exotic keyboards can remedy all this, but lack portability.
Thumbledore and Handalf are keyboard layouts that works well for fancy keyboards with 2 or more thumb keys per hand, but that also fit broadly within the constraints of a laptop keyboard.
- Each finger travels one key at most. Your thumbs pick up the slack.
- Easy to remember. All symbols are accessible with just the normal Shift and AltGr modifiers. There is only one additional layer for navigation and function keys — and that's it.
- One-handed control. The number pad can be operated with just the right hand. Navigation keys and shortcuts like Ctrlc can be reached with just the left, freeing your hand for the mouse. Unfortunately, this also means that the layout is biased towards right-handed people.
- Graceful degradation. You can keep a somewhat consistent layout even when you're stuck on a mainstream keyboard. Only Multi and Shift are in a truly different spot.
- Incremental learning. You don't need to learn everything all at once. I've found the AltGr symbols to be the most ergonomically significant, so that is a great place to start.
- Regressions are avoided. When stuffing so much functionality in a limited space, it is inevitable that some key sequences will become hard to generate. However, care has been taken to make few assumptions about the programs you will be running. That is, all modifiers should still stack in an intuitive and consistent way, and no reasonable shortcut should be impossible or cumbersome to type.
- Good feeling. Muscle memory, simplicity, semantic clustering, and symmetry are all taken into consideration --- but above all, keys are placed in such a way that they feel good.
- No homerow mods. While typing at speed, keypresses will often overlap, which means that any attempt at overloading alpha keys must resort to timeouts. This introduces visual delay and can cause misfiring. There are ways to mitigate this and train yourself to work with it, but I have not made that sacrifice here.
- Overloading is used sparingly. Even on non-alpha keys,
overloading has the above downsides, albeit to a lesser degree.
Therefore, only one key has been overloaded: Esc
accesses a layer when held. This is considered safe because
Esc
tends to punctuate a keystroke and a misfire is not catastrophic. TheEsc
is only registered when the tap is short.
Are you currently using a Qwerty layout or similar? Then there isn't much of a barrier to entry: in the Thumbledore variant, all characters stay in the same place. The major addition is that the Level-3 symbols (accessed through AltGr) have been crammed full with numbers and the other ASCII symbols for which you would normally have had contort your hands.
-
BkSp takes the place of Caps, avoiding the huge move your pinky would have made.
-
Shift and AltGr are modifiers, but unlike Ctrl and Alt, they don't access shortcuts — they simply provide more symbols. To make for a more comfortable typing experience, these keys are made sticky (or oneshot). Instead of holding and consciously releasing them just before pressing the next unmodified key, you can just tap once and forget about it. MUch better!
-
You will often need a decimal point while typing numbers, but it is cumbersome to exit the numpad just to grab one and return. A similar observation can be made for the underscore when typing in all-caps. For this reason, double-tapping Space while holding AltGr will emit a decimal point (resulting in
.
or,
depending on your locale), and doing so while holding Shift will emit an underscore_
. -
The Multi key (also called Compose) allows you to type special characters by typing intuitive keys in succession. For example, Multic= becomes
€
.
Esc is given an easily accessible spots for your left thumb, since it is useful for modal applications like Vim. However, when you hold it, it reveals a Fn layer with the remaining 'action' keys: a navigation cluster, F-keys, and modifiers.
-
Pressing space while in this layer turns it into Meta (also sometimes referred to as the Super, Windows, OS or GUI-key). This plays well with the convention of bringing up some sort of menu upon tapping Meta.
-
It must be confessed that the above is a bit of a simplification. Observe that, in the Fn layer, the navigation cluster is placed so that you can control the directional keys with only your left hand. On the other hand (literally), the F-keys are not often used in modern applications. That is why holding the Esc key brings up the Fn-layer only on the left side, whereas the right side instead exposes Meta-keys, easily accessible for mapping actions in your window manager. When you also hold Space, this is flipped around, as the left-hand Meta-keys and right-hand F-keys are exposed. This is, in my opinion, the most distressing aspect of the layout, but it is worth it for the practical convenience it brings.
-
The keys labeled Alt and Ctrl activate the corresponding modifier for any subsequent keypress that occurs shortly after, or until you release the key.
- In general, the Fn layer is deactivated while a modifier is active, so that, for example, Escaf will generate Ctrlf. If you instead really do mean to combine a modifier with a key from the Fn layer, simply enter the layer again while holding the modifier key.
- Pulling up a menu or escaping a virtual machine sometimes involves tapping a modifier on its own --- this is achieved by holding it on its own for a little longer.
When you press a key, your keyboard will send a scancode to the computer; the kernel maps that to a keycode; and finally, your keyboard layout considers that keycode (along with the active modifiers) and emits a keysym.
Thumbledore remaps symbols at this keysym level, while other keys are mapped at the scan- or keycode-level. Teasing the two apart like this has several benefits:
- At the scan- and keycode-level, more tricks can be applied, like overloading.
- But at the keysym-level, you can switch between symbol layouts in the standard way --- and they will apply to all keyboards, regardless of firmware.
- Users can try the AltGr symbols, without committing to the rest.
- It becomes easier to reason to reason about key composition. We don't have to explicitly write and remember rules for how the various layers and modifiers combine. Suppose, for example, you want to zoom in with Ctrl+ --- you can rely on your muscle memory to type that first key as Esca and the second as AltGre.
- For layout-independent keybindings in your window manager, it is important that emitted keycodes stay the same even as symbols change.
Install keyd (version >=2.3) and run
sudo make install
. Activate the thumbledore
layout in your
environment.