Ignoring my previous attempts at answering that failed, I found something that turns capslock completely into left shift. No toggling, I think it's persistent, and it's pretty simple.
First, I'd recommend making a backup, before I introduce how to change it.
Run sudo cp /usr/share/X11/xkb/symbols/pc ~/pckeybak
Now that there's a backup, let's get to the editing.
Use your favorite text editor to edit this file as root:
/usr/share/X11/xkb/symbols/pc
Find the segment that looks like this (it's near the top, line 22 for me):
key <TAB> { [ Tab, ISO_Left_Tab ] };
key <RTRN> { [ Return ] };
key <CAPS> { [ Caps_lock ] };
key <NMLK> { [ Num_Lock ] };
edit
key <CAPS> { [ Caps_lock ] };
to be
key <CAPS> { [ Shift_L, Caps_Lock ] };
instead. (The Caps_Lock
after Shift_L,
may be unnecessary.)
Restart your display manager (usually sudo service lightdm restart
) and capslock will now be left shift. (Note: My test machine uses GNOME, so I had to restart gdm
. However, that caused some weird flickering in the fallback TTY, and gdm
never restarted. I had to completely reboot.)
This one I was actually able to test, and can confirm it works.
Adapted from Permanent xmodmap in Ubuntu 13.04
xmodmap
doesn't work.