This article presents a keyboard layout suitable for 40% keyboards, based on “home row mods”. The layout is designed for software developers and authors of multilingual texts. Particular emphasis was placed on ease of learning. The layout presented here is implemented both as a Kanata driver for standard keyboards on Linux, Mac, and Windows computers, and as ZMK Firmware for small 36-38 key column-staggered split keyboards. This way you benefit from ergonomic home row mods on all your input devices.

base layer

The main innovation of this layout is its symbol layer (read the section below for details):

Symbol layer

Requirements

Before I go into the details of the implementation, I would like to present the list of requirements that formed the basis for the layout presented here:

  1. The reduced 36-key layout is easy to learn by design:

    • A character in the standard layout should, if possible, be accessible with the same finger in the reduced layout.

    • The Shift key retains its function, i.e., it always switches between the same characters in both layouts. The same applies analogously to other modifier keys, i.e. [left Ctrl], [Win], [Alt], [AltGr], [left GUI], [right GUI] and [right Ctrl].1

    • All movements for the cursor, mouse, etc. follow the VI convention in the right home row: to the left [H], down [J], up [K], to the right [L] and are operated with the index finger (2*), the middle finger, and the ring finger.

  2. Additional requirements for multilingual text writing:

    • The US International and EurKEY keyboard layouts make extensive use of modifier keys [AltGr] and [AltGr]+[Shift]. These must be easy and ergonomic to reach.

    • One key in the thumb cluster should be designated as the [Compose] key.2

Home row mods with ZMK firmware

The design presented here is intended for small keyboards, but also has ergonomic advantages on large keyboards. In the repository getreu/zmk-config-totem, readers will find an implementation as ZMK firmware for the 38-key TOTEM keyboard. If you do not wish to purchase hardware, the same repository contains the Kanata keyboard layout definition file zmk-config-totem/kanata/qwerty-home-row-mods.kbd that includes all the functions and layers of the design presented below. Kanata hooks into the data stream between the keyboard and the keyboard driver. This allows to define home row mods with additional layers and chords.

The base layer

The base layer shows the position of all character keys (from [A] to [Z], [,], [.] and [/]) and the editing keys (tab [TAB], return [RET], escape [ESC], space [SPACE], backspace [BACKSPACE], compose [CMENU]2).

Base layer

It has to noted, that the here presented implementation does not specify the visual layout, that may vary by country and language. For example, the character printed by the [;] key is in Germany the letter “ö”. For simplicity's sake, the QWERTY layout is shown here. The actual layout, e.g. QWERTZ or AZERTY is determined by the operating system's setting of the computer the keyboard is attached to. However, this design does define the arrangement of the modifier and the layer switch keys, as can be seen in the next figure:

Modifier keys

Modifier and layer switch keys act in combination with another key: a modifier key must be held down while tapping the other key. For example, the [E] key pressed alone prints “e”, while [RSHIFT]+[E] prints “E”.

An overview of common home row mods choices can be found in this blog post. The solution presented here takes another approach. It extends the conventional home row to include the keys [G], [V], [space] on the left and [H], [M], [space] on the right.

On the left-hand side you will find the modifier keys: left shift [LSHIFT], right alt [RIGHT ALT], left control [LCTRL], left alt [LEFT ALT], menu [RGUI] and Windows [LGUI] key, as well as the layer switch key (underlined) symbol [SYMB]. On the right-hand side you will find the same keys, but in reversed order. Note, that the keys [LEFT ALT], [RIGHT ALT], [LGUI] and [RGUI] appear on both sides of the keyboard, whereas [LSHIFT], [RSHIFT], [LCTRL] an [RCTRL] appear only once! Indeed, the modifiers [LEFT ALT] and [RIGHT ALT] have different meanings and each of them can be combined with any character key on both sides of the keyboard. This is the reason why [LEFT ALT] and [RIGHT ALT] are present on the left half of the keyboard as well as on the right half. The same applies to the [LGUI] and [RGUI] keys. Home row keys can trigger auto-repeat when first tapped and then quickly hold.

Why have I chosen this particular home row mods order?

  • The shift modifier [LSHIFT] assigned to the [A] key which is operated by the little finger. Since all traditional layouts use the little finger for shift, learning the new position is easy.

  • To the right of it, on the [S] key, is the [AltGr] modifier. [AltGr] is often used together with [Shift] in the “US-intl” and “EurKEY“ layouts, so the proximity of both modifiers makes it much easier to type letters with accents.

  • One position further, on the [D] key, is the symbol layer switch [SYMB]. Again, it is frequently used in combination with the two previous keys, so its position makes it easier to type quickly. This modifier, which is used very often in software programming, is operated by the middle finger, one of the strongest fingers in the hand.

  • The commonly used [Ctrl] modifier is located in a prominent position on the [F] key. It is operated by the index finger.

  • The last modifier in the home row is [Alt], which is located on the [G] key. The position is not quite as easy to reach as the previous one, as the index finger has to be stretched, but its function is similar to that of the Control key, so grouping them together feels natural.

  • Strictly speaking, the remaining modifiers [LGUI] and [RGUI] are no longer on the home row, but they are still easy to reach. You can think of them as an extended home row. They are located on the [V] and [space] keys. In addition to their function as modifiers, pressing both keys together activates the system layer [SYST].

The home row on the right side of the keyboard is arranged in mirror symmetry.

The symbol layer

The symbol layer is easiest to understand and remember if you first look at the standard layout of a regular keyboard. The [SYMB] key, when hold down, switches to the symbol layer as shown below. In the second row you find the same character as in the first row, e.g. are the numbers 1 to 0, and when combined with [SYMB]+[SHIFT] the special characters “!@#$%^&*()”. Note, that the order of the keys in the forth row is the same as on a regular keyboard, read from left to right and from top to bottom: “`” on left of the first row, then “-=”, followed by “[]\”, “'” and finally “,./”. All special characters together form the fourth row: “`-=[]\',./” and “~_{}|"<>?” when shifted.

Home row mods on standard keyboards: Symbol layer

On the home (second) row we find the editing keys [ESCAPE], [INS], [DELETE], [TAB], [BACKSPACE] and [ENTER] as well as the cursor keys [LEFT], [DOWN], [UP] and [RIGHT]. The latter follows the VI convention.

The order of the keys in the home row of the symbol layer is the result of many tries and errors in many iterations:

  • [ESC] is located on the [A] key, which is operated with the little finger. The little finger also operates ESC on regular keyboards, making the transition easy.

  • [INS] and [DEL] are located next to each other, as on a standard keyboard. The latter is located on the [D] key, which is easy to remember.

  • [TAB] is located in a prominent position on the [F] key and is operated with the index finger. This is very advantageous for programming environments.

  • [BACKSPACE] is operated with the spread index finger of the left hand. In an analogous position and movement, the index finger of the right hand operates [LEFT], which is very similar to [BACKSPACE]. Most terminals interpret Ctrl-H as backspace, which reinforces the similarity.

  • [LEFT], [DOWN], [UP], and [RIGHT] follow the IV convention.

  • [ENTER] is located on the [;] key, which is operated with the little finger. The little finger also operates Enter on regular keyboards, making the transition easy.

The following figure shows the same symbol layer on the Totem split keyboard.

Symbol layer

The [SYMB] key can be combined with any other modifier key. For example, the key combination [SYMB]+[n] prints “\”, while the key combination [SYMB]+[LSHIFT]+[n] prints “|”.

The function layer

This layer is activated by the [FUNC] modifier key when held down. This modifier key is so-called “sticky”: when tapped shortly, the following key press is interpreted in the function layer. If you need additional modifiers, e.g. [SHIFT] or [CTRL] hold them before tapping [FUNC].

Function layer

When this layer is active, the position of the function keys [F1]-[F10] is the same as the number keys [1]-[0] of the symbol layer. Also, the home row modifier keys [LSHIFT] etc. are in their usual position. For example, Alt-F4 is generated by the key sequence [H]=[LEFT-ALT] (held down), [FUNC], followed by [R]=[F4]. The remaining function keys [F11]-[F24] are distributed row by row.

The navigation layer

The middle thumb key in the right thumb cluster, when hold down, activates the navigation layer. This layer offers the additional cursor keys: [HOME], [DEL], [INS], [END], [BACKSPACE], [PAGE DOWN] and [PAGE UP].

Note, that the second row assignment is the same as in the symbol layer. However, there is a subtle difference, as the keys have no additional “hold” function. This allows to trigger auto-repeat by simply holding down the key.

Navigation layer

The mouse layer

The mouse layer is triggered with the middle key of the left thumb cluster. The left-hand side groups motion keys for the mouse cursor and the mouse wheel, each following the VI conventions line per line. The mouse buttons are placed on the right-hand side of the keyboard.

Mouse layer

The system layer

The system layer is reached with the combos [v]+[space] or [m]+[space] which corresponds to [LGUI]+[RGUI].

Combo

The left-hand side groups keys to select one of 5 Bluetooth connection profiles and other connection parameters. Volume and screen brightness settings are on the right-hand side. The up/down settings follow the VI convention.

System layer

Combos (chords)

Combo: [CapsLock]

Combo: [Bootloader]

Home row mods on standard keyboards with Kanata

The above home row mods do not rely on special hardware. The Kanata software allows home row mods to be set up even on standard keyboards such as those found on laptops. The figure below shows the base layer of such a setup. Home row mods on standard keyboards: Base layer

Image source: Wikimedia Commons

The other layers: symbol, function, navigation, mouse and system are defined analogously. The following figure shows the symbol layer as example.

Home row mods on standard keyboards: Symbol layer

Differences between the ZMK implementation and the Kanata implementation:

  • The Kanata layout is by default disabled. To enable home row mods press the chord [Esc]+[1]. To disable press [Esc]+[2].
  • The Kanata layout does not implement the [BootLoader] chord, see above.
  • The system layer of the Kanata definition does not define Bluetooth keys.

The Kanata keyboard definition file is available here: zmk-config-totem/kanata/qwerty-home-row-mods.kbd

1

This requirement makes the design localization agnostic, e.g.: the same home row mods design works for US, UK, German and French keyboards.

2

There is no official key code for the [Compose] key that could be sent to the host computer by the keyboard. Therefore, we have to misuse the key code of a little-used key for the “Compose” function. A popular choice is the “application” key, also known as the “menu” key. In the layouts shown here, the abbreviation [CMENU] is used. So when the user presses the [Compose] key, the keyboard sends the key code of the [CMENU] key to the host computer. On the operating system side, the [CMENU] key code emitted by the keyboard, must be interpreted as “Compose” action. Under Linux, the Compose action can be assigned to the [CMENU] key code using the X11 configuration option: compose:menu. For example: services.xserver.xkb.options = "compose:menu"; in NixOS. Windows does not support the Compose key action and therefore requires an additional utility program, e.g. Compose Key for Windows.