Today’s article is one that I used to scratch my own itch because I really like to disable the caps lock key. Of all the keys on the keyboard, that’s the only one that makes me want to disable it. The rest of the keys are fine, but I have no use for a caps lock key.
NOTE: This is probably not going to work if you use Wayland. I don’t know, I haven’t tested it. If you’re wanting to test it so that you can write paragraphs about how wrong I am, please do. I’m a little curious! I need to learn more about Wayland.
Sure, we could use the destructive (or at least awkward) method and physically rip the key off the keyboard. Some fancy keyboards have easily removed caps, meaning you can just remove them with a little caps-puller tool. Pretty much every time I’ve needed to remove keys, it has been a permanently destructive process, but I know it can be done.
By the way… This is why I’m a wasteful jerk sometimes and I just chuck that keyboard in the trash when I’m done with it. To be fair, I wear the letters off a cheap keyboard. Where my thumb hits the space bar it wears down the plastic from repeated use. I’m not a ‘hard typer’, I’m a prolific typer. So, here we are…
Those of you with a keen memory may recall this article:
Disable The Caps Lock Key In Linux Mint
That was fine for Mint (Cinnamon)… It’s not a universal thing. I meant to write a more universal thing, so I guess this counts as that…
Disable The Caps Lock Key:
You’re gonna want a terminal window open for this. So, press
Now, the tool we’ll be using is called ‘xmodmap’. See that ‘x’ in there? Yeah, that’s what (along with the description) makes me unsure if this is going to work for Wayland users. If you’re using a major distro, especially one using X, you’ve got this tool installed by default.
When xmodmap is not installed, the package name should be ‘x11-xserver-utils’ in Ubuntu and it’s fairly safe for other distros to assume the appropriate package will show up if you search your repositories for it. If you need to install it, say with a distro that uses apt (and you shouldn’t), then the incantation would look like this:
1 | sudo apt install x11-xserver-utils |
Got it? Is it installed? You can check if it’s installed with this command:
1 | xmodmap -version |
Now that you know you have xmodmap installed, you can just use the following command to disable the caps lock key:
1 | xmodmap -e "remove lock = Caps_Lock" |
Should you change your mind, which you shouldn’t because caps lock is evil and gets in the way of perfectly good typing technique, then you can undo this. Try this command, it should work:
1 | xmodmap -e "add lock = Caps_Lock" |
That right there should get rid of your caps lock key’s functionality. You should be able to press the key and have exactly nothing happen, which is a good thing.
Closure:
Yes, I know the Internet Wisdom© insists that “caps lock is cruise control for cool” but just don’t… No… Just don’t do that. Really, don’t do that!
Try as I might, I can’t think of a legitimate (for me) reason to use caps lock. I never use it on purpose. If I need a few capital letters, the regular shift key works just fine. I have two hands, after all.
So, if you’re like me and don’t want to be cool (and have fewer hassles) go right ahead and disable that caps lock key. I sometimes press it by accident while typing and not looking. It just makes a mess of things. While I type like a demon on fire, I don’t hold my hands in the correct position and don’t use the right fingers for the right keys. I press that ****ing caps lock key way too often, so disabling it makes my life easier.
Thanks for reading! If you want to help, or if the site has helped you, you can donate, register to help, write an article, or buy inexpensive hosting to start your site. If you scroll down, you can sign up for the newsletter, vote for the article, and comment.