CAps LOck DElay PRoblem

Quick to answer questions about finding your way around Linux Mint as a new user.
Forum rules
There are no such things as "stupid" questions. However if you think your question is a bit stupid, then this is the right place for you to post it. Stick to easy to-the-point questions that you feel people can answer fast. For long and complicated questions use the other forums in the support section.
Before you post read how to get help. Topics in this forum are automatically closed 6 months after creation.
Locked
AiOGajo

CAps LOck DElay PRoblem

Post by AiOGajo »

I am using Linux Mint 18.3 on my laptop, and I am having one problem with the Caps Lock delay.

How to fix this?

(PS: Please answers like - "Just use the shift key" are equal to "Just use Windows" since I never had this problem with this OS.)

Thank you.
Last edited by LockBot on Wed Dec 28, 2022 7:16 am, edited 1 time in total.
Reason: Topic automatically closed 6 months after creation. New replies are no longer allowed.
User avatar
MrEen
Level 23
Level 23
Posts: 18343
Joined: Mon Jun 12, 2017 8:39 pm

Re: CAps LOck DElay PRoblem

Post by MrEen »

Hello AiOGajo. Welcome to the forum!

Could you please be more specific about the problem you are having? Just a quick guess, maybe the area around that key could use a little cleaning?
samrux

Re: CAps LOck DElay PRoblem

Post by samrux »

MrEen wrote: Wed Apr 18, 2018 4:47 pm Hello AiOGajo. Welcome to the forum!

Could you please be more specific about the problem you are having? Just a quick guess, maybe the area around that key could use a little cleaning?
HEllo, I'M experiencing the same problem. A Google search suggests this has been an issue for years in all kinds of linux distros, and there has been no official bugfix. THe problem resides in that the CAps Lock key takes a fraction of a second after being pressed to disable caps lock, and as such people who use it instead of shift end up messing up their messages in the way displayed here. I thought it was my fault at first, but it's perfecty reproducible and it only happens in LInux.

I found this script: https://github.com/hexvalid/Linux-CapsLock-Delay-Fixer
It's meant to run on start-up, and if executed correctly it will fix the issue for the rest of the session. it might cause other issues though, such as disabling caps lock completely sometimes, or acting as though the row of keys above the letters have had shift pressed at the same time, if pressed immediately after caps lock. for example I?m instead of I'm
I don't know how to make it run on start-up, though; I HAve the following command set with delay 0 in Startup Applications and it doesn't fix it automatically, but it works manually:

Code: Select all

sudo bash -ic "sh /etc/capslockdelayfix/bootstrap.sh"
/etc/capslockdelayfix/ is just where I put the script, of course.
User avatar
MrEen
Level 23
Level 23
Posts: 18343
Joined: Mon Jun 12, 2017 8:39 pm

Re: CAps LOck DElay PRoblem

Post by MrEen »

This might help: https://ubuntuforums.org/showthread.php ... st12328951

It's pretty old, but a few search results seem to offer the same.
Cosmo.
Level 24
Level 24
Posts: 22968
Joined: Sat Dec 06, 2014 7:34 am

Re: CAps LOck DElay PRoblem

Post by Cosmo. »

What is your version of Mint and what is the desktop environment? Which kernel and which architecture? If you don't know open a terminal and enter:

Code: Select all

inxi -Szxx
Paste the output here.

You need to give this information for every help request in every thread.
Do not forget this in the future.

How much delay?
User avatar
lsemmens
Level 11
Level 11
Posts: 3949
Joined: Wed Sep 10, 2014 9:07 pm
Location: Rural South Australia

Re: CAps LOck DElay PRoblem

Post by lsemmens »

How much of a delay? I find no issues on any of my machines. I do however have Use Visual and Audible indicators turned on in Accessibility which may, or may not, affect it.
Fully mint Household
Out of my mind - please leave a message
AiOGajo

Re: CAps LOck DElay PRoblem

Post by AiOGajo »

Where it is:

Kernel: 4.13.0-38-generic x86_64 (64 bit gcc: 5.4.0)
Desktop: Cinnamon 3.6.7 (Gtk 3.18.9-1ubuntu3.3) dm: lightdm
Distro: Linux Mint 18.3 Sylvia


But this is a problem that I've encounter with Linux at least 10 years ago... For example I use this combination of keys:

"CAPS-LOCK" - "M" - "CAPS-LOCK" "E" "R" "Y"

I should get: Mery

But instead I get: MEry

It's so annoying! I am used to type capital letters this way - and at least there's a bunch of people that use caps as well and there's no fix at site.

:(
Cosmo.
Level 24
Level 24
Posts: 22968
Joined: Sat Dec 06, 2014 7:34 am

Re: CAps LOck DElay PRoblem

Post by Cosmo. »

So this cannot be a hardware issue, or do you run LM 118.3 on a 10 years old device?

Are you absolutely sure, that you pressed caps lock and m in the right order? Doing such kind of mistakes (e. g. writing bgu instead of bug) is not so uncommon. Because of this mistake office programs have a autocorrect function for such cases.
Last edited by Cosmo. on Fri Apr 20, 2018 9:55 am, edited 1 time in total.
AiOGajo

Re: CAps LOck DElay PRoblem

Post by AiOGajo »

samrux wrote: Wed Apr 18, 2018 5:14 pm
MrEen wrote: Wed Apr 18, 2018 4:47 pm Hello AiOGajo. Welcome to the forum!

Could you please be more specific about the problem you are having? Just a quick guess, maybe the area around that key could use a little cleaning?
HEllo, I'M experiencing the same problem. A Google search suggests this has been an issue for years in all kinds of linux distros, and there has been no official bugfix. THe problem resides in that the CAps Lock key takes a fraction of a second after being pressed to disable caps lock, and as such people who use it instead of shift end up messing up their messages in the way displayed here. I thought it was my fault at first, but it's perfecty reproducible and it only happens in LInux.

I found this script: https://github.com/hexvalid/Linux-CapsLock-Delay-Fixer
It's meant to run on start-up, and if executed correctly it will fix the issue for the rest of the session. it might cause other issues though, such as disabling caps lock completely sometimes, or acting as though the row of keys above the letters have had shift pressed at the same time, if pressed immediately after caps lock. for example I?m instead of I'm
I don't know how to make it run on start-up, though; I HAve the following command set with delay 0 in Startup Applications and it doesn't fix it automatically, but it works manually:

Code: Select all

sudo bash -ic "sh /etc/capslockdelayfix/bootstrap.sh"
/etc/capslockdelayfix/ is just where I put the script, of course.
I made the changes and it worked... but I do not know how to make a script to run at startup.
Can someone help?

THank you. <- Aghhrrr!!
Cosmo.
Level 24
Level 24
Posts: 22968
Joined: Sat Dec 06, 2014 7:34 am

Re: CAps LOck DElay PRoblem

Post by Cosmo. »

Don't miss the edit in my previous post, which I wrote, while you submitted your previous post.
AiOGajo

Re: CAps LOck DElay PRoblem

Post by AiOGajo »

Cosmo. wrote: Fri Apr 20, 2018 9:50 am So this cannot be a hardware issue, or do you run LM 118.3 on a 10 years old device?
I know this issue occurs in every Linux distro that I've encounter in the past 10 years on several devices that I had own, and if you search for CapsLock delay problem you will see threats of 2008 till today of people complaining about this issue (I search it in Portuguese as well and it's the same thing).

And yes, today I use laptop a 10 year old device and it runs perfectly fine LM 18... except for this annoying bug.
Cosmo.
Level 24
Level 24
Posts: 22968
Joined: Sat Dec 06, 2014 7:34 am

Re: CAps LOck DElay PRoblem

Post by Cosmo. »

I did now a quick search for capslock delay. The first hit and the second both give a solution. I cannot judge about them, because I have never encountered the problem myself. - Besides that I follow the first sentence in the answer in the first link, that for such an example I would never use the capslock key, but the shift key. It is made for the case of a first capitalized letter in a word.
AiOGajo

Re: CAps LOck DElay PRoblem

Post by AiOGajo »

Cosmo. wrote: Fri Apr 20, 2018 9:56 am Don't miss the edit in my previous post, which I wrote, while you submitted your previous post.
Yes, I am pretty sure that I press in the correct order. And this bug happens everywhere in the OS: Terminal, Browser, Files names, etc...

I had try this fix (from 2012):

Code: Select all

 xkbcomp -xkb $DISPLAY /home/username/myxkbmap 
Now you'll have a file named myxkbmap in your home directory. Open that file with your text editor and edit the key <caps> entry like this:

Code: Select all

  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) ]   }; 
Save it. And then reload it:

Code: Select all

 xkbcomp /home/username/myxkbmap $DISPLAY 
You can write an executable startup script so that you won't have to do this everytime X starts.

Like:

Code: Select all

#!/bin/sh

xkbcomp /home/username/myxkbmap $DISPLAY
Save this with any name you want. Make it executable. And make it one of your startup programs.
And it worked out, but only for this session.
However I did not understand how can I make the script (the last part)... the "#!/bin/sh" thingy... :(
AiOGajo

Re: CAps LOck DElay PRoblem

Post by AiOGajo »

Cosmo. wrote: Fri Apr 20, 2018 10:06 amBesides that I follow the first sentence in the answer in the first link, that for such an example I would never use the capslock key, but the shift key. It is made for the case of a first capitalized letter in a word.
In a business, if people start using your product in a way that wasn't originally designed for you should NEVER tell them to stop using it or force them to use the way you want... it's your company that have to change. This is a golden rule* in management. *there are exceptions, of course, when hazards are involved for example.

It makes more sense to me to use Caps Lock because it's a key only for letters while shift you can use it with letters or numbers to activate other key function - but that's me. And there's a lot of people that use the caps lock this way. Personally I write comfortably this way for more than 20 years now I it will be more easy to me to change OS than change the way I use my keyboard.

But moving on, can you help me with the last part of the tutorial?

Thank you.
Cosmo.
Level 24
Level 24
Posts: 22968
Joined: Sat Dec 06, 2014 7:34 am

Re: CAps LOck DElay PRoblem

Post by Cosmo. »

Regarding the first 2 paragraphs: As you like. Note, that I wrote, that I would never use capslock in such a case. And that should match with your golden rule.

Regarding the tutorial: Which tutorial are you referring to?
AiOGajo

Re: CAps LOck DElay PRoblem

Post by AiOGajo »

This part:

Code: Select all

#!/bin/sh

xkbcomp /home/username/myxkbmap $DISPLAY
Save this with any name you want. Make it executable. And make it one of your startup programs.
How can I do this? I am not understand this part :(
Cosmo.
Level 24
Level 24
Posts: 22968
Joined: Sat Dec 06, 2014 7:34 am

Re: CAps LOck DElay PRoblem

Post by Cosmo. »

This means the following:
You enter or paste the code in your text editor and save the file. Now open the properties of this file (mark it in the file manager and press alt-Enter) and activate the executing permission. At last you open the autostart programs of the system and add the script to it,
Locked

Return to “Beginner Questions”