Customizing a Keyboard Layout

The following is an insane train of thought… and one that isn't completed yet. I have had a few conversations recently about how to think through customizing a keyboard layout, and I thought I'd just write stream of thought notes while working on my current layout, and see if that is useful to anyone out there. (By this I mean just George, Seth, and Kevin. Hi guys!)

I am honestly re-thinking things that shouldn't be re-thought. It is entirely unnecessary for most people. Only fool around with this level of tweakery if you really love messing with things and you have time to burn.

Still here? Ok…

I'm pretty happy with the modified version of the OLKB Planck layout that I've been using for a number of years. When I first got my Planck, I modified the layout to have modifiers on both the RH and LH, and I use a separate finger on each column for each modifier, and it works really well. I'm having to modify this for my new Kyria keyboard… because I'm trying to make use of the thumb mods effectively.

Parts of the Keymap

Modifying a keymap can be overwhelming. I tend to split up the keymap into some constituent parts. Unless you get really crazy, you mostly only will be changing the location and behavior of modifiers, and the location of special characters.

Alphas

I use QWERTY for now. Because I have embraced ortholinear/columnar keyboards, Every keyboard I own has at least a 3x10 grid that represents most of the normal layout.

/* Qwerty
 *
 * ,---------------------------------------.
 * | Q | W | E | R | T | Y | U | I | O | P |
 * |---+---+---+---+---+---+---+---+---+---|
 * | A | S | D | F | G | H | J | K | L | ; |
 * |---+---+---+---+---+---+---+---+---+---|
 * | Z | X | C | V | B | N | M | , | . | / |
 * `---------------------------------------'
 */

I'm not really going to change that.1

(While not in this grid, there is the ' and \ character which appear in the standard QWERTY layout too, and I usually do put those in the RH column in their usual spots.)

Modifiers

ortho mods

On my grid/ortholinear keyboards, I simply have the mods at the bottom of each column. It works really well, each mod has a LH and RH variant, and each mod has a dedicated finger that can drop down to the bottom of the column to press it.

kyria mods

On my first staggered columnar keyboard, the Kyria, I'm starting to like the thumb modifiers, especially for single keys. I'm also using some clever QMK "modtap" functionality to have those keys function both as mods and as keys.

It's challenging to lay the mods out in a manner that allows for the major mod chords: ⌘+⇧ and ⌘+⌥

With the way I currently have them laid out, ⌘+⌥ is a chord where I slab my thumb across both rows, but ⌘+⇧ requires lifting a hand off home row in order to do it one handed. I may have to have a LH pinky shift just for this case (this is what the default keymap does,) but that seems inconsistent. Something tells me there's a double tap or something that could make this easier… hmm…

I'd prefer to have identical modifiers on the left and right, although I'm not sure that's possible or a good idea. I know with the CRKBD (which I should note I don't have, but I'm thinking purchasing eventually,) this is basically impossible. I want to be able to press all my keyboard shortcuts with just the LH side for design work and that sort of thing… although maybe this is a layer problem not an identical mods problem.

Numbers

ortho nums

I like 40% keyboards… by necessity, this means the number row is under a layer. I especially like having a row of numbers layered under q to p, and another ten key style number thing in the RH. If you stagger it right on some boards, you can connect the 789 on both ten key and row to make it consistent. Fancy.

Special Characters or Symbols

When I'm using a board that relies on thumb shifting, I am starting to be persuaded that I ought to be able to press every symbol from one layer without having to hit shift or other modifiers… I have found I don't like moving my thumb quickly to hit different mods for different keys… (ex: |> for elixir requires hitting lower for the pipe, and shift for the less-than.)

On a normal keyboard, there are roughly three groups of special characters… a group shared between LH and RH on the num row, and a group curled under the pink side on the RH. All non-numrow special character keys have a shifted special character as well.

Thinking this way, this is the list of special characters, by location:

LH column

` ~

Numrow

!, @, #, $, %, ^, &, *, (, )

RH Column

-, =, _, +

[, ], {, }, \, |

Included in the QWERTY grid

These I don't feel I really have to account for, I'm probably just going to reach for them in their usual spots.

I do make exceptions for the <, >, :. These are on a shift modifier, and they appear often enough in programming sentences that I think they probably deserve some visibility in a symbols layer.

;, :, ', "

,, ., <, >,/, ?

Total: 22 before the QWERTY grid, 32 including all QWERTY symbols.

My target symbols to cover in a symbol layer: 26.

The Outer Keys

The Outer Keys (non-official name) are Tab, Caps Lock, Backspace and Delete. On all my boards the key in the normal "Caps Lock" position behaves as a Control, and is ESC when double-tapped.

These I have mostly left in place, although I could see a world where I moved tab to a different spot. I honestly don't find myself hitting tab as often as I use vim shortcuts to reformat text, so it's ok for it to be there.

I also spend a lot of time in the command line, and I tend do use Readline shortcuts for tab and enter, (⌃+i and ⌃+j respectively). I could see moving those prominently to the thumb cluster otherwise, but I've just become so used to using the Readline ones that it doesn't matter that much to me.

Ortholinear boards follow a similar pattern, but the Kyria is still in flux.

Arrow Keys, Functions, and Etc.

As a long time user of 60% or less keyboards, having the arrow keys on a layer is normal to me at this point. While I typically also use Readline shortcuts for moving around, if I need arrow keys, I have a traditional pyramid on one layer, though I typically use a vim-style bar on hjkl.

Function keys can be similarly placed to the number row mentioned earlier, and I'm pretty happy having all kinds of layers to control RGB and other things. I typically run a macro layer for specialized design purposes.

Options

Here is what I've tried so far. I'm not using some of QMK's fancier options… for instance I tend not to put the layer keys inside the space bars… I never have been able to type at speed with that. It just trips me up. :(2

Option 1: Planck variant (Raise for symbols, Lower for shifted symbols)

This is basically an implementation of the layout that I was using on the Planck.

Plank version
Current Kyria version, not super readable, sorry! Try opening image in a new tab.

It crushes in all the special characters, and follows the mnemonic: all special characters are "crushed" inward into the 4x12 grid on the raise layer. All characters that would be shifted variants of the same are on the lower layer.

Because this follows a consistent pattern, it's pretty easy for me to remember. Do I want to type @? It's "above" 2, just like it is on a normal keyboard. {} is found "shifted" above []. - is next to =, and the shifted variants are the same as a normal keyboard. When I was learning the layout, I usually was able to find something by looking at my laptop and remembering how the layout pulls everything inward.

The downside is that shifting between a layer and another layer, or more especially a layer and a shifted character in the QWERTY set is slow… slower still if you have thumb mods for shift and space.

Those shifted QWERTY characters are: :, ", <, >, and ?

For my programming purposes, probably the <> characters are most problematic.

Option 2: Ergodox (Symbol layer)

This is the variant that the default Kyria roughly follows.

The "lower" layer contains only symbols, all the symbols except for a few shifted key codes, ironically creating the same problem with special characters as the Planck style layout.

However, if you follow this logic of having a full on "symbol layer," then programming should become easier as things like #{}, |>, or => move under a single layer with a single layer press. I think over time this would be a major advantage. With the Planck system, to type consecutive special characters often requires a layer change, or a layer key to shift change… with a symbol layer, just hold one layer key and type.

I'm just not convinced that the layout the ergodox promotes is the right one. I think in part it relies on having all the keys necessary to hit all the special characters (especially number row,) and it mostly utilizes the symbol layer as a shortcut for commonly used programming characters. I think it also relies on the fact you can layer with your thumbs and shift with your pinky fingers… which at the moment I am trying to avoid because it could potentially lead me down a path of even smaller keyboards. 3

evil cackle

The main problem is that I am not easily able to discern the logic behind the symbols system, especially the RH symbols on the default ergodox/Kyria layer. They aren't organized in any way that makes sense to me.

Where do we go from here?

Typing this monstrous document out has helped me think this through.

Here are my present thoughts:

Playing around, I think that long-term, having a full "symbols only" layer is probably going to be the most ergonomic solution… eliminating a lot of thumb juggling between momentary layer to shift to layer, especially for some of the weird character strings found in programming. (<!-- --> or #{} anyone?) I have two possible paths forward:

  1. I could try to find a Planck-like grouped solution that mimics the groupings on a traditional keyboard in order to allow me to remember where they are. This would probably necessitate either:
    • giving myself a way to shift easily while in a layer… probably a pinky shift like the ergodox, kyria, or Kinesis Advantage4.
    • Trying to fit the few shifted characters from the QWERTY grid in between the mnemonic layers.
  2. I could try to identify which of the special characters is most important, group some of them that need to be grouped (parens, braces, etc.), and try to organize the rest of them by usage and how often I type.

I'll probably look to the second… it's a far cry from what I have been doing, but I think long term it'll be the most interesting.

I think that I'm probably going to pursue a thumb mod solution to allow me to hit ⌘+⇧ easier. I may try to pursue another arrangement of keys to allow a thumb smash, or utilize QMK's ability to have double-tap and hold in order to handle it. I'll probably look to a clever QMK solution, because if history is any indicator, my next keyboard will have even less keys. :P

If you want to see where my layout is at the time of this entry, here's the last change I made. I'm using macros based on @drashna's layout, so it may be a little hard to read.


  1. (I hear you Colemak fan in the back, I haven't been able to figure out how to do this and still use vim,) 

  2. I know there's configuration options to help with this, but so far I haven't found the magic numbers that work for me. 

  3. If I can get away from pinky shifting, then I can lose an entire column, and the Kyria even supports breaking that column off the PCB… why I want to do this? Madness, I think. 

  4. The Kinesis and ergodox have more keys and columns, and don't try to utilize layers except as ergonomic shortcuts. 


🔖
Changelog
  • 2022-06-08 11:31:29 -0500
    Rename articles

  • 2020-06-25 13:06:02 -0500
    Fix spelling of Kyria

    Thank you VladislavK!

  • 2020-06-18 14:26:02 -0500
    Move everything to CST

    Don't know why I didn't do that before. It caused _no_ end of
    problems.

  • 2020-02-22 14:08:32 -0600
    Update: post latest change to map

  • 2020-02-22 13:45:02 -0600
    New post: Customizing a Keyboard Layout