I meant to write this post in 2017, I have managed to procrastinate 3 years before finally getting around to it.
Apple being Apple and pulling an Apple
The year is 2017, and I had just started my internship at Indeed. Apple had just released their new, bold, courageous, Macbook Pro that decided that ports and physical buttons were a thing of the past. I found the backlash pretty amusing at that time. “That’s what you get for choosing to use Apple I guess.”, I mused hypocritically, using the 2015 Macbook Pro (with physical buttons) that my company gave me to work on. It became much less amusing when I was provided with the 2017 Macbook Pro (with no esc key and a really useless touch bar) on my first day of work. It dawned on me that this would be my reality moving forward, that I am subject to the whims of that big corporation that I dislike so much.
Indeed would not be the first company that will insist I use a Mac to code. True enough, here I am typing this on yet another Macbook with no escape key, because everyone in Silicon Valley seems to be using a Macbook to develop websites for some reason, but I digress.
As I was grappling with the loss of my escape key, I tried to convince myself that I didn't really need that key. I do not code much on vim, and I could not think of any use of the escape key in my day to day off the top of my head. Boy was I wrong. I spent the first couple of days hitting (and missing) the non existent escape key on my mac. It got to a point where I started to notice all the times where I do use the escape key that I never noticed before. Here’s the non exhaustive list that no one asked for.
- Closing a dialog box in browsers.
- Closing dialog boxes in Slack
- Closing any dialog box in rubymine/android studio/intellij
- Closing any dialog box in VS code
- Did I mention closing dialog boxes?
- Cancelling a find and replace in code editors
- Cancelling multi cursors in code editors
- Cancelling code completion in code editors
- Closing the spotlight search / start menu
- Quitting a game or getting the menu
- Doing anything in vim
- Closing a chat in Telegram
- Closing the context menu when I accidentally press alt or click the wrong thing.
- Rage mashing the escape key when the computer is jammed
In theory, I could use my mouse to do all of the above actions, except the last one and that was simply unacceptable.
One solution was to get used to the touch bar and accept it as a fact of life. But this would mean that when I switch back to a real keyboard on a real computer, I would end up having to deal with an escape key that felt different.
Another solution was to simply use an external keyboard at all times. But this meant that I would not be able to use my laptop in bed. (Incidentally, I have solved this problem and I will be writing another post about it. Maybe it’ll take another 3 years for me to do so.)
The solution that I arrived at was to remap my caps lock key to escape. It actually made the most sense and I’m surprised that I did not think of doing that much earlier. I guess I never needed a solution to a problem I never really had.
On a tangential note, keys that change the state of the keyboard are terrible. I strongly believe that a keyboard should be stateless. Meaning that you should never have to keep track mentally or visually which state your keyboard is in if you aren’t actively pressing anything. The caps lock key has done nothing for me except cause typos. I can very confidently say that I have only enabled caps lock lock key by mistake. 3 years later, I have not once missed having caps lock.
Remapping on a Macbook
Remapping the key on a mac was straightforward enough. Apple had apparently decided that some people might want to remap the escape key and had included it as an option in the latest MacOS.
Remapping on Windows with Software.
On Windows, the remapping was also straightforward enough. I was using a Razer BlackWidow at the time. It allowed me to remap any key on my keyboard using their Razer Sypnapse software. Even if I didn't have Razer Sypnapse, there are plenty more software that allow remapping on Windows. One such software is AutoHotkey. The benefit of software remapping is that you can also do per application key maps. But that was not a feature that I needed.
Remapping on MacOS with Software
Now if I wanted to use my keyboard on my mac, I would need to remap the caps lock to escape via a software solution. I am not sure if Razer Synapse existed on a mac, and I wasn’t keen on installing it on my work laptop anyway. It wasn’t necessary, it turns out. There are plenty of key remapping software that exist on mac as well. I used Karabiner Elements to remap my caps lock key to the escape key for that particular keyboard.
Remapping on Windows with the Registry
I also had a surface book at the time. The surface book was a little harder to remap. I was considering installing some software, but I came across this neat little registry entry that I could update to make all keyboards remap caps lock to escape on that computer.
REGEDIT4 [HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Control\Keyboard Layout] "Scancode Map"=hex:00,00,00,00,00,00,00,00,02,00,00,00,01,00,3a,00,00,00,00,00
Now I realise I could easily do this on my desktop as well without using Razer’s proprietary software, but I had already set that up and was too lazy to redo that.
Remapping my brains
Now that the remapping on the computers was done, I just had to remap my brains to remove the muscle memory of hitting the non existent key. It was fairly easy considering that each time I hit the escape key on my mac, I was physically reminded that the button did not exist and I would press the caps lock button.
Pros and cons
The pros of this method were obvious. In fact a quick search of "remap caps lock to xxx" would return a lot of results showing you all sorts of ways to do this. The caps lock key takes up a lot of real estate on the keyboard and I think there are many people who find that it’s nothing but a nuisance. This would also make sure that I would not have to worry about Apple’s decisions around the escape key in the future. As it turns out, the backlash was strong enough that they did put the escape key back in the 2019 edition. But the damage was done and probably millions of people were left with a keyboard without an escape key.
The cons are that I would have some trouble adapting to using other peoples' keyboards if they don’t remap their keys. I’ve had plenty of instances where I kept hitting caps lock on someone’s computer when I was using it. But I guess I’m optimising for the usage of my computer, and not the usage of other computers. If anything I should probably be helping them remap their caps lock keys anyway. I’m sure not many people would miss it much.
It only took me a week before I got used to the new position of the escape key. That’s when I started getting interested in remapping my keyboard to be more efficient. If I could remap my brain like that, why not try one of those cool layouts like dvorak and make my typing even more efficient?
I spent a month or so trying to get used to dvorak, even going as far as to change my phone’s keyboard layouts to it so that I would memorise the new key positions. In the end, too many programs use the qwerty layout to make it worth the change. Playing games will definitely require changing back to qwerty. Imagine trying to use wasd in the dvorak layout. (It’s the ,;ah keys on the regular qwerty layout.)
I eventually switched back to the more familiar qwerty layout, much to the relief of my productivity. While it supposedly makes it easier to type by putting the frequently accessed keys on the home row, there are many sources that say that it’s not that much faster than using qwerty anyway. The speed increase is mostly from the deliberate practice of good typing habits that you wouldn’t otherwise have bothered to do. Other health benefits like proper typing posture would come from an ergonomic keyboard layout and not the key layout. But that’s something that I would not discover till 2020. That’s the topic of another blog post.