Yesterday I installed Ubuntu on my Laptop, but there's a problem with Caps Lock. When pressing the Caps Lock button, there is a small delay before it actually toggles. This problem does not show up in Windows 7.

I'm learning Java and Android and the Caps Lock delay problem is really bad. For example:

SYstem.out.println("HEllo UBuntu!!);

Does anyone knows how to fix this? I've seen a lot of people saying "use Shift", but is there any other way to fix this delay?

share|improve this question
    
E: Not Reproducible You need to provide more details - this might be a hardware-specific bug. – Thomas Ward Jan 17 '15 at 13:38
    
I don't think so, I have Windows 7 and Ubuntu in this Laptop and caps lock in W7 works fine. – eustass Jan 17 '15 at 13:40
up vote 3 down vote accepted

Learn to use Shift instead, that is the common way to enter a capital letter.


If you want to hit Caps Lock anyway to produce a capital letter, do note that there are reports that the delay is a known issue ((Launchpad Bug #1376903). The Arch Linux wiki describes a method to remove this delay which seems to work.

For your convenience, this script performs the manual steps documented at that wiki page:

#!/bin/sh
xkbcomp -xkb "$DISPLAY" - | sed 's#key <CAPS>.*#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)]\
};\
#' | xkbcomp -w 0 - "$DISPLAY"

This needs to be started as part of your desktop session (do not use Upstart for example). See this post for a method, do not forget to enable the execute bit of the script.

share|improve this answer
    
Thank you for your time, I think I'll start using Shift. :) – eustass Jan 17 '15 at 14:03
    
Oh, I thought it was much harder to change behavior. I guess the hassle was not worth it to stick to Caps Lock :P – Lekensteyn Jan 17 '15 at 14:44
    
Who, hold down shift to type all the letters that capitalized or lowercase? – Ahmet Erkan ÇELİK Oct 2 '15 at 18:02

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.