Hyper Key Macro (v11.0.4)

I can’t get this to work. The functionality is to simulate pressing all the modifiers with one key. Am I doing something wrong? If this were functioning properly, could it trigger other KM macros? For example, I have a macro that is triggered by shift-control-option-command-C, so it theory I could press Caps-C to trigger it.

Hyper Key.kmmacros (2.4 KB)

What you'll get with this is something that repeatedly presses and releases the modifier keys while you hold the Caps Lock key down, so it'll be hit and miss whether the modifiers are in effect when you press the C key.

Your Caps Lock will still caps lock too, so after you release it you'll be typing capital letters.

And then there's the problem of mixing KM-simulated Events with actual hardware Events (your C key press) and (if you change the Trigger to "pressed" and the Action's options to "Press and hold") having this macro wait until that key press happens so it can "Release" the modifiers...

An all-round nightmare. Much better to step away from KM and install one of the hyper key utilities such as (the aptly-named) Hyperkey app. There are others -- I think Better Touch Tool includes this functionality, if you already have that.

2 Likes

Thank you for your response. I thought it might be a fun challenge to make KM do something like that, but you’re right to suggest I just get the already-existing utility that does exactly what I need.

There are two problems.

First, when the macro ends, Keyboard Maestro releases all the modifiers. And in any event, the action is not configured to press and hold them so it essentially is just tapping all of them briefly.

Second is that simulated keystrokes and modifiers do not interact with physical keystrokes and modifiers. So if Keyboard Maestro simulates pressing and holding the Command key and you press C, you will get a c, not menu selection of Copy.

As suggested there are other applications that work at a lower level, like Karabiner Elements, that can do this sort of thing, but remapping the keyboard layout is below the level that Keyboard Maestro operates at.