Custom Keyboard Layout

959 words | ~ 5 min read | Jun 10, 2020 | last modified Jun 10, 2020 | keyboards

It’s no secret that I’m massively obsessed with mechanical keyboards. For sheer customizability, they’re impossible to beat. Yes, I can put a lot of effort into software key remappings and then carefully port them over to every new computer I use – or I can just use open-source keyboard firmware QMK and my keyboard will work wherever I plug it in. QMK also lets me program keys to do one thing when tapped and another thing when held down, or configure “layers” so that my letter keys will turn into symbol keys, so it’s more powerful than software configuration.

How can I exercise this power for myself, I hear you ask? First, get a keyboard that supports QMK. I personally use a Preonic, which is not for everyone, but I recommend that you get a keyboard that has a split spacebar or otherwise has some extra thumb keys – these are very convenient to assign as “layer activation” keys. Then, follow the QMK docs on making a new keymap file and flashing your keyboard.

The Preonic, with its original keycaps

You’ll notice that the Preonic has a “lower” key to the left of the spacebar and a “raise” key to the right. These let you easily access “raise” and “lower” layers by holding down the respective key – instantly and enormously expanding your keyboard. It also has actual, physical arrow keys, something that’s important to me, and yet it takes up less space than a normal 60% keyboard.

The rest of this post will be about my personal layout choices. You may want to follow along by looking at my personal config, which is here. You can find all my personal QMK configs in my fork of QMK here. I also have a custom config for a DZ60, which is the PCB I used for my typewriter keyboard.

The Preonic, with Tengwar DSA keycaps

First, the default layer, labeled _QWERTY in keymap.c. I haven’t made too many changes here:

The _LOWER layer is the one I’ve customized the most – this is now my “symbols and function keys” layer.

The _RAISE layer is for special commands, since I moved all the symbol functionality into _LOWER.

Finally, there’s the _ADJUST layer, which I never use (except once, when I was randomly button-mashing and accidentally switched into Colemak). The less said about this, the better.

The Preonic, with Godspeed MT3 keycaps

In the default keymap, both raise and lower have all the function keys on them, which is wasteful. In addition, raise has a few symbols on it, in the same place where the lower layer also has symbols, which was really confusing for me to learn – I could never remember whether the symbol I wanted was on raise or lower. And some of the symbols were just hard to reach, especially ~ and | which I type a lot in bash commands. With all the symbols on the raise layer, the functionality is (mostly) neatly divided into “symbols layer” and “not symbols layer”, which is easier to remember.

I’ve chosen to stick to the QWERTY layout rather than switch to Dvorak or Colemak or Workman or something, mostly because I use vim and don’t want to disrupt that muscle memory. (One afternoon I decided to try out Dvorak – my typing speed after a few hours of practice wasn’t terrible, but then I tried to edit something in vim and I went directly to hell. It was like, things are happening! Why have I just jumped to the start of the file and deleted a bunch of lines? That’s not what I wanted!) I find that even with QWERTY, my Preonic represents a significant ergonomic improvement over a standard keyboard, since it’s ortholinear and very compact, reducing the distance my fingers have to stretch – and my custom layout improves things more by putting all the symbols under the top two rows of letters. Your mileage, of course, may vary. A keyboard layout is a very personal thing, and I encourage you to experiment and customize yours until it perfectly fits you and your needs.

a keyboard layout is something that can actually be so personal