This is heavily based on: https://github.com/jasonrudolph/keyboard/
Steve Losh's Modern Space Cadet is an inspiration. It opened my eyes to the fact that there's a more useful keyboard hidden inside the vanilla QWERTY package that most of us have tolerated for all these years. This repo represents my nascent quest to unleash that more useful keyboard.
At first, this might sound no different than the typical Emacs/Vim/<Every-Other-Editor> tweakfest. But it is. I'm not talking about honing my editor-of-choice. I'm not talking about pimping out my shell. I want a more useful keyboard everywhere. Whether I'm in my editor, in the terminal, in the browser, or in Keynote, I want a more useful keyboard.
And ideally, I want the same (more useful) keyboard in every app. Ubiquitous keyboarding. Muscle memory. Don't make me think.
How do I go to the beginning of the line in this app? The same way I go to the beginning of the line in every app! Don't make me think.
How do I go to the top of the file/screen/page in this app? The same way I... Well, you get the point.
cus·tom·ize (verb): to modify or build according to individual or personal specifications or preference [dictionary.com]
Any customization is, by definition, personal. While I find that these customizations yield a more-useful keyboard for me, they might not feel like a win for you.
- Access control and escape on the home row
- Navigate (up/down/left/right) via the home row
- Navigate to previous/next word via the home row
- Arrange windows via the home row
- Enable other commonly-used actions on or near the home row
- Format text as Markdown
- Launch commonly-used apps via global keyboard shortcuts
- And more...
By repurposing the anachronistic caps lock key, we can make control and escape accessible via the home row.
- Tap caps lock for escape
- Hold caps lock for control
📣 Shout-out to @arbelt and @jasoncodes for the implementation. ⚡️🍻🌟
To activate, push the s and d keys simultaneously and hold them down. Now you're in (S)uper (D)uper Mode. It's like a secret keyboard inside your keyboard. (Whoa.) It's optimized for keeping you on the home row, or very close to it. Now you can:
- Use h / j / k / l for left/down/up/right respectively
- Use a for option (AKA alt)
- Use f for command
- Use space for shift
- Use a + j / k for page down / page up
- Use i / o to move to the previous/next tab
- Use u / p to go to the first/last tab (in most apps)
- Use a + h / l to move to previous/next word (in most apps)
macOS doesn't have a native hyper key. But thanks to Karabiner-Elements, we can create our own. In this setup, we'll use the right option key as our hyper key.
With a new modifier key defined, we open a whole world of possibilities. I find it especially useful for providing global shortcuts for launching apps.
This setup is honed and tested with the following dependencies.
- macOS Big Sur, 11.6
- Karabiner-Elements 13.7.0
- Hammerspoon 0.9.90
-
Grab the bits
git clone https://github.com/brandonkboswell/keyboard.git ~/.keyboard cd ~/.keyboard script/setup
-
Enable accessibility to allow Hammerspoon to do its thing [screenshot]
-
You'll be prompted to allow Karabiner-Elements to load its kernel extension, followed by a flurry of prompts related to input monitoring. Follow the prompts to upgrade your life.