For most people, "
is much more frequently used than '
.
For most developers,Esc
is much more frequently used than Caps Lock
.
For programmers of Java/JavaScript/C/C++/C# etc, {
/}
is more frequently used than [
/]
.
So it's not bad to swap them.
Note the first letter of the file name must be upper case. Ohterwise it does not work after reboot. See more info of xmodmap
xmodmap -pke > ~/.Xmodmap
cp ~/.Xmodmap ~/.Xmodmap.bak
vim ~/.Xmodmap
xmodmap ~/.Xmodmap
~/.Xmodmap (only modified lines, the 2nd column shift+key)
...
keycode 34 = braceleft bracketleft braceleft bracketleft
keycode 35 = braceright bracketright braceright bracketright
...
keycode 48 = quotedbl apostrophe quotedbl apostrophe
...
keycode 254 =
keycode 255 =
! Swap Caps Lock and Esc
! remove Lock = Caps_Lock
! keysym Escape = Caps_Lock
! keysym Caps_Lock = Escape
! add Lock = Caps_Lock
Use Keytweak and Keyboard Layout Manager.
I used this layout for several years. It's easy to get familiar with it. You can buy sticky paper note and override the chars on these keys.