I followed xmodmap way of swapping ESC and Caps lock in this link. It works well when I load .bashrc with . ~/.bashrc
for the first time. However, if I edit different part of my .bashrc and reload it with same command, two keys are swapped back to original mapping. Why is this happening?
Portion of my .bashrc file
...
xmodmap ~/.speedswapper
...
My ~/.speedswapper script
remove Lock = Caps_Lock
keysym Escape = Caps_Lock
keysym Caps_Lock = Escape
add Lock = Caps_Lock