Linux – Ubuntu doesn’t release caps lock

capslocklinuxUbuntu

I usally use the Caps Lock to write the first capital letter of a word, and it happens that when i release it, ubuntu waits before effectively releasing the caps lock.

i.e. if on the keyboard i press

CAPS-LOCKMCAPS-LOCKERY

It should print

Mery

but in fact i get

MEry

Now i have to activate the caps lock, press M, de-activate the caps lock, wait about a second an then finish writing the word.

Is there a way to solve it?


UPDATE

It's strange, I think that keyboards send signals which are actually the ASCII code for symbols or instructions. So, there must be a way how the OS takes and manages this signal. Ok, they're processor interruptions at last but I don't think interruptions are the matter here. You should edit your question and give info about Ubuntu version, either 32 or 64 bits, graphical interface and probably keyboard brand. Check about any keyboad driver?

I'm having this problem with keyboard since Ubuntu 10.04, i'm currently running Ubuntu 12.04 LTS x64, keyboard brand is logitech for the USB keyboard, but i have the same problem with the laptop integrated keyboard (it is an Asus A55VM)

Best Answer

This is actually a quite interesting problem, despite my first notion to "just use the shift key" you, I think that's not an option. After all Linux is mostly about customizing the experience, so that must be part of it.

Enough chatter, let's cut to the chase. This bug has already been reported as #27903 back in 2010 (and marked as RESOLVED FIXED in September 2012) on the freedesktop.org bug tracker. I'll now quote some comments from that bug report to spare you some of the back and forth:

Burak Çalık 2010-04-29 15:12:36 UTC

The problem occurs if you are used to typing capital letters using capslock button instead of shift and if you are writing too fast.

For example, you can see the same sentences which were written in windows and linux;

In Windows: "Hello friends. How are you today?"

In Linux: "HEllo friends. HOw are you today?"

While you are writing, capslock sticks opened on Linux.


Andreas Wettstein 2011-08-07 01:14:52 UTC

Created attachment 50006 [details] [review] Support noLock and noUnlock in xkbcomp

This patch to xkbcomp allows to specify the noLock and noUnlock flag in a more natural syntax. Instead of the Private action shown before, one now can write "LockMods(modifiers=Shift+Lock,affect=unlock)".


Peter Hutterer 2011-08-10 23:47:42 UTC

(In reply to comment #26)

Created an attachment (id=49973) [details] noLock and noUnlock in _XkbFilterLockState

forwarded to the list thanks. http://patchwork.freedesktop.org/patch/6691/


Peter Hutterer 2012-03-05 22:15:36 UTC

commit e3f6a76dd480717eae4b17ad8e2ff707de2ffe4c Author: Andreas Wettstein Date: Thu Aug 11 16:33:33 2011 +1000

xkb: Support noLock and noUnlock flags for LockMods

Peter Hutterer 2012-06-17 22:38:56 UTC

(In reply to comment #34)

I have xorg server 1.12 installed. I believe i just have to define caps lock as described in comment #27. But i have no idea which file to edit, would you please help?

xkbcomp -xkb $DISPLAY my_xkbmap
then edit my_xkbmap and re-load it as
xkbcomp my_xkbmap $DISPLAY

Peter Hutterer 2012-06-18 19:54:25 UTC

(In reply to comment #37)

Thanks a lot. The caps lock delay problem is gone away now. Is this method permanent or do i have to load my_xkbmap everytime i start x?

Andreas, can you please file a xkeyboard-config bug to get this snipped introduced by default into the keymap. I think it's useful enough to carry it.


Andreas Wettstein 2012-10-28 13:18:01 UTC

Andreas, can you please file a xkeyboard-config bug to get this snipped introduced by default into the keymap. I think it's useful enough to carry it.

Sorry for wasting another four months. Now it is there, bug 56491.

So there is a patch floating around which solves one half of the problem. The referred to bug report #56491 lives in the same bug tracker, but still carries the status NEW.

From that bug there's nothing to quote, only some back and forth between developers on why and how to fix it.

So yes, this problem still persists, but people are working on it. There are further instructions, debugging information and workarounds in the bug #27903 apart from what I quoted. There is also a patch-set in #56491 which is supposed to fix this bug (but as said, they're discussing that).

Related Question