These are my macOS shortcut hacks using some combination of Karabiner-Elements and Hammerspoon.
Hat tip: This started out as a fork of [https://github.com/lodestone/hyper-hacks]. Thanks @lodestone!
Check out the Wiki for ideas on how to configure your init.lua.
Install Hammerspoon
Install Karabiner-Elements
Put
hammerspoon/init.luain~/.hammerspoon/init.luaPut
karabiner/karabiner.jsonin~/.config/karabiner/karabiner.json
That’s pretty much it.
The current configuration assumes that
CapsLockhas been disabled in System Preferences.The
CapsLockkey is defined as a newHYPERkey (Cmd,Option,Shift,Control).The following shortcuts are defined to launch an app, or focus if it is already running:
HYPER+O: "Microsoft Outlook"HYPER+F: "Finder"HYPER+E: "Sublime Text"HYPER+S: "Slack"HYPER+C: "Google Chrome"
The following general shortcuts are defined:
HYPER+H: Hide all windows.HYPER+T: Invoke iTerm2 visor (hotkey full-screen terminal window).HYPER+L: Lock screen.
If
HYPERis pressed on its own, it emulatesESCAPE.