Changing Caps Lock to Shift in Linux

by on Jul.20, 2009, under thoughts

After a lot of figuring out how xmodmap works, I’ve finally been able to get my caps lock to work as a shift key, instead a locking key. There are actually two steps to this, the second one being the tricky part. Just create a file called .Xmodmap in your home directory with the following contents:

remove Lock = Caps_Lock
add Shift = Caps_Lock

This removes the lock from caps lock (so it’s a press-and-hold, not a toggle), and makes it a shift key, even though the computer still recognizes it as the caps lock key. If you wanted to get fancier, you could make the computer recognize it as the left shift key with the following:

remove Lock = Caps_Lock
keysym Caps_Lock = Shift_L
add Shift = Shift_L

The tricky part here is realizing that after you tell the computer that Caps Lock is actually left shift, you need to add this key to the “shift” list, even though it’s already there. I don’t quite understand this, but I know that it’s necessary.

Have fun getting rid of that annoying caps lock key!

:, , , , ,

Leave a Reply

Looking for something?

Use the form below to search the site:

Still not finding what you're looking for? Drop a comment on a post or contact us so we can take care of it!

Visit our friends!

A few highly recommended friends...