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

I've been baffled about this for a while. I've been trying to figure out why every time I press CapsLock key on my netbook(of some obscure make) keyboard Ubuntu will not only toggle capslock key state but also launch Thunderbird. Do you have any idea how to fix this?

Additional info:

Output of capslock KeyPress event (requested by Tom Brossman)

KeyPress event, serial 54, synthetic NO, window 0x3800001,
    root 0xaa, subw 0x0, time 453152, (14,-13), root:(715,38),
    state 0x2, keycode 163 (keysym 0x1008ff19, XF86Mail), same_screen YES,
    XLookupString gives 0 bytes: 
    XmbLookupString gives 0 bytes: 
    XFilterEvent returns: False
share|improve this question
have you been playing with/both keyboard shortcuts and CCSM as per this Q&A?… – fossfreedom Jun 28 '12 at 13:53
Nope. I found out the the problem is also reproducible in ubuntu live cd/usb environment – Flint Jul 13 '12 at 4:43
Type xev in terminal, press the Caps Lock key, and add the output of the corresponding 'Key Press Event' to your question, please. Also look for your model here on this page for more specific advice. – Tom Brossman Jul 13 '12 at 5:50
@TomBrossman Done. I don't suppose the link is relevant as my netbook doesn't have any multimedia keys – Flint Jul 13 '12 at 11:00
up vote 1 down vote accepted

Try making a new plain text file called .Xmodmap and put it in your home directory (don't forget the leading dot). In it, paste this:

keycode 163 = Caps_Lock

Save and close the file, then enter this in a terminal:

xmodmap ~/.Xmodmap

The first code should remap the Caps Lock key to the correct operation, the second should enable it so you see the desired change immediately.

Note that the .Xmodmap file you create at the beginning has to be at the root of your Home directory, and it will be a hidden file. Press Ctrl + H to see hidden files if you lose track of where it went.

If it works correctly now you are all done, you can close any open text files or terminal windows. The next time you boot up Ubuntu should see your custom .Xmodmap file and default to using it automatically. If something didn't work, please edit your question so I (or someone else) can give you some more help.

share|improve this answer

I meet this problem with Ubuntu12.04, and Tom's answer cannot solve it. The Caps Lock is bound to launch email client as a shortcut. You can change it in System Settings->Keyboard->shortcuts. I hope it can help you.

share|improve this answer

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.