Changing Caps Lock Key to Escape When Pressed Alone and Control When Pressed With Another
Like you before, I pretty much didn’t give a damn about remmaping my mapping keyboard because I was worried about what if I’m using someone elses keyboard? I’d be too dependent about my current setup.
But let me ask you. When was the last time you used someone elses keyboard?
After some time living inside the terminal, I noticed that it’s quite hard to press the control
key especially
when you are using a Mac keyboard layout.
It was kinda annoying to reach the control
key when I want to stop a running program via <Control C>
or clearing the screen with <Control L>
.
It was when I was browsing through reddit and found a post where people using Vim
were suggesting to remap Caps Lock
to Escape
and some were also suggesting to remap Caps Lock
to Control
. My current configuration in Vim
already mapped jk
to Escape
so I took the route of mapping Caps Lock
to Contol
. Also, I don’t use caps lock much often.
After a few weeks of getting used to my new Control
, everything felt easier! I almost even questioned why the Caps Lock
key was
positioned in that beautiful spot and we don’t even use it that often.
So, you might be asking what happened to my Caps Lock
key? I found a tool called Karabiner Elements
and it basically lets me
create key combinations to execute another key. I trigger my Caps Lock
key by pressing Right Command + Right Shift
key together.
Thanks to karabiner, I also converted my Caps Lock
key to be Escape
when pressed alone and Control
when pressed with another key.
Here’s how to configure it via Karabiner Elements
:
- Download and install it first here: https://karabiner-elements.pqrs.org/docs/getting-started/installation/
- Next, open Karabiner Elements and click
Complex Modifications
, then click onAdd Rule
. - Click
Import rules from the Internet (open a web browser)
- Search for
caps lock
and then look forChange caps_lock key (rev 4)
then click onImport
. - Something similar to this should appear and you should click
Enable
:
And we’re done!