{"id":115013,"url":"https://github.com/jasonrudolph/keyboard","last_synced_at":"2025-05-14T06:11:34.752Z","repository":{"id":7750743,"uuid":"9118195","full_name":"jasonrudolph/keyboard","owner":"jasonrudolph","description":"⌨ Toward a more useful keyboard","archived":false,"fork":false,"pushed_at":"2024-12-06T14:32:22.000Z","size":3330,"stargazers_count":2124,"open_issues_count":4,"forks_count":216,"subscribers_count":52,"default_branch":"main","last_synced_at":"2025-04-11T15:57:12.838Z","etag":null,"topics":["caps-lock","hammerspoon","hjkl","karabiner","keyboard","markdown","productivity","seil","sizeup","vim"],"latest_commit_sha":null,"homepage":"","language":"Lua","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/jasonrudolph.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null,"zenodo":null}},"created_at":"2013-03-30T16:01:43.000Z","updated_at":"2025-04-06T03:24:14.000Z","dependencies_parsed_at":"2024-07-25T02:07:07.831Z","dependency_job_id":"dc260bdc-2107-4066-b01a-d3787284d3de","html_url":"https://github.com/jasonrudolph/keyboard","commit_stats":{"total_commits":319,"total_committers":15,"mean_commits":"21.266666666666666","dds":0.3605015673981191,"last_synced_commit":"e5e351f1cc80f62cca2ce688a5d4a3dd7f3a4b36"},"previous_names":[],"tags_count":6,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/jasonrudolph%2Fkeyboard","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/jasonrudolph%2Fkeyboard/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/jasonrudolph%2Fkeyboard/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/jasonrudolph%2Fkeyboard/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/jasonrudolph","download_url":"https://codeload.github.com/jasonrudolph/keyboard/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":254079993,"owners_count":22011305,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["caps-lock","hammerspoon","hjkl","karabiner","keyboard","markdown","productivity","seil","sizeup","vim"],"created_at":"2024-01-06T02:39:47.312Z","updated_at":"2025-05-14T06:11:34.722Z","avatar_url":"https://github.com/jasonrudolph.png","language":"Lua","funding_links":[],"categories":["Lua"],"sub_categories":[],"readme":"## Toward a more useful keyboard\n\nSteve Losh's [Modern Space Cadet][modern-space-cadet] is an inspiration.\nIt 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.\nThis repo represents my nascent quest to unleash that more useful keyboard.\n\nAt first, this might sound no different than the typical Emacs/Vim/\\\u003cEvery-Other-Editor\u003e tweakfest.\nBut it is.\nI'm not talking about honing my editor-of-choice.\nI'm not talking about pimping out my shell.\nI want a more useful keyboard _everywhere_.\nWhether I'm in my editor, in the terminal, in the browser, or in Keynote,\nI want a more useful keyboard.\n\nAnd ideally, I want the _same_ (more useful) keyboard in every app.\nUbiquitous keyboarding.\nMuscle memory.\n[Don't make me think][don't-make-me-think].\n\nHow do I go to the beginning of the line in this app?\nThe same way I go to the beginning of the line in _every_ app!\nDon't make me think.\n\nHow do I go to the top of the file/screen/page in this app?\nThe same way I...\nWell, you get the point.\n\n## More useful (for me)\n\n\u003e **cus·tom·ize** (_verb_): to modify or build according to individual or personal specifications or preference [[dictionary.com][customize]]\n\nAny customization is, by definition, personal.\nWhile I find that these customizations yield a more-useful keyboard for me, they might not feel like a win for you.\n\n## Features\n\n- [Access \u003ckbd\u003econtrol\u003c/kbd\u003e and \u003ckbd\u003eescape\u003c/kbd\u003e on the home row](#a-more-useful-caps-lock-key)\n- [Navigate (up/down/left/right) via the home row](#super-duper-mode)\n- [Navigate to previous/next word via the home row](#super-duper-mode)\n- [Arrange windows via the home row](#window-layout-mode)\n- [Enable other commonly-used actions on or near the home row](#miscellaneous-goodness)\n- [Format text as Markdown](#markdown-mode)\n- [Launch commonly-used apps via global keyboard shortcuts](#hyper-key-for-quickly-launching-apps)\n- [And more...](#miscellaneous-goodness)\n\n### A more useful caps lock key\n\nBy repurposing the anachronistic \u003ckbd\u003ecaps lock\u003c/kbd\u003e key, we can make \u003ckbd\u003econtrol\u003c/kbd\u003e and \u003ckbd\u003eescape\u003c/kbd\u003e accessible via the home row.\n\n- Tap \u003ckbd\u003ecaps lock\u003c/kbd\u003e for \u003ckbd\u003eescape\u003c/kbd\u003e\n- Hold \u003ckbd\u003ecaps lock\u003c/kbd\u003e for \u003ckbd\u003econtrol\u003c/kbd\u003e\n\n📣 Shout-out to [@arbelt](https://github.com/arbelt) and [@jasoncodes](https://github.com/jasoncodes) for [the implementation](https://github.com/jasonrudolph/keyboard/commit/01a7a5bd8a1e521756d1ec34769119ead5eee0b3). ⚡️🍻🌟\n\n### (S)uper (D)uper Mode\n\nTo activate, push the \u003ckbd\u003es\u003c/kbd\u003e and \u003ckbd\u003ed\u003c/kbd\u003e 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:\n\n- Use \u003ckbd\u003eh\u003c/kbd\u003e / \u003ckbd\u003ej\u003c/kbd\u003e / \u003ckbd\u003ek\u003c/kbd\u003e / \u003ckbd\u003el\u003c/kbd\u003e for **left**/**down**/**up**/**right** respectively\n- Use \u003ckbd\u003ea\u003c/kbd\u003e for \u003ckbd\u003eoption\u003c/kbd\u003e (AKA \u003ckbd\u003ealt\u003c/kbd\u003e)\n- Use \u003ckbd\u003ef\u003c/kbd\u003e for \u003ckbd\u003ecommand\u003c/kbd\u003e\n- Use \u003ckbd\u003espace\u003c/kbd\u003e for \u003ckbd\u003eshift\u003c/kbd\u003e\n- Use \u003ckbd\u003ea\u003c/kbd\u003e + \u003ckbd\u003ej\u003c/kbd\u003e / \u003ckbd\u003ek\u003c/kbd\u003e for \u003ckbd\u003epage down\u003c/kbd\u003e / \u003ckbd\u003epage up\u003c/kbd\u003e\n- Use \u003ckbd\u003ei\u003c/kbd\u003e / \u003ckbd\u003eo\u003c/kbd\u003e to move to the previous/next tab\n- Use \u003ckbd\u003eu\u003c/kbd\u003e / \u003ckbd\u003ep\u003c/kbd\u003e to go to the first/last tab (in most apps)\n- Use \u003ckbd\u003ea\u003c/kbd\u003e + \u003ckbd\u003eh\u003c/kbd\u003e / \u003ckbd\u003el\u003c/kbd\u003e to move to previous/next word (in most apps)\n\n[\u003cimg width=\"400\" alt=\"(S)uper (D)uper Mode Keybindings\" src=\"https://cloud.githubusercontent.com/assets/2988/22397420/f2b3e346-e53e-11e6-97bb-9db71f86994b.png\"\u003e](https://cloud.githubusercontent.com/assets/2988/22397420/f2b3e346-e53e-11e6-97bb-9db71f86994b.png)\n\n📣 Shout-out to [Karabiner's Simultaneous vi Mode](https://github.com/tekezo/Karabiner/blob/05ca98733f3e3501e0679814c3795d1cb57e177f/src/core/server/Resources/include/checkbox/simultaneouskeypresses_vi_mode.xml#L4-L10) for providing the inspiration for (S)uper (D)uper Mode. ⌨:neckbeard:✨\n\n### Window Layout Mode\n\nQuickly arrange and resize windows in common configurations, using keyboard shortcuts that are on or near the home row. (Or, feel free to [choose your own keyboard shortcuts](#choose-your-own-keybindings).)\n\n#### Default keybindings\n\nUse \u003ckbd\u003econtrol\u003c/kbd\u003e + \u003ckbd\u003es\u003c/kbd\u003e to turn on Window Layout Mode. Then, use any shortcut below to make windows do your bidding. For example, to send the window left, hit \u003ckbd\u003econtrol\u003c/kbd\u003e + \u003ckbd\u003es\u003c/kbd\u003e, and then hit \u003ckbd\u003eh\u003c/kbd\u003e.\n\n- Use \u003ckbd\u003eh\u003c/kbd\u003e to send window left (left half of screen)\n- Use \u003ckbd\u003ej\u003c/kbd\u003e to send window down (bottom half of screen)\n- Use \u003ckbd\u003ek\u003c/kbd\u003e to send window up (top half of screen)\n- Use \u003ckbd\u003el\u003c/kbd\u003e to send window right (right half of screen)\n- Use \u003ckbd\u003eshift\u003c/kbd\u003e + \u003ckbd\u003eh\u003c/kbd\u003e to send window to left 40% of screen\n- Use \u003ckbd\u003eshift\u003c/kbd\u003e + \u003ckbd\u003el\u003c/kbd\u003e to send window to right 60% of screen\n- Use \u003ckbd\u003ei\u003c/kbd\u003e to send window to upper left quarter of screen\n- Use \u003ckbd\u003eo\u003c/kbd\u003e to send window to upper right quarter of screen\n- Use \u003ckbd\u003e,\u003c/kbd\u003e to send window to lower left quarter of screen\n- Use \u003ckbd\u003e.\u003c/kbd\u003e to send window to lower right quarter of screen\n- Use \u003ckbd\u003espace\u003c/kbd\u003e to send window to center of screen\n- Use \u003ckbd\u003eenter\u003c/kbd\u003e to resize window to fill the screen\n- Use \u003ckbd\u003en\u003c/kbd\u003e to send window to the next monitor\n- Use \u003ckbd\u003e←\u003c/kbd\u003e to send window to the monitor on the left (if there is one)\n- Use \u003ckbd\u003e→\u003c/kbd\u003e to send window to the monitor on the right (if there is one)\n- Use \u003ckbd\u003econtrol\u003c/kbd\u003e + \u003ckbd\u003es\u003c/kbd\u003e to exit Window Layout Mode without moving any windows\n\n[\u003cimg src=\"https://cloud.githubusercontent.com/assets/2988/22397114/715cc12e-e538-11e6-9dcd-b3447af0d9dd.png\" alt=\"Window Layout Mode Keybindings (1)\" width=\"400\"/\u003e](https://cloud.githubusercontent.com/assets/2988/22397114/715cc12e-e538-11e6-9dcd-b3447af0d9dd.png) [\u003cimg src=\"https://cloud.githubusercontent.com/assets/2988/22397111/45672fe6-e538-11e6-905d-5b0234e290bb.png\" alt=\"Window Layout Mode Keybindings (2)\" width=\"400\"/\u003e](https://cloud.githubusercontent.com/assets/2988/22397111/45672fe6-e538-11e6-905d-5b0234e290bb.png)\n\n#### Choose your own keybindings\n\nWindow Layout Mode ships with the default keybindings above, but you're welcome to personalize this setup. See [`hammerspoon/windows-bindings-defaults.lua`](hammerspoon/windows-bindings-defaults.lua) for instructions on configuring shortcuts to your personal taste.\n\n### Markdown Mode\n\nPerform common [Markdown](https://daringfireball.net/projects/markdown/syntax)-formatting tasks anywhere that you're editing text (e.g., in a GitHub comment, in your editor, in your email client).\n\nUse \u003ckbd\u003econtrol\u003c/kbd\u003e + \u003ckbd\u003em\u003c/kbd\u003e to turn on Markdown Mode. Then, use any shortcut below to perform an action. For example, to format the selected text as bold in Markdown, hit \u003ckbd\u003econtrol\u003c/kbd\u003e + \u003ckbd\u003em\u003c/kbd\u003e, and then \u003ckbd\u003eb\u003c/kbd\u003e.\n\n- Use \u003ckbd\u003eb\u003c/kbd\u003e to wrap the currently-selected text in double asterisks (\"B\" for \"Bold\")\n\n    Example: `**selection**`\n\n- Use \u003ckbd\u003ec\u003c/kbd\u003e to wrap the currently-selected text in backticks (\"C\" for \"Code\")\n\n    Example: `` `selection` ``\n\n- Use \u003ckbd\u003ei\u003c/kbd\u003e to wrap the currently-selected text in single asterisks (\"I\" for \"Italic\")\n\n    Example: `*selection*`\n\n- Use \u003ckbd\u003es\u003c/kbd\u003e to wrap the currently-selected text in double tildes (\"S\" for \"Strikethrough\")\n\n    Example: `~~selection~~`\n\n- Use \u003ckbd\u003el\u003c/kbd\u003e to convert the currently-selected text to an inline link, using a URL from the clipboard (\"L\" for \"Link\")\n\n    Example: `[selection](clipboard)`\n\n- Use \u003ckbd\u003econtrol\u003c/kbd\u003e + \u003ckbd\u003em\u003c/kbd\u003e to exit Markdown Mode without performing any actions\n\n### Hyper key for quickly launching apps\n\nmacOS doesn't have a native \u003ckbd\u003ehyper\u003c/kbd\u003e key. But thanks to Karabiner-Elements, we can [create our own](karabiner/karabiner.json). In this setup, we'll use the \u003ckbd\u003eright option\u003c/kbd\u003e key as our \u003ckbd\u003ehyper\u003c/kbd\u003e key.\n\nWith a new modifier key defined, we open a whole world of possibilities. I find it especially useful for providing global shortcuts for launching apps.\n\n#### Choose your own apps\n\nHyper Mode ships with the default keybindings below, but you'll likely want to personalize this setup. See [`hammerspoon/hyper-apps-defaults.lua`](hammerspoon/hyper-apps-defaults.lua) for instructions on configuring shortcuts to launch *your* most commonly-used apps.\n\n#### Default app keybindings\n\n- \u003ckbd\u003ehyper\u003c/kbd\u003e + \u003ckbd\u003ea\u003c/kbd\u003e to open iTunes (\"A\" for \"Apple Music\")\n- \u003ckbd\u003ehyper\u003c/kbd\u003e + \u003ckbd\u003eb\u003c/kbd\u003e to open Google Chrome (\"B\" for \"Browser\")\n- \u003ckbd\u003ehyper\u003c/kbd\u003e + \u003ckbd\u003ec\u003c/kbd\u003e to open Slack (\"C for \"Chat\")\n- \u003ckbd\u003ehyper\u003c/kbd\u003e + \u003ckbd\u003ed\u003c/kbd\u003e to open [Remember The Milk](https://www.rememberthemilk.com/) (\"D\" for \"Do!\" ... or \"Done!\")\n- \u003ckbd\u003ehyper\u003c/kbd\u003e + \u003ckbd\u003ee\u003c/kbd\u003e to open [Atom](https://atom.io) (\"E\" for \"Editor\")\n- \u003ckbd\u003ehyper\u003c/kbd\u003e + \u003ckbd\u003ef\u003c/kbd\u003e to open Finder (\"F\" for \"Finder\")\n- \u003ckbd\u003ehyper\u003c/kbd\u003e + \u003ckbd\u003eg\u003c/kbd\u003e to open [Mailplane](http://mailplaneapp.com/) (\"G\" for \"Gmail\")\n- \u003ckbd\u003ehyper\u003c/kbd\u003e + \u003ckbd\u003es\u003c/kbd\u003e to open [Slack](https://slack.com/downloads/osx) (\"S\" for \"Slack\")\n- \u003ckbd\u003ehyper\u003c/kbd\u003e + \u003ckbd\u003et\u003c/kbd\u003e to open [iTerm2](https://www.iterm2.com/) (\"T\" for \"Terminal\")\n\n### Miscellaneous goodness\n\n- Use \u003ckbd\u003econtrol\u003c/kbd\u003e + \u003ckbd\u003e-\u003c/kbd\u003e (dash) to split iTerm2 panes horizontally\n- Use \u003ckbd\u003econtrol\u003c/kbd\u003e + \u003ckbd\u003e|\u003c/kbd\u003e (pipe) split iTerm2 panes vertically\n- Use \u003ckbd\u003econtrol\u003c/kbd\u003e + \u003ckbd\u003eh\u003c/kbd\u003e / \u003ckbd\u003ej\u003c/kbd\u003e / \u003ckbd\u003ek\u003c/kbd\u003e / \u003ckbd\u003el\u003c/kbd\u003e to move left/down/up/right by one pane in iTerm2\n- Use \u003ckbd\u003econtrol\u003c/kbd\u003e + \u003ckbd\u003eu\u003c/kbd\u003e to delete to the start of the line\n- Use \u003ckbd\u003econtrol\u003c/kbd\u003e + \u003ckbd\u003e;\u003c/kbd\u003e to delete to the end of the line\n- Use \u003ckbd\u003eoption\u003c/kbd\u003e + \u003ckbd\u003eh\u003c/kbd\u003e / \u003ckbd\u003el\u003c/kbd\u003e to delete the previous/next word\n\n## Dependencies\n\nThis setup is honed and tested with the following dependencies.\n\n- macOS Sonoma, 14.4\n- [Karabiner-Elements 14.3.0][karabiner]\n- [Hammerspoon 0.9.100][hammerspoon]\n\n## Installation\n\n1. Grab the bits\n\n    ```sh\n    git clone https://github.com/jasonrudolph/keyboard.git ~/.keyboard\n\n    cd ~/.keyboard\n\n    script/setup\n    ```\n\n2. Enable accessibility to allow Hammerspoon to do its thing [[screenshot]](screenshots/accessibility-permissions-for-hammerspoon.png)\n\n3. You'll be [prompted to allow Karabiner-Elements to load its kernel extension](https://karabiner-elements.pqrs.org/docs/getting-started/installation/#open-karabiner-elements-preferences), followed by a [flurry of prompts related to input monitoring](https://karabiner-elements.pqrs.org/docs/getting-started/installation/#grant-input-monitoring-to-karabiner-elements-processes). Follow the prompts to upgrade your life.\n\n[customize]: http://dictionary.reference.com/browse/customize\n[don't-make-me-think]: http://en.wikipedia.org/wiki/Don't_Make_Me_Think\n[karabiner]: https://github.com/tekezo/Karabiner-Elements\n[hammerspoon]: http://www.hammerspoon.org\n[hammerspoon-releases]: https://github.com/Hammerspoon/hammerspoon/releases\n[modern-space-cadet]: http://stevelosh.com/blog/2012/10/a-modern-space-cadet\n[modern-space-cadet-key-repeat]: http://stevelosh.com/blog/2012/10/a-modern-space-cadet/#controlescape\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fjasonrudolph%2Fkeyboard","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fjasonrudolph%2Fkeyboard","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fjasonrudolph%2Fkeyboard/lists"}