How to swap/remap the CAPS LOCK key with Tab key?
Solution 1:
First list your current settings with
xmodmap -pke|egrep -e '(Tab|Caps)'
I get this output
keycode 23 = Tab ISO_Left_Tab Tab ISO_Left_Tab
keycode 66 = Caps_Lock NoSymbol Caps_Lock
So, temporarily set your keymap
xmodmap -e "keycode 66 = Tab ISO_Left_Tab Tab ISO_Left_Tab"
xmodmap -e "keycode 23 = Caps_Lock NoSymbol Caps_Lock"
Assuming that works, add those lines to ~/.Xmodmap
keycode 66 = Tab ISO_Left_Tab Tab ISO_Left_Tab
keycode 23 = Caps_Lock NoSymbol Caps_Lock
You can then either log out and back in or
xmodmap ~/.Xmodmap
Solution 2:
what works for me is this code:
clear Lock
keycode 66 = Tab ISO_Left_Tab Tab ISO_Left_Tab
keycode 23 = Caps_Lock NoSymbol Caps_Lock