Symbolboard - An ergonomic keyboard layout (implemented on linux)
Plus how to define your own xkb keyboard layout on linux
@readwithai - X - github
Update: I had issues with KDE on X using using the keycode (i.e. the key that gets pressed) rather than the entered keysym which breaks keymaps with layers if there are two shortcuts with the same physical key but in differnt layers. Also wayland, a new protocol which replaces X, does not support xkbcomp as is used here (though wayland does not support many things). Together this has led me to use keyd to reimplement symbolboard at the kernel level. This has various benefits (and some limitiations) which I will discuss in another post.
For a while, I have been using a keyboard mapping I call symbolboard with Linux (I also created a similar key map with Karabiner for macs). This was achieved with a tool called xmodmap. This is an ergonomic keyboard layout for linux that moves all the modifiers onto the number keys.
There are two aims of this keyboard mapping:
Being less dependent on the keyboard mapping of laptops by not using the keys that tend to move (symbols and return and backspace)
Make the modifier keys easier to press
I achieve this by moving all the modifiers to the number row where they are easy to press with both hands, and add special “shift” keys so that I can map the numbers and symbols to the letter keys with these shift keys.
This xmodmap approach worked pretty well. However I had issues with some programs like Chrome and Obsidian which acted as though I was always holding one of the modifier keys. I have managed to work around this by using xkb. In the process of this the issues seems to be something to do with “groups”, so I don’t use this using “ISO levels instead”.
What this keymap looks like
These are the three “levels” of my keyboard map. One is mostly for symbols and motions another is mostly for numbers, though there is a bit of overlap. I have found this quite convenient to use for a view yeras.
You can use this too
I’ve released this code as on github. It should be fairly straightforward to use and edit.
Interesting practicalities
xkb in practice is quite complicated, and it’s default mode of working is quite magical. setxkbmap interacts with rule files that specify a set of keyboard mappings that run. They are different types of keyboard mapping objects, types, symbol, geometries and compatibility. I tried to fit into this world but when I discovered that I could not unmap existing keymappings, and found it difficult to stop certain keymapping files from loading (specifically the pc keyboard map was always running) I decided to opt out and use xkbcomp
xkbcomp is a lower level system than setxkbmap that is used to compile keyboard maps and load them into the X server. However, it can also dump out the current keyboard map to a text file. So I used this to dump out a complete keymap, edit it, and then reload it.
xkbcomp :0 map.xkb #dump
vim map.xkb #edit
xkbcomp map.xkb :0 # reloadThis allowed me to circumvent all the magic setxkbmap logic. The downside this is that my keyboard might not work with a different type of keyboard layout. setxkbmap, while rather big, nested, and monolithic does provide a level of indirection allowing you to support different keyboards models — but the modifier logic is quite low-level and I could not work out how to override it.
Related work
I’ve found other people trying similar things. I know that levels are quite popular with QMK developers — this loads some keyboard logic onto an external mechanical keyboard. Homerow modifiers are a common approach to make modifiers easier to press and available to both hands (like I do here).



