15 May, 2018

Keyboard Customizations

Something that you spend a lot of time doing benefits from even the smallest marginal efficiency. Sleep is a good example. Investing in good quality sleep pays multiple folds when you spend more a third of your time sleeping. Similarly, when your full time job involves sitting in front of a computer and typing, then you’re likely to experience death by a thousand cuts when you perform the same manual tasks over and over again. I’ve developed some useful keyboard customizations that I’m briefly going to introduce. I use laptops from the macOS ecosystem, so I apologize for those PC and Linux fans who are unable to follow along.

The biggest epiphany I’ve realize comes from when I accidentally press the option key. As few may know, pressing the option key and any alphanumeric key results in a special character. Do you know which keys produce which characters? Neither do I, and nor do I ever use that feature. Whenever I have to search up a special character, I just end up copying the unicode symbol from the search engine instead of learning to do it myself. Understanding that I pretty much don’t care about any option + X combination, I can freely override any of those combinations.

Searching for software for remapping keyboard layouts, I came across Karabiner for OSX. I really enjoyed the reliability of the software, and it has served me well so far. So I got to tinkering what customizations worked for me.

For me the biggest pet peeve was having to use the arrow keys. Whenever I’m typing something and want to navigate my focus to a different part of the text, I have to shift my right hand to the bottom right by 4 inches in order to reach the arrow keys. After moving to the location I want, I have to shift my right hand back to its original typing position to resume typing. It becomes really annoying after performing this maneuver hundreds of times a day.

So the first change I made was remapping option + IJKL to the arrow keys. Now whenever I need to move my cursor around I don’t have to move my right hand 4 inches to the bottom right to adjust my cursor. That’s 11 yards fewer than your hands have to travel each day!

There are some great side effects from remapping this. For example, now that option + L = right, ctrl + option + L now equals ctrl + right, and that shortcut moves you one space to the right. So now you can easily switch macOS spaces left, right, up, and down. You can also do cmd + option + L = cmd + right, which lets you go back or forwards on a web page. What a joy to not have to move your right hand 4 in to the bottom right.

I found my next optimization while spending some time working in Sublime Text, a code editor. I tend to split window into multiple panes so I can cross reference files from one another. However, I found it annoying when I want to switch my typing cursor from one pane to another. Usually this involved moving my mouse to select the pane I want, or the sublime shortcuts ctrl + 12345. The shortcuts are a mess, since when you move your left pinky to the bottom left to hit the ctrl key, it becomes quite a reach for your other fingers to reach the numbers to select the panes, so I thought of optimizing that. I decided to remap option + m, option + comma, option + period, and option + slash to ctrl + 1234. This way if I can hold down left option with my left hand, and slightly curl my right hand to select which pane I want.

It was also annoying when using split view (putting two applications side-by-side) and having to switch between them. You could do cmd + tab to switch between applications, but that doesn’t work when you want to switch between windows of the same applications, like if I’m working between two repositories of sublime text of seeing two windows of my Chrome web browser.

Mac has a native shortcut to move to the next active window, but it’s at an inconvenient place at ctrl + F4. I remapped that shortcut to option + H so that I can navigate across my entire computer while holding down the option key. I can switch spaces, switch focus within a space, switch panel views all on my keyboard.

It says option+D here because I use Dvorak and the H key maps to D

One particularly tricky thing to write was the option + cmd + left shortcut. On Chrome, this lets you switch to the tabs to the left and right of your current tab, which I found pretty useful instead of having to memorize the tab indices to select the tab you want. However this shortcut is undoable with the option + IJKL setup since an extra option key is needed to hit this shortcut. I had to separately remap other keys to make this setup work, specifically I remapped cmd + option + U and cmd + option + O to the tab switching shortcut.

Something that particularly bothered me when I received my 2017 Macbook Pro was the touch bar. There’s just no tactile response with the escape key. The escape key is way more useful if it were just more accessible. For example, if you’re trying to scroll through the web page with your arrow keys, but find that the focus is placed on one of the text boxes, you can move your mouse to click outside the text input, or you could press escape. The problem is when you use your option-based arrow keys, holding down option, then pressing escape, then going back to option, is hard. So I remapped option + semicolon to escape, and now I can hold down left-option, then escape my focus, scroll around a view, and then switch panes!

Similarly, on the top right hand corner we have the delete key. Reaching for that delete key is annoying that I remapped my caps lock key to delete. I also added a mod such that holding shift while pressing delete will do forward deletes.

I added some other minor stuff too, like personally swapping semicolon with colon. I have my Karabiner rules posted here, which you can copy.

If you want to go really hardcore with improving your keyboard ergonomics, consider learning Dvorak. My favorite dvorak learning resource is here.

Have any interesting keyboard shortcuts? I would love to hear about them. Let me know either in the comments or through my email :)

You may also like...

2 Responses

  1. Daniel Sonner says:

    One pretty standard keybinding I’ve really liked over the years is using caps lock key as control. It’s much more conveniently located

Leave a Reply

%d bloggers like this: