Karabiner
Karabiner is life changing tool that lets you remap keys at a low level on macOS.
I completely remapped my keyboard with it and every key on my keyboard is a custom modifier key that I can program to do what I want.
For example you can make caps lock into an escape key when pressed once but if you hold it, it becomes a hyper key. Hyper key means that a key now serves two purposes, once when pressed alone and once when held down. So for example for remapping caps lock, we can remap it to act as escape when pressed alone once but if we hold down on it it becomes ⌘ + ⌃ modifier key. So caps lock + F
becomes ⌘ + ⌃ + F. And so on.
I take this idea further and define these kind of hyper keys but for every single key on my keyboard.
I teach how you can use Karabiner in this way in a lot of detail on my macOS automation course.
You can get help with Karabiner on Telegram.
My personal Karabiner setup
I generate my Karabiner config with Goku.
Will make a web explorer for Karabiner/Goku bindings soon. But briefly, I group keys by theme. q
= cmd+shift. w
= open apps. e
= cmd. r
= open more apps. i
= insert symbols like & or |. o
= Alfred searches. a
= control. s
= arrow keys, selecting text & more text helpers. d
= d+v
will do left mouse click, use that a lot. f
= various helpers. g
= move windows left/right/maximize & more. hjkl
are no hyper keys as I press on them often for scrolling in vim/browser and need instant response, hyper keys have a little delay after press. :
= caps lock key, so :+w
will insert W. z
= open chat apps, like z+k
opens telegram. x
= spotify helpers, like current song, search songs & more. c
= helpers, use c+s
often to clone current open GitHub URL & open it in VSCode. v
= change volume, next song & more. b
= open 'news' sites like Reddit/HN. n
= Alfred searches, use n+s
to trigger web searches often. m
= search Dash docsets with Alfred. .
= insert text fast like console.log()
& more.
Interesting configs
Notes
- I can embed simultaneous key mappings inside sticky key definitions.
Code
3 finger trackpad actions
{:des "hold three fingers on trackpad & press keys" :rules [
[:condi ["multitouch_extension_finger_count_total" 3]]
[:f :button2] ;
:v [:button1 :!Cv]]
;]}
Links
- Karabiner God Mode (2018) - How to use Karabiner to take your use of mac to the next level.
- KE complex modifications - Has website too.
- My detailed post on Alfred forum mentioning how I use Karabiner
- Interesting setup
- Karabiner Elements documentation (in Japanese)
- Tekezo's launcher mode
- Karabiner.json reference manual
- Karabiner JSON spec
- Write Karabiner config in YAML and then convert to JSON
- jKeyboard
- shell command JSON
- Karaconv - Converter from Karabiner to Karabiner-Elements text configuration format.
- Cursor keys belong at the center of your keyboard
- Sticky shift key example
- Karabiner KeyCodes and Modifiers
- New Hyper Key
- Karabiner Elements profile switcher (Alfred Workflow)
- All about macOS event observation (2019)
- Customize Karabiner With Goku (2019)
- Karabiner Elements Keycodes
- Hacking your keyboard with Karabiner (2019) (HN) (HN)
- Merge karabiner.json with complex modification rules
- Karabiner Complex Rules Generator (Code)
- Karabiner DriverKit VirtualHIDDevice
- Optimize Your Keyboard (2020)
- Custom Key Bindings with Karabiner (2020)
- Master of keyboard is master of automation (Key remapper implementation in Swift)
- Remapping keys on macOS
- Goku Configs on GitHub
- Putting your Keyboard on Steroids with Karabiner Elements (2020)
- Karabiner Docs
- Compose Key On macOS (HN)
- Remap Keyboard Shortcuts Karabiner Elements (2020)
- Новый мак, .dotfiles #4, Karabiner, keyboard maestro, Alfred (2022)
- Karabiner Elements Key List