I need switch keyboard layout by Caps Lock.
I did System Settings -> Keyboard layout -> options -> keys to change layout -> caps lock and it works.

But sometimes I press Shift + Caps Lock and I get angry, so I want to block Shift + Caps Lock to have upper case. How can I achieve this? I tried to select System Settings -> Keyboard layout -> options -> Caps Lock behavior-> disable Caps Lock, but after that Caps Lock doesn't change layout, as I want.

OS is Ubuntu 11.10

What should I do to achieve this?

Started bounty

  • Can you clarify this a bit? What is Shift+Caps Lock supposed to do? What does it do now? – Daniel Oct 22 '11 at 14:58
  • @daniel: now it works as CapsLock[Before I make CapsLock to switch layout](IT IS WIRTTEN AFTER i PRESS sHIFT+cAPSlOCK). But I want to make it do nothing. – RiaD Oct 22 '11 at 15:03

Your best option would probably be to disable the Shift+Caps Lock key combination by mapping it to doing nothing. That way every time you mistakenly type it does nothing. I haven't tried it but here's something that might help.

After a few trials, I can recommend the following alternatives:
1. Set your "Key(s) to change layout" to "Caps Lock (to first Layout), Shift+Caps Lock (to last Layout)" and put your 2 languages in the correct order so that your Caps Lock changes and Shift+Caps Lock changes back. (However I'm assuming this won't do either since you mistakenly press Shift+Caps Lock)
2. Set your "Key(s) to change layout" to "Shift+Caps Lock" instead. At least this way you're more conscious of your error.

Hope I helped.

  • making CapsLock and Sift+CapsLock to change layout sounds great but didn't work on my PC. I will try first way(map to do nothing), thank you – RiaD Oct 26 '11 at 13:50
  • It took me a few seconds to realise what it does. Hitting "Caps Lock" stays in the language you're currently on (probabably the default one). So to change the language the first time you need to do "Shift+Caps Lock" and "Caps Lock" to change back. I'm sure you tried both, but since I got stuck I thought of mentioning it. – Theo Scholiadis Oct 26 '11 at 13:55
  • I tried check both CapsLock and Shift+CapsLock to change layout, but after that CapsLock doesn't change it. I'll try to make Shift+CapsLock do notning by other way, throught – RiaD Oct 26 '11 at 17:34
  • No you mustn't set them both. If you do, it picks whichever was checked last. At least that's what it seemed like when I tried it. – Theo Scholiadis Oct 26 '11 at 17:46

Try this:

xmodmap -e "keycode 66 = "
xmodmap -e "clear Lock"

Not sure if its permanent though.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

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