

Leave Hyper Mode when F18 (Caps Lock) is released,
Hammerspoon caps lock windows#
The reason for the additional check on other keys, is to allow for using Caps Lock as an additional modifier key, allowing for more bindings using it, if needed: - Enter Hyper Mode when F18 (Caps Lock) is pressed Using Karabiner-Elements, Hammerspoon and Lua scripts to move windows Reload Hammerspoon again and youll notice that Caps Lock+arrow key will shift your. To avoid confusion, I won't include all of my a here, but this is basically what you would need to include, in order to allow F18 to fire alt + space. My issue is as follows: I have my caps lock remapped to F18 using Karabiner Elements, and then Hammerspoon uses F18 as a 'hyper key' to perform app specific shortcuts. After finding out I could emulate the same behavior with Hammerspoon thanks to this gist, I gave it a try to see what else it could do. Turns out the current version of Karabiner doesn't work with Sierra (Oct-2016). hammerspoon directory in your home directory, to determine the rules and shortcurts you've set up. My keyboard remapping of CAPS LOCK to Ctrl when pressing and Esc when tapping had stopped working after upgrading to macOS Sierra. Once it's installed, Hammerspoon looks for a in the. I won't go into the details on installing Hammerspoon here, they have a pretty decent introduction on the site. In this case, we want to remap F18 into firing a combination of the Option key (alt) and Space, effectively doing what Karabiner-Elements currently cannot. However, it also allows you to do systemwide shortcuts, which is what we'll use here. This means you can monitor and automate behavior, based on things like WiFi available, screens connected etc.

Hammerspoon is basically a software-bridge between the lower levels of macOS (using the Accessibility API in macOS) and a Lua scripting engine. I recently discovered Hammerspoon, as it's popped up a few places as being the next big thing for automation geeks on macOS. We still need to trigger something on pressing the F18 button. This gets us part of the way, but not quite.
Hammerspoon caps lock mac#
Karabiner-Elements is a new set of sub commands from the original Karabiner, for now basically a scaffold for the next version of Karabiner.Įven though it doesn't (yet!) support firing multiple keystrokes on a single key, Karabiner-Elements is not all bad, as it allows for rebinding Caps Lock to some F-keys not usually used on the Mac keyboard (Specifically F13-20), which will allow for remapping Caps Lock to fire something which you wouldn't normally use.Īfter installing Karabiner-Elements, open it up and setup the following: My muscle memory caused some issues on this after upgrading to macOS Sierra, as I've grown kinda used to using Caps Lock for OmniFocus, suddenly requiring me to skip that habit. However, Karabiner no longer works in macOS Sierra and the alternative Karabiner-Elements has yet to support multiple keystrokes for a single key. As you may recall, I used Karabiner and Seil to remap my Caps Lock previously, allowing me to use it for Alfred or OmniFocus.
