Ask Ubuntu is a question and answer site for Ubuntu users and developers. Join them; it only takes a minute:

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

How do I make the Caps Lock key work just like another Shift key?

There are loads of questions here about reassigning it, or having it launch a custom command. I just want it to work like another Shift key. I don't want any other keys to change what they do, just that one.

Keyboard Layout/Caps Lock key behavior won't do it, I don't understand how to remap it in CCSM.

I'm using a UK keyboard now but I learned to type on a US keyboard, the smaller left Shift key is DRIVING ME NUTS.

share|improve this question
up vote 5 down vote accepted

You can get there by adapting How to change CapsLock key to produce “a”? (for example).

Remove the Lock (= Caps Lock) modifier from the Caps Lock key, and declare that this key sends the Shift_L keysym.

remove Lock = Caps_Lock
keysym Caps_Lock = Shift_L

Alternatively, you could remove the Lock modifier and add the Shift modifier.

remove Lock = Caps_Lock
add Shift = Caps_Lock

Either way, these lines go into the file ~/.Xmodmap. Test by loading it with xmodmap ~/.Xmodmap; the file is read automatically when you log in under the default environment (or at least it was in the Gnome days).

share|improve this answer
Perfect, that worked. I made a new empty document in my home directory called '.Xmodmap', and pasted your first example into it. Then I typed 'xmodmap ~/.Xmodmap' in the terminal to make it take effect immediately. These are both explained in the linked answer. Thank you. – Tom Brossman Nov 26 '11 at 21:44

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.