0

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
Flint
  • 3,151
  • have you been playing with/both keyboard shortcuts and CCSM as per this Q&A? http://askubuntu.com/questions/35783/remap-caps-lock-key-to-run-command-altf2 – 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 04: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 05: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

2 Answers2

1

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.

Tom Brossman
  • 13,111
0

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.