Skip to content

Instantly share code, notes, and snippets.

@evantravers
Created February 21, 2020 00:02
Show Gist options
  • Save evantravers/8467a5ae7ba83cc1e134da8e64dfe3ff to your computer and use it in GitHub Desktop.
Save evantravers/8467a5ae7ba83cc1e134da8e64dfe3ff to your computer and use it in GitHub Desktop.

Customizing a keyboard layout

The following is an insane train of thought… 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.

I'm pretty happy with the modified version of the OLKB Planck layout that I've been using for a number of years. 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

While discussing keymaps, I've found it helpful to discuss these basics of what a keymap is, so that you can scope your changes to just one or two areas at a time.

Alphas

I use QWERTY for now. 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 (I hear you Colemak fan in the back, I haven't been able to figure out how to do this and still use vim,) and I'm kind of convinced that using the thumbs for enter and shift is really quite pleasant for typing normal English prose.

Modifiers

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.

On the staggered columnar/Kyria, I'm starting to like the thumb modifiers, especially for single keys. However, it's challenging to include all of them in a manner that allows for the major 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 about,) 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

I like 40% keyboards… by necessity, this means the num 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 convinced 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 two 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 special character keys have a shifted special character as well.

The Outer Mods

The Outer Mods are Tab, Caps Lock (or Control if you roll Space Cadet-style), Backspace and Delete. I think on all my boards the "Caps Lock" behaves as a Control, and is ESC when double-tapped.

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. 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

On my keymap attempts, 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. :(

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. Planck layout link, kyria version layout link

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

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 that outer shift keys, which I am perhaps foolishly trying to avoid at the moment.

The main problem is that I am not easily able to discern the logic behind the symbols system, especially the RH symbols.

Where do we go from here?

Typing this monstrous document out has helped me think through this a good bit.

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 juggling back and forth in order to move from layer to shift to layer for some of the weird character strings found in programming. (<!-- --> 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 figuring out something clever to shift easily while moving through layers… probably a pinky shift like the ergodox, kyria, or kinesis advantage (the kinesis and ergodox have more keys and columns, and don't try to utilize layers except as ergonomic shortcuts.)
  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 put the rest of them on home row for minimal finger-travel.

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

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment