On my hp Spectre x360, the Ins key is only reachable via the Fn key as in Fn+PrtScr.
So I wanted to swap both keys. System-wide - so not only in X (using
I finally found this which suggested the following procedure:
Dump the current keyboard layout:
sudo dumpkeys > backup.kmap
Check the keycodes you want to change (Ins = 110, PrtScr = 99):
(When you're done, wait 10 seconds for it to exit automatically.)
Copy the dumped keyboard layout:
cp backup.kmap ins-prt-swap.kmap
Edit it to swap all occurrences of
110 and vice versa, e.g. change:
keycode 99 = ... ... keycode 110 = Insert.....
keycode 110 = ... ... keycode 99 = Insert.....
sudo setcon --savedidn't work for me, but Ubuntu loads the active keymap from the file
/etc/console-setup/cached.kmap.gz. So I gzipped my
ins-prt-swap.kmapand copied the resulting