Keyboard layout updates and Meow

· geekery · emacs · keyboards ·

If you have (or make) a keyboard which is fully programmable, it’s likely that you will spend a lot of time messing about with programming it: not because you need to, but just because you can. My little Ferris Sweep has been through several iterations of layouts this year. I know me, so I would bet no money at all on this being true, but I think that I might be getting close to the perfect layout for me with this keyboard. In the process, I have also stopped using evil in Emacs in favour of the delightful meow.

Since I last wrote about it, I have switched the base layout twice. The first time, I got curious about Hands Down™ Platinum. I like BEAKL a lot, but it avoids using the little finger much more than other layouts, and I started to feel that this was overloading my other fingers more than they needed to be. The Hands Down™ layouts looked interesting, so I set up Platinum. While I liked it in many respects, having to use a combo for ‘Q’ and ‘Z’ was a little irritating, particularly as I use ‘Z’ more often than many as a biologist (think ‘zoology’). I had also been thinking about installing a matching layout on my laptop. I mostly use my Sweep keyboard with it, but I have to occasionally use the built in keyboard (at meetings away from my office, for example), and then it is irritating to have to readjust to QWERTY. That rogue ‘L’ on the thumb key would make it difficult to create an equivalent layout. Layouts are also a personal thing, regardless of objective metrics about how ergonomic they are (everyone’s hands are different), and so this one eventually seemed not to be the one for me.

I decided to try the layout I should have probably tried first: Colemak Mod-DH. Colemak is probably one of the most popular alternative layouts (together with Dvorak), and is widely available as an installable layout for most operating systems. The Mod-DH variant is similarly very popular. I added a layer for the layout, and was surprised how quickly I felt comfortable with it. I’m by no means back up to my previous typing speed, but even after only a couple of weeks, my speed is climbing quickly and steadily, and — more importantly — it feels more natural. I have now switched permanently (for some value of ‘permanent’!) to this layout.

At the same time, I decided to simplify the other layers a bit. You can see the current layout here. The biggest change has been to merge the number and symbol layers. I found that I could just about squeeze the symbols on one side (with a couple of the less used ones on the other side). I still have all the brackets on symmetrical combos (left side for opening, right for closing), as well as easy access to the hyphen, underscore, semicolon and colon on the base layer as combos. When holding down the number layer key on the right half, I just need to add the index finger of the same hand on the home row shift key to get the corresponding symbol.

On the bottom row, right hand of the navigation layer, I’ve added shortcuts to select (SWord) and navigate across (NWord) words, which I use a lot in standard macOS apps. I’ve also adopted a lock layer key on both the navigation and number layers. All the layer keys activate only when held (like a traditional shift key), which I generally find much easier and more predictable. However, I occasionally find myself on the phone and needing to hold the phone with one hand and type with the other. On a split keyboard, I can’t type a number like this, as the halves are too far apart to hold the layer key and tap the key for the number with one hand. Holding the layer key and then tapping the lock key (just above each layer key) locks the layer on so I can type numbers with one hand. Tapping the lock key again disables it.

I used to have a layer with various ‘Hyper’ key shortcuts on to change workspaces, resize windows etc. I realised that since I have all the modifiers on the home row on each layer, it’s very easy just to mash all four fingers and tap whatever other key is needed, so I got rid of that layer.

One issue with moving away from a QWERTY layout is that vim keybindings (particularly navigation bindings) are no longer where you expect them. I used evil mode in Emacs for ages, and while I am getting more familiar with Emacs bindings, I still prefer modal editing. At some point, I came across meow. It is a modal editing mode, but one that sits more lightly alongside Emacs bindings without interfering. It also has a kind of leader mode which can avoid mashing modifiers excessively when using Emacs shortcuts.

I have to admit that it took me a while to grok it, but I love meow now. There are built-in mappings for a variety of layouts (including Colemak Mod-DH), but it is also very easy to roll your own using those as an example. The mode of editing is rather like Kakoune in that selection of objects happens as you navigate, and then you choose an operation (like changing or copying the selection). There are numbered hints which pop up as you do so, which make it easy to jump to the exact point you want. There’s also a very neat multi-cursor edit mode (‘beacon mode’) which is integrated with Emacs’ native macro recording. Meow is very lightweight (in a good way), but using it has enabled me to drop several other packages because it handles those functions so well.

I’m a happy Emacs user, and very comfortable with my new layout.