Update (undated): I no longer currently use the described method, as I've started using Caps Lock as Ctrl circa 2018.
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 switchIf 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...
Contra
As with all good things in life, Caps Lock switching comes with a few bad points:
- 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
orAlt-Shift
beforehand. - Other people would be surprised. It's the previous point, but with a twist. Same logic applies.
- 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
Linux
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.
Windows
When I used Windows, I rolled with
lswitch.exe
, which is available from
https://haali.su/winutils/. 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 https://pqrs.org/osx/karabiner/ (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 mt@marinintim.com.
Changelog
- 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