Incorrect CAPS LOCK key behaviour? [Rant/Tutorial]

I’m pretty sure I’ve seen this a few times over the years.
I learned to type on a mechanical monster, and later on moved on to electric typewriters.

The key locks on these were mechanical…

This means you press the key down and it gets stuck down (locked) and then the caps lock is on.

To release the (mechanical key) you have to press it down to ‘unhook’ it and then release it to turn caps lock off.

Linux is correct in this regard… test it if you like.

ff <press/hold capslock> FF FF <PRESS/HOLD CAPSLOCK> FF ff

For me this is totally normal.

However, today I was roundly criticized, because this is NOT the way it happens in Windows and Mac. And we all know that Windows and Mac define correct behaviour don’t we???

So some folks use Capslock instead of Shift, and if they type fast, they have issues WIth CAps not releasing (it’s a product of behaviour learned in Windows and Mac) and so they post comments about ‘Manjaro Caps Lock Delay’ or ‘Mint Caps Lock Delay’ or some other misinformed idea.

So I decided to fix it for them… so here goes:

METHOD:

Start by creating a copy of your keyboard map:

xkbcomp -xkb $DISPLAY keyboardmap

Edit the exported file (keyboardmap) and enter the text (find the section starting with key and paste over it)

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) ] };

To apply your edited keyboard, file you do this:

xkbcomp keyboardmap $DISPLAY

Now do the typing test again. The caps lock is released when you press - and before you release the capslock key.

If you want to automate this, then write a script and put it in your startup.

#!/bin/sh

xkbcomp ~/keyboardmap $DISPLAY

1 Like

caps lock works fine for me out of the box in gnome(also xfce when I used it).

I just press the caps lock key and it enables it(I’ve small light indicator on my key, it glows when enabled) and then I type, when I’m done typing everything in uppercase, I press the caps lock key again and it disables it i.e back to lowercase letters.

I mostly use shift key for uppercase letters but when I need to type a lot in uppercase, I enable the caps lock key.

I don’t know about mechanical keyboards but for laptops this is the case for me, even for windows this is the same case :thinking:

No!!
You must both press and RELEASE it again to disable it. If you only press it, you’ll continue typing capitals until you release it.

This is actually correct, but it’s not how it works in Windows or Mac.

For people with odd typing behaviour, it is a serious bug. For me, CapsLock is only useful for TYPING SENTENCES OR LONG WORDS.

ff <press/hold> FF < release> FF <press/hold> FF < release> ff

I never need to release or hold the caps lock key, just a press or click is enough to enable or disable it and the same is true for windows too, every laptop I’ve tried works the same as I’ve described.

Maybe this has something to do with the region from where the device is bought or is manufactured. :thinking:

No.
If you ONLY press the key, then your finger is still on the key and the key is still depressed.
Now on Windows, the key activates when pressed, but on Linux it only activates when released.
So if you press the key and press, for example, the ‘a’ key BEFORE you release it, then you will get A.

There are MANY people with weird typing habits complaining about this. If you DO THE TEST then you will understand.

Whether it is hold or press, the caps lock key works as intended for me, when I’ll experience some problem I’ll just refer to this tutorial :slight_smile:

1 Like

For most of us it is quite difficult to understand, we have already taken our finger off the caps lock key before we carry on typing.

For the people who are having a problem, they are obviously hitting a key before they take their finger off the caps lock key. I cannot replicate this error with any kind of normal typing behaviour, this is why I printed a slow typing test where you deliberately put your finger on and hold the key.

There is no such thing as a simple keypress, you must first press down a key and then you must release a key. Most folks never notice.

https://wiki.archlinux.org/index.php/Xorg/Keyboard_configuration#Switching_state_immediately_when_Caps_Lock_is_pressed

Yes, I’m just on a rant after having some idiot on Reddit stir up an argument about how it’s a bug that Linux can’t bother to fix… Specifically posted as a Manjaro Linux issue as a completely rhetorical question.

I understand that many people simply don’t have enough intelligence to grasp the nature of the ‘issue’ and that it isn’t enough of an ‘issue’ to make it worth changing the behaviour (as 99.5% of people will shout out that there is no problem with their Caps Lock, and that it’s more important to give them a choice to completely change the function of the key anyway…

In the end this guy said he’d used a software to modify the behaviour so that when he presses it, it works like a double click so he only has to press it once to get a capital letter… but didn’t post his solution or say what it was - so I blocked him in the end.

I can’t see a problem there. I have now tried Windows 10 (without VM) and Manjaro. Both work as they should.

  1. I tap the Caps Lock key and I write only with capital letters.
  2. I tap the caps lock key again and I write in lower case again.
  3. If I have the Caps Lock key activated and hold the Shift key, I write in lower case.
  4. If I have the Caps Lock key not activated and hold the Shift key, I write in upper case.

It has always been this way under Windows and Linux since I can remember. And I’ve been using both for over 20 years.

Can’t understand these luxury problems…

But indeed, changing keys on the keymap is not so easy. There should be somehow a GUI for that which simplifies it.

2 Likes

indeed, it is half true though from my testing:

  • I have no caps lock enabled, I press “a” key it writes lower case letter
  • I press and don’t release CAPS LOCK key, type “a” key, it writes a capital letter, then I release CAPS LOCK key
  • I press again and don’t release CAPS LOCK key, type “a” key, it INDEED doesn’t change the case, in this situation I NEED to release the CAPS LOCK for it to change back to lower case.

Lolz banned from r/Manjarolinux after suggesting the OP was incapable of understanding the issue.

Reddit is very much similar to the old nightmare that was YahooAnswers back in the '00’s.

freggel.do’s link explains it perfectly - not an error or really an issue, but something that got changed by accident probably in Mac and Windows which should be regarded as a matter of choice.

Exactly - it’s being toted as a ‘caps lock delay’ but there IS no delay, and if you just tap it, then you won’t even notice if it’s activated when you push it down or let it up…

It seems people are trying to use it like a ‘shift’ key, saying it’s easier for them to press caps lock, hit their letter, and press caps lock again than it is for them to hold down shift, press a key, and let shift come up.

On Xfce I had the same issue and the workaround about editing xkbmap has solved the issue.
Good catch!

1 Like

This topic was automatically closed 15 days after the last reply. New replies are no longer allowed.