If you were a professional guitarist, wouldn't you play on a premium guitar?
If you were a chef, wouldn't you invest in a premium chef knife?
Well, as someone who types literally millions of keystrokes a year for my profession, I decided to invest in a premium keyboard by combining Karabiner-Elements with a customized WASD Keyboard. This repository contains the files for creating my custom keyboard:
- The
karabiner
folder contains the json files for my Karabiner-Elements settings. - The
wasd_files
folder contains the Adobe Illustrator file used to make my customized WASD keyboard.
My Karabiner-Elements settings enable all sorts of keyboard modifications, including:
- Use J / I / K / L as arrow keys for navigating the cursor and selecting text.
- Create more convenient and comfortable shortcuts for common commands, like
cut
,copy
,paste
,delete
,backspace
,undo
,redo
,find
, andescape
. - Launch applications like
Google Chrome
orTerminal
with a single hotkey. - Open
Google Chrome
to a webpage (e.g. gmail) with a single hotkey - Type my email send off (
"Cheers, John"
) with a single hotkey.
My WASD keyboard looks like this:
All I did to create this was edit the Adobe Illustrator keyboard file (./wasd_files/keyboard_layout_104.ai
). In addition to adding a bunch of customized icons (e.g. the function keys), I changed the caps lock key to a blue hyper key that when held down (with the help of Karabiner-Elements) essentially creates another keyboard with an entirely different functionality (indicated by the small blue icons in the lower-right corners of each key).
For those curious, the Chinese text on the spacebar is the idiom "晴耕雨读", which literally means "Sunny farm rain read." The meaning is to farm on sunny days and read on rainy days. In other words, work hard, life a simple life, and enjoy each present moment.
The Karabiner-Elements json settings are found in ./karabiner/jKeyboard.json
. These particular settings include three separate "profiles" that you can select in the Karabiner preference window: 1) jKeyboard-Apple, 2) jKeyboard-WASD, and 3) jKeyboard-CM. The main profile is "jKeyboard-Apple," which is configured for a standard Apple keyboard and includes all the settings described on this page. The other two profiles have additional functionality that is specific to my WASD keyboard and another keyboard by Cooler Master, which I use on different Mac machines.
- Download Karabiner-Elements and Install.
- Open the
karabiner.json
configuration file. To find it, open Terminal.app and typeopen ~/.config
, which will open the hidden .config directory in a new Finder window. There you can navigate tokarabiner/karabiner.json
and open/edit that file. - Copy-paste the settings in one of the json files in the
./karabiner/
folder in this repo to overwrite the default karabiner.json file.
One of the primary things my jKeyboard
settings does is modify the caps lock key such that when held down it essentially creates another keyboard with an entirely different functionality. Here is a summary of the current settings:
Key Combination | Maps to | Description |
---|---|---|
caps lock | Nothing | Trigger for "hyper" keyboard |
caps lock + J / I / K / L | ← / ↑ / ↓ / → | Arrow Keys |
caps lock + command + I / K | command + ↑ / ↓ | Home / End |
caps lock + command + J / L | command + ← / → | Go to Start / End of Line |
caps lock + U / O | command + ← / → | Go to Start / End of Line |
caps lock + spacebar | control | Control key |
caps lock + spacebar + I / K | ⇞ / ⇟ | Page Up / Page Down |
caps lock + spacebar + J / L | control + ← / → | Go to Start / End of Next Word |
Key Combination | Maps to | Description |
---|---|---|
caps lock + A | shift | Shift key |
caps lock + A + J / I / K / L | shift + ← / ↑ / ↓ / → | Select Text |
caps lock + A + command + I / K | command + shift + ↑ / ↓ | Select all to top / bottom |
caps lock + A + command + J / L | command + shift + ← / → | Select until Start / End of Line |
caps lock + A + U / O | command + shift + ← / → | Select until Start / End of Line |
caps lock + A + , / . | control + shift + ← / → | Select until Start / End of Next Word |
caps lock + A + [ / ] | option + shift + ↑ / ↓ | Select until Start / End of Paragraph |
Key Combination | Maps to | Description |
---|---|---|
caps lock + N | backspace | Backspace / Delete |
caps lock + H | del | Forward Delete |
caps lock + S | command + X | Cut |
caps lock + D | command + C | Copy |
caps lock + F | command + V | Paste |
caps lock + R | command + Z | Undo |
caps lock + T | command + Y | Redo |
caps lock + M | command + F | Find |
caps lock + . | command + G | Find Next |
caps lock + , | command + shift + G | Find Previous |
caps lock + E | Esc | Escape |
Key Combination | Action |
---|---|
caps lock + C | Open Google Chrome |
caps lock + Z | Open the file 'foo.txt' in my Dropbox Folder |
caps lock + Quote (') | Open my Dropbox folder |
caps lock + / | Open my Downloads folder |
caps lock + P | Open my pCloud Drive folder |
caps lock + A + P | Open my pCloud Sync folder |
caps lock + 8 | Open Terminal |
caps lock + 2 | command + control + 2 (my Sublime Text shortcut to split into two windows) |
caps lock + G | Type my email send off ("Cheers, John ") |
caps lock + Y | control + Y (my Sublime Text shortcut to send selected text to a REPL) |
caps lock + 9 | control + 9 (my Sublime Text shortcut to shift focus to the LEFT panel) |
caps lock + 0 | control + 0 (my Sublime Text shortcut to shift focus to the RIGHT panel) |
I also changed my function keys to do certain things. While f1 to f4 and f10 to f12 are the standard mac settings, the keys f5 to f8 open specific web pages, and f9 takes a screen shot:
Key | Action |
---|---|
f1 | Brightness Decrease |
f2 | Brightness Increase |
f3 | Mission Control |
f4 | Dashboard |
f5 | Open Gmail in Google Chrome |
f6 | Open Google Calendar in Google Chrome |
f7 | Open Facebook in Google Chrome |
f8 | Open Intellicast Weather in Google Chrome |
f9 | command + shift + 3 (Save screen shot to Desktop) |
f10 | Mute |
f11 | Volume Decrease |
f12 | Volume Increase |
These are a few other tricks that I find particularly useful:
Key | Action |
---|---|
Tap Left shift | ( |
Tap Right shift | ) |
Hold Esc | command + W (Close Window) |
I learned a lot about how to write json settings to get Karabiner-Elements to do different things. I included the following examples in the ./karabiner/json_examples
folder.
File | Description |
---|---|
caps_lock_arrows.json | Hold the caps lock key to turn the J / I / K / L keys into the ← / ↑ / ↓ / → keys |
launch_application.json | Launch an Application (in this case Google Chrome) by typing right option + C |
open_browser_to_page.json | Open Google Chrome to www.google.com by typing right option + C |
tap_shift_keys_for_parentheses.json | Tap left_shift / right_shift to get ( / ) |
GPL-3
📣 Shout-out to @jasonrudolph, @Vonng, and the Karabiner Vi Mode Setting for inspiration - I learned a lot by copying a lot of their json code!