Take the 2-minute tour ×
Ask Ubuntu is a question and answer site for Ubuntu users and developers. It's 100% free, no registration required.

I use Caps Lock to change keyboard layout since the first year with Linux.

Now, somewhere in the last year some patch added something so now it waits for ~300ms before changing the layout. And if I hit any key before that time ends it doesn't work. AFAIU it's somehow related to using Meta/Win both as modifier and as key. Is that interval tweakable? I don't use it as a modifier at all.

share|improve this question

3 Answers 3

I use Shift + Caps Lock to trigger the keyboard layout switch.

When using both layouts, I very frequently switch back and forth, and the switch seems instantaneous. That is, I never experience a hang (and I'm a fast touch typist - on both layouts).

Maybe worth considering?

share|improve this answer
1  
Agree to that. Perhaps worth mentioning is that keyboard layouts settings can be found in: System Settings >> Keyboard >> Layout Settings (which is a tiny link in the bottom left corner of Keyboard window, Typing tab), it is not in Shortcuts... That's assuming you use Ubuntu 12. –  catalesia Mar 1 '13 at 15:52
    
Plus, it's possible (can't remember off the top of my head exactly how) to put a flag in the top bar indicating your layout... you can even customize your flag (and/or found your very own separatist nation state and hoist your own personalized flag!) ... ;) –  nutty about natty Mar 1 '13 at 16:01
    
I appreciate your effort and suggestion but I strongly disagree. I need the Caps Lock only. –  int_ua Mar 1 '13 at 21:13
    
Again, I don't understand those who upvote this solution since it's forcing your habits to someone else. I didn't ask about any alternatives. –  int_ua Mar 5 '13 at 4:28
    
I'm so disappointed because if the situation doesn't change half the bounty is going to be awarded to this answer automatically. –  int_ua Mar 5 '13 at 5:12

Though not a fan of apple, the observation in a SOLVED thread (on apple.com) that switching on the Caps Lock light (or keeping it lit? whatever... ) could be causing a delay might be a pointer into the right direction: the work-around suggested in the thread involves using 3rd-party software to emulate certain key combinations.

What comes to mind as an equivalent in the Linux world is xdotool (see the man page, which has some basic examples). Specifically to your case, you may want to try sth like xdotoolkeyCaps_Lock as used in yet another SOLVED thread (on ubuntuforums.org).

According to my own experience (unless you're willing to really go a level deeper) you'll have to play around with different key combinations and xdotool to find the magic combination which really does work smoothly. But definitely worth giving it a try!

share|improve this answer
    
Read the updated question. –  int_ua Mar 3 '13 at 1:03
up vote 0 down vote accepted
cd /usr/share/X11/xkb/symbols
sudo cp capslock capslock.bak
sudo sed -i 's#key <CAPS> {\t\[\tISO_Next_Group,\tCaps_Lock\t]\t};#key <CAPS> {        repeat=no, [ ISO_Next_Group, Caps_Lock ] };#' capslock

Update:

You also have to release the Caps Lock before pressing another key.

Related: Any way to make Caps Lock change keyboard layout right after keydown?

share|improve this answer
    
Great to hear if that's working for you! btw, have you perused How can I change what keys on my keyboard do?, yet ? –  nutty about natty Mar 3 '13 at 5:42
    
Not yet :) I'm familiar with xbindkeys, xev and xmodmap. Should I? –  int_ua Mar 3 '13 at 21:23

Your Answer

 
discard

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.