Keyboard Layers and Home Row Modifiers
What are keyboard layers? When you press the A key of your keyboard you see an a appear on your text editor. However, if you hold one of the Shift keys and the press A, what you get is a capital A. If you hold Shift and press 2, you see ‘@’ instead. What I have just described is the behavior of the Shift Layer. In essence, the Shift key activates a layer that changes the output of many other keys. What is a modifier? Shift, Control and Alt are referred to as modifier keys, simply because they modify the behavior of other keys. That not always results in a different character being emitted, as in the previous example. It can also result in an action taking place. For example, holding Control and the pressing C will commonly copy the selected text; holding Alt and then pressing Tab will allow you to change the focus to another application. What are home row modifiers? The row at the center of a keyboard, where your fingers are meant to rest, is commonly called a Home Row. Of course, there are no modifiers on the Home Row row of a standard keyboard, all we see are characters. We cannot replace them with modifiers because we need all characters to be able to type. But what if we could have both? After all, there is a clear difference between how we use modifier and a character keys: we hold the former and tap the latter. For example, when we tap D, we get a d, but if we held D, then tapped M and got capital M, that would mean D behaves as Shift while held. Why would we want to do this? Having quick access to modifiers and being able to press a combination of them without having to contort our hands in an awkward way can result in improved efficiency and ergonomics, also encouraging us to learn more shortcuts and key combinations that can increase our productivity. How can we achieve this? There are many tools that can modify the behavior of a key to achieve this to some extent. However, there are a few important gotchas to bear in mind: If you are typing and roll a key, meaning that you press a key before releasing the previous one, you may accidentally activate a modifies (e.g., roll from D to M and get aMire instead of admire). To determine whether you intend to press or hold a key, we need to wait until either the key is released or another key is pressed. That means we won’t immediately see the characters we intend to type and we will perceive a delay or lag that can be distracting. Unfortunately, many of the Home Row Modifier (HRM) implementations you may find out there do not address these problems effectively. But worry not, there are some excellent free and open source tools that can do this properly and you can use them right now. We'll get to that soon. Custom Layers We now know we can use HRMs to access layers, like Shift and AltGr, without moving our hands away from the center of the keyboard. What if we could have other layers that would allow us to reach, for example, Escape or the arrow keys without moving our hands? The same tools used to implement HRMs can also help with that. The main types of custom layers you may want to consider are: Navigation/editing (also known as Extend) Functions, numbers and symbols. Layered Keyboard Layouts Putting all of these together you get a layered keyboard layout. You can find many samples on keymapdb.com, including Kenkyo, the layout I put together during my journey learning all the concepts discussed in this article. There you will find examples on how to properly implement HRMs, using software like Kanata and keyd, as well as opinionated implementations of the aforementioned custom layers, which you can use as is or as inspiration for your own layers. I hope you have found this article useful. Thank you for reading.

What are keyboard layers?
When you press the A key of your keyboard you see an a
appear on your text editor. However, if you hold one of the Shift keys and the press A, what you get is a capital A
. If you hold Shift and press 2, you see ‘@’ instead.
What I have just described is the behavior of the Shift Layer. In essence, the Shift key activates a layer that changes the output of many other keys.
What is a modifier?
Shift, Control and Alt are referred to as modifier keys, simply because they modify the behavior of other keys. That not always results in a different character being emitted, as in the previous example. It can also result in an action taking place. For example, holding Control and the pressing C will commonly copy the selected text; holding Alt and then pressing Tab will allow you to change the focus to another application.
What are home row modifiers?
The row at the center of a keyboard, where your fingers are meant to rest, is commonly called a Home Row. Of course, there are no modifiers on the Home Row row of a standard keyboard, all we see are characters. We cannot replace them with modifiers because we need all characters to be able to type.
But what if we could have both? After all, there is a clear difference between how we use modifier and a character keys: we hold the former and tap the latter. For example, when we tap D, we get a d
, but if we held D, then tapped M and got capital M
, that would mean D behaves as Shift while held.
Why would we want to do this?
Having quick access to modifiers and being able to press a combination of them without having to contort our hands in an awkward way can result in improved efficiency and ergonomics, also encouraging us to learn more shortcuts and key combinations that can increase our productivity.
How can we achieve this?
There are many tools that can modify the behavior of a key to achieve this to some extent. However, there are a few important gotchas to bear in mind:
- If you are typing and roll a key, meaning that you press a key before releasing the previous one, you may accidentally activate a modifies (e.g., roll from D to M and get
aMire
instead ofadmire
). - To determine whether you intend to press or hold a key, we need to wait until either the key is released or another key is pressed. That means we won’t immediately see the characters we intend to type and we will perceive a delay or lag that can be distracting.
Unfortunately, many of the Home Row Modifier (HRM) implementations you may find out there do not address these problems effectively. But worry not, there are some excellent free and open source tools that can do this properly and you can use them right now. We'll get to that soon.
Custom Layers
We now know we can use HRMs to access layers, like Shift and AltGr, without moving our hands away from the center of the keyboard. What if we could have other layers that would allow us to reach, for example, Escape or the arrow keys without moving our hands? The same tools used to implement HRMs can also help with that.
The main types of custom layers you may want to consider are:
- Navigation/editing (also known as Extend)
- Functions, numbers and symbols.
Layered Keyboard Layouts
Putting all of these together you get a layered keyboard layout. You can find many samples on keymapdb.com, including Kenkyo, the layout I put together during my journey learning all the concepts discussed in this article. There you will find examples on how to properly implement HRMs, using software like Kanata and keyd, as well as opinionated implementations of the aforementioned custom layers, which you can use as is or as inspiration for your own layers.
I hope you have found this article useful. Thank you for reading.