Use Caps Lock, Luke!

written by Tim Marinin, @marinintim on 2016-08-16

If you're multilingual (I'm native Russian, but speak JavaScript as well), there is a small life hack that'll enhance your human-computer interaction immensely.

Use Caps Lock as a language switch

If you're an ordinary fellow human, chances are that you're using Alt-Shift or Ctrl-Shift to do that. Caps Lock is just one button, it's big enough on most keyboards, and you don't need original Caps Lock functionality that much often anyway.

Benefits, expanded

As a programmer, I write a lot of text everyday. I suspect that great part of it are just ASCII values — English, JavaScript and alike all use the same layout (aside: although I'm thinking about programming-specific layout). On the other hand I communicate with colleagues in Russian, often switching back and forth in the middle of a message. As I was unaware of alternatives, I didn't think that it could be improved. And as I learned about Caps Lock mapping, I didn't believe in the Power Of One Button until I've tried it for myself. Two days later I thought it was the most natural way to switch languages ever seen in the human history since Babel Fish.

If you've used Vim for more than accidentaly making your computer beep, then you know how good it feels to do things with just one keypress. If you prefer Emacs, then you have a mule-titude of other options that don't break all the C-o M-b o s. System switching doesn't do you any good, so think about mapping toggle-input-method to Caps Lock.

If you do not remap Caps Lock, then it's just a useless key. Remapping gives it a purpose, and a noble one. You'll feel like a Pro switching layouts. Speaking of pro...


As with all good things in life, Caps Lock switching comes with a few bad points:

  1. You'll miss it on other computers. You'll press Caps Lock, expecting it to do the thing, but it'll do THE THING. I think that is a valid counterargument, but it doesn't bite you as much as using Dvorak, for example. And you already have this inconvenience, because you can't tell if it's Ctrl-Shift or Alt-Shift beforehand.
  2. Other people would be surprised. It's the previous point, but with a twist. Same logic applies.
  3. Nope, I can't recall any other arguments.

    It won't help you to exclude these situations when you typed a whole sentence in a wrong language. If it bothers you, check out Punto Switcher (Windows-only, and I'm not sure if it works with any other layout pairs aside from Winkeys-Winkeys Cyrillic)

How to switch


On Linux you can set xkb map with aptly named utility setxkbmap:

$ setxkbmap -option grp:caps_toggle -option grp_led:caps

That will set Caps Lock as a switch for current session and use Caps Lock LED, if you have one, to display current layout (apparently, useful only if you use two layouts). To preserve this behaviour, put it in ~/.xsessionrc or what have you.

Original ALL [I WANT IS TO WRITE IN] CAPS is still available to you as Shift-Caps Lock. But think twice before using it, please.


When I used Windows, I rolled with lswitch.exe, which is available from As far as I remember, it makes original Caps Lock available as Shift-Caps Lock as well. I've seen recommendations about AutoHotKey and alike, but didn't try it.

Mac OS X

I do not own any version of Mac OS X, so I don't know how it could be done there. I was told that it could be done via (h/t @astralian, @denex).

It's a little bit sad that system praised for its usability doesn't allow you to do that natively, but hey, there is a way!

About this document

I've written this so the next time I got asked about why do I change layouts the way I do, I could just send 'em a link.

If I convinced you, give it a try and tell me what you're thinking via twitter @marinintim or email


- v 1.3, 2016-10-21 — reformatted to Markdown
- v 1.2, 2016-08-16 — add Mac OS X section
- v 1.1, 2016-08-16 — fix few mistakes
- v 1.0, 2016-08-16 — initial release

You can subscribe to my newsletter, which is about the same things as my posts, but in your inbox instead of the browser.

powered by TinyLetter