Wouldn’t it be nice if you had one modifier key for all your macros?
Brett Terpstra and Steve Losh have extolled the benefits of using the caps-lock key as “hyper key” to trigger macros. I’ve attempted to implement it, but the need to run two separate hacks (even before running macros!) has scared me away from doing it myself.
Keyboard Maestro to the rescue! With Keyboard Maestro a little AppleScript and a checkbox, you can create the “hyper key” without any low-level hacks. Here’s how:
First, disable caps lock in the Keyboard system preference. It’s a checkbox under “modifier keys.”
Second, click the link above to download the Keyboard Maestro macros and import them.
What these macros do is use the “device trigger” to identify the caps-lock keypress. It then runs an AppleScript to hold the keys down. When the caps lock key is released, so are the modifier keys.
There are three minor “gotchas” with this method:
1. Since this is a device key trigger, you’ll need to edit the macros and add a separate device trigger for each keyboard you use.
2. If the macro gets interrupted somehow, you can end up with the modifier keys being stuck down. To work around this unlikely event, the hyper-up command is available in the Keyboard Maestro status menu.
3. There is sometimes a small lag between pressing caps lock and the modifiers being “pressed.”