In the past 2 years or so, I have been using my caps lock key as a seperate ctrl key on my desktop keyboard.
This is very easy to do in X11 with a setxkmap command.
However, with my laptop, I try to run without X as much as possible. (Ive found it make a nice, distraction free environment, and it seems to be pretty good for battery life)
Obviously, without X, we cannot use setxkmap.
In order to do this without the tools in setxkbmap, we will have to edit the keymap used by the vitual console and set it as the keymap using localectl.
Now, according to the archwiki, we should be able to create a file contianing
Shouldnt this mean that our 'keycode 58 = Control' should be interpreted as 'keycode 58 = Control Control Control (and so on)'?
Well, it should!
However, there seems to be a bug in 'loadkeys', as the above only works when defining a complete keymap, not when overriding parts of default.map.
This means, that in order to correctly modify the keymap, we either have to define all columns manually, or we have to copy the default keymap, edit it, and load it as a complete keymap.
In order to create a new full keymap, copy the keymap you want to edit from '/usr/share/kbd/keymaps/i386/[couple more folders here]' to somewhere in 'usr/share/kbd/keymaps/' and unzip it with 'sudo gzip -d [filename]'.
Then you can (optionally) re-zip it with 'sudo gzip [filename]' and set it as your keymap with 'sudo localectl set-keymap [filename without .map extention]'.