Re-mapping my keyboard and re-wiring my brain

geekery

I don’t really know what I was thinking. It’s just that sometimes I get an idea in my head and I run with it. I’m pretty sure that it is going to be a good thing (or a very good thing) in the long run, but it has challenged my poor old brain a good deal, I can tell you.

It started when I got one of the regular newsletters from ErgoDox, the makers of my keyboard. They were featuring a ‘layout of the month’ produced by Graeme Geldenhuys which used the BEAKL15 keyboard layout. I was intrigued. Typing has felt much more comfortable since I got the ErgoDox, but there’s still plenty of room for improvement as QWERTY still involves awkward reaches and an unbalanced workload between the hands. Since I could just download and tweak Graeme’s layout to try it, there was no reason not to, and so it began.

BEAKL15

The idea behind the BEAKL15 (Balanced Effortless Advanced Keyboard Layout) is that it is that it uses frequencies of characters in English and the strengths of each of the fingers to optimise the ergonomic layout of the keyboard. The most frequently occurring letters fall under the strongest fingers, balanced between hands so that you get a good alternation happening, and it generally enables a more comfortable, smoother rhythm when typing.

I didn’t need all the layers that Graeme included, and I could simplify a bit as I use only macOS. I also rearranged some of the modifier keys to be closer to what I find most comfortable with the ErgoDox (you can find my version here). Then I just had to learn the layout!

I spent some time each evening using a typing trainer to practice building up my accuracy and speed, and learning where all the keys are. I also used the layout while working, but having the QWERTY layer was useful because it meant I could dive back into my muscle memory if things got too frustrating. I switched around the keycaps to match the new layout which helped a bit when I forgot what was where.

I’m not back up to speed yet, but I am getting better fairly quickly. I’m sticking with it because the BEAKL15 is fantastic. It felt comfortable and efficient right from the start, and I think I will end up somewhat faster and certainly more accurate than before with more practice. I also enjoy the way that punctuation and code (with heavy use of symbols and enclosures of various kinds) also feels much more efficient and easy to type. It’s quite a revelation.

Boon

The one awkward thing was using evil (Vim-based) bindings in Doom Emacs. They are centred around the QWERTY home row, but the BEAKL15 layout scatters the previous home row to the four winds. I was reluctant to lose the comfort of evil bindings, but since lockdown has apparently fired me up to burn down all my established habits and build them again, why not?

After a bit of searching, I came across Boon. It’s an ergonomic modal editing mode built for Emacs, and enables the most useful text editing, manipulation and navigation commands. The commands are mostly composable, and once you have got your head around the principles, it is quite intuitive to use. The main mappings of commands to keys happens in separate files, and there are ready-made mapping files for some of the more common layouts, but none (of course) for BEAKL15, which is much more obscure. However, open source software is a wonderful thing: all I needed to do was to fork the repository, copy the boon-colemak.el file and then swap the keys for the ones in the same spatial position in the BEAKL15 layout.

Then I disabled the evil module in Doom and used the default Emacs bindings module as the basis for my own private module. I decided to set doom-leader-alt-key to s-d (Cmd-d). This meant that I could recreate the full range of Doom leader keys used with evil, because s-d doesn’t step on pre-existing prefixes like the default C-c leader. I bound this to a single key on the left-hand thumb cluster, but it is also easy to reach on a standard QWERTY Mac keyboard. Boon also maps a couple of useful keys in its command mode to C-x (/ on my keyboard) and C-c C-[KEY] (, on my keyboard), which gives you handy access to default Emacs bindings. I’m really enjoying this set up. Using Boon is fast and efficient, and actually feels much more ergonomic than evil bindings did in QWERTY. It’s also quite easy to understand the code and extend or adapt it if you want.

Muscle memory

The big question of course is how this is all going to pan out on those occasions when I need to use a QWERTY keyboard again. Thankfully, that isn’t likely to be often: I use my ErgoDox 95% of the time, whether connected to my work laptop or my home Mac mini (both of which are currently on the same desk at home at the moment, of course). The layouts are so different (and the MacBook Air keyboard is very different physically to the ErgoDox), that I’m pinning my hopes on my brain’s ability to switch modes appropriately. The experiments I’ve tried so far have been encouraging. When I’ve had to flit back to QWERTY there has been a brief burst of complete nonsense from my hands until I’m able to stop thinking about what I’m doing and let my fingers take over on auto-pilot. The same happens when I switch back to the other keyboard, though at that point my fingers also thank me that they aren’t having to reach to the Outer Hebrides of the keyboard in order to type the third most frequent letter in the English language1. Muscle memory is a weird and mysterious thing, but I think it’s going to work out.


  1. ‘a’ in case you are wondering. My little finger/pinkie thanks me constantly at the moment.