14

This is my biggest issue with Linux and the main reason I don't use it as my main working OS.

Whenever I use caps lock to write something in upper case and disable it in order to keep writing the next letter AFTER I've disabled it is written in upper case.

So, my text comes out weird, as SOMETHING *L*ike this

I've tried Linux Mint, Fedora ... and the issue keeps happening.

Searching Google I've found some very rare persons have the same issue, but I was unable to find any solution.

Is there any way to solve this or am I DOOMED *F*or life?

BTW, whenever I ask this question someone suggest I should learn to use shift, instead of caps lock. I know, that's the right way, but I'm used to use caps lock and, well, it should work.

9
  • What is your keyboard (model and wired/wireless) and Ubuntu version?
    – belacqua
    Sep 8, 2011 at 21:32
  • Maybe we're attacking this the wrong way. Do you need caps lock? If not, then it'd be fairly easy to remap it to nothing - so when you hit the capslock key it won't do anything.
    – jrg
    Sep 10, 2011 at 12:57
  • I had this problem a few years ago, and I fixed it. Or it went away. I've just looked back at old xorg.conf files, and I think that maybe the following line (in the Keyboard "InputDevice" section) might have fixed it. I'm really not sure though... : Option "AutoRepeat" "500 30"
    – ed.
    Sep 21, 2011 at 18:37
  • 1
    @GeorgeEdison It is not "obviously" not a hardware issue. Souljacker, you should try with a different keyboard on that computer and also try the faulty keyboard on another computer, with a linux OS. If the new keyboard works, probably your keyboard lacks compatibility with linux. If the new keyboard has the same problem, or something similar, I would start thinking the problem is your computer. If the old one doesn't work on an other pc, it is the faulty keyboard that is the problem. Replace it. Jul 4, 2012 at 14:08
  • 1
    Why not just make the Caps Lock key another Shift key? Sep 1, 2012 at 9:40

4 Answers 4

6

This is quite easy to fix. I have successfully used this technique on two people with a 100% success rate:

  1. Put the blade of a knife or tip of a flathead screwdriver underneath the capslock key.
  2. Twist.

The key should come flying off and you can dispose of it the best way you see fit. The recovery from such an operation is surprisingly short. Your little finger (what should be controlling that stuff) should quickly learn to find the shift key.


In all seriousness this is a long-standing but extremely rare bug. By long-standing I mean there are reports of it occasionally popping up all the way back to 2003.

Ultimately this is something you either have to get onto (hunt down an X developer, give them your laptop for a few weeks and probably pay them for their time), or put up with.

I would opt for learning to type properly. It's much quicker with the Shift key.

2
  • Unfortunately, some people use capslock to switch keyboard layouts. This is very handy if works correctly. May 12, 2014 at 11:03
  • I don't think is particularly a problem with the laptop. I have this problem on every Ubuntu I ever used, even other Debian distros if I'm not mistaken for at least 5 different computers. I believe the bug it's constant and is just that not many people use Caps Lock but they use Shift. PS: never had this problem with Windows, I normally use dual boot everywhere so same hardware as well. Dec 3, 2019 at 12:52
2

Try with a different keyboard on that computer and also try the faulty keyboard on another computer, with a Linux OS.

  • If the new keyboard works, probably your keyboard lacks compatibility with Linux.
  • If the new keyboard has the same problem, or something similar, I would start thinking the problem is your computer.
  • If the old one doesn't work on another PC, it is the faulty keyboard that is the problem. Replace it.

Source: comment by David M. Sousa

1
  • I tried this in 3 laptops and 2 desktop machines. All 5 with dual-boot. Never had this problem with Windows and I do have them on all 5 (at least). I don't remember ever using an Ubuntu machine in my life without having this problem. I believe the issue is more a Soft one. Dec 3, 2019 at 12:55
0

There are keyboards which have DIP switches to override the Caps lock key if you are willing to replace your keyboard or use an external one.

0

I'm not sure why people say this is such a rare issue, it happens to me on every distro regardless of keyboard or computer. Using shift is a good workaround since it will save you time and make your life easier in the long run. I type very fast, however, so I constantly run into this caps lock issue and using shift hasn't been worth my time until now because it slows me down.

You can change the keyboard map on most distros to fix the issue (ish) by doing the following:

xkbcomp -xkb $DISPLAY /home/yourusername/myxkbmap

nano /home/yourusername/myxkbmap

Once you're editing the file, locate the part that says key <CAPS> and remove it. You'll find it about halfway down the file.

Replace that line with this: key <CAPS> { repeat=no, type[group1]="ALPHABETIC", symbols[group1]=[ Caps_Lock, Caps_Lock ], actions[group1]=[ LockMods(modifiers=Lock), Private(type=3,data[0]=1,data[1]=3,data[2]=3) ] };

Then save and set the file to your keyboard map by entering xkbcomp /home/yourusername/myxkbmap $DISPLAY

Limitations

This is not a perfect fix, and you'll notice that this kind of turns the caps lock key into a shift key itself. So before you would get something like this: "I'M jason" and now you'll get "I"m jason".

This is a minor inconvenience since the only time you would notice this is if a character came right after a capital letter (like "I'm", but those are uncommon).

Feel free to set this as a startup script to run each time you turn on the computer. Note: when you start from sleep the keyboard map resets so you'll have to manually run your script again.

Known instances of this not working

For some odd reason, this fix only works on Debian/Ubuntu based distros (as far as I've tested it). So forget it if you're using Fedora or OpenSUSE or something else non-Debian.

Also, this fix oddly doesn't work on newer kernels. I use Ubuntu 20.04 LTS a lot because it's the most recent LTS for me. As far as I've tested it works on every version except 21.04 or higher.

I'm on the hunt for a fix for 21.04 and other systems, but since the amount of people who use caps lock to capitalize is few, almost nobody knows what the issue is or how to fix it.

Besides that, this does work really well for me on almost every system I've ever needed. It's always the first thing I set up when I switch to a new distro. It's sad that it doesn't work on newer Ubuntu versions though. If this truly bugs you, give it a try and you might save yourself some sanity.

1
  • "Also, this fix oddly doesn't work on newer kernels." I do not think that the kernel has to do anything with this. The not so odd reason why it is not working on Ubuntu 21.04 is the use of Wayland.
    – Bruni
    Jun 9, 2021 at 13:45

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.