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.
In its current state, my more-useful keyboard is built on top of a few tools, and some custom keymappings for those tools (all of which are described below). Where possible, this repo houses the configuration files that power my more-useful keyboard. In the places where the customization requires manual steps, I describe those steps.
Below you'll find a step-by-step guide for building this more-useful keyboard from scratch.
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.
These customizations currently provide a fraction of what I want from my more-useful keyboard. I find it to be a very useful fraction, but I don't consider it complete by any means.
🚧 Work in progress to port to macOS Sierra 🚧 This customization previously relied heavily on Karabiner. Karabiner does not currently work on macOS Sierra. Simply put, the tools available on Sierra lack the power and flexibility available in Karabiner. This branch represents an attempt to port my pre-Sierra customizations to Sierra. Given the lack of Karabiner's power and flexibility, porting the previous functionality to Sierra will likely involve compromises. It's unlikely to be an exact port.
Here's what it provides so far:
-
A more useful caps lock key
- Tap caps lock for escape
- Hold caps lock for control
-
(S)uper (D)uper Mode
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 up/down/left/right respectively
- Use a for option (AKA alt)
- Use f for command
- Use space for shift
- Use a + j/k for page up/page down
- 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
-
Basic window management
- caps lock + w, h: Send window left (left half of screen)
- caps lock + w, j: Send window down (bottom half of screen)
- caps lock + w, k: Send window up (top half of screen)
- caps lock + w, l: Send window right (right half of screen)
- caps lock + w, i: Send window to upper left quarter of screen
- caps lock + w, o: Send window to upper right quarter of screen
- caps lock + w, ,: Send window to lower left quarter of screen
- caps lock + w, .: Send window to lower right quarter of screen
- caps lock + w, space: Send window to center of screen
- caps lock + w, enter: Resize window to fill the screen
- caps lock + w, n: Send window to next monitor
-
Hyper key for quickly launching apps
- Use right option key as hyper key
- hyper + a to open iTunes ("A" for "Apple Music")
- hyper + b to open Google Chrome ("B" for "Browser")
- hyper + c to open Slack ("C for "Chat")
- hyper + d to open Remember The Milk ("D" for "Do!" ... or "Done!")
- hyper + e to open Atom Beta ("E" for "Editor")
- hyper + f to open Finder ("F" for "Finder")
- hyper + g to open Mailplane 3 ("G" for "Gmail")
- hyper + t to open iTerm ("T" for "Terminal")
-
Use option + h/l to delete previous/next word
This setup is honed and tested with the following dependencies.
- macOS Sierra, 10.12
- Karabiner-Elements 0.90.72
- Hammerspoon 0.9.52
git clone https://github.com/jasonrudolph/keyboard.git
cd keyboard
git checkout sierra
# Prepare custom settings for Karabiner-Elements
ln -s $PWD/karabiner/karabiner.json ~/.config/karabiner/karabiner.json
# Prepare custom settings for Hammerspoon
ln -s $PWD/hammerspoon ~/.hammerspoon
# Prepare custom settings for navigating between words in iTerm2
cat $PWD/inputrc >> ~/.inputrc- Install Karabiner-Elements
- Install Hammerspoon
- Install it
- Launch it
- Configure it to launch at login
- Enable accessibility to allow Hammerspoon to do its thing [screenshot]
- Tap caps lock for escape
- Hold caps lock for control
- Access the default caps lock behavior in those rare cases where it's helpful
TODO: Update this section for macOS Sierra port.
- Enable navigation (up/down/left/right) via the home row
- Enable word navigation (option+left/right) via the home row
- Enable other commonly-used actions on or near the home row
TODO: Update this section for macOS Sierra port.
- Quickly arrange and resize windows in common configurations, using keyboard shortcuts that are on or near the home row
TODO: Update this section for macOS Sierra port.
- Perform common Markdown-formatting tasks anywhere that you're editing text (e.g. in a GitHub comment, in your editor, in your email client)
TODO: Port this functionality to macOS Sierra.
- Add "goals" section for "Hyper" key
- Add
./script/setupcommand to automate the manual setup steps