Troubleshooting When One Hotkey Trigger Stops Working

I have a macro triggered by the hot key ⌃⌥⇧⌘E. It works 99% of the time. Then out of nowhere, it stops triggering. I've tried:

  • Turning on the debugger and checking "pause new macros". All other macros fire normally, but this one doesn't.
  • Adding an additional hotkey trigger. Every macro will work fine with any other hotkey.
  • Creating a new macro that also triggers with ⌃⌥⇧⌘E. It won't work. Keyboard Maestro apparently does not accept ⌃⌥⇧⌘E as a trigger any more. However, when I create the new macro and assign ⌃⌥⇧⌘E as the hotkey, this assignment still works. I find this interesting since the trigger itself isn't working but the app still accepts the input in defining the trigger.
  • Going into Activity Monitor and force quitting both Keyboard Maestro and Keyboard Maestro Engine. Still doesn't work.
  • Restarting my computer <- This fixes it reliably! However now the issue is happening regularly, and I really really don't want to have to keep restarting because I have a lot of work open.
  • Force quitting every single application. This does not fix it.
  • I use Karabiner, which I have in the past experienced a few funny issues with. So I developed a script that force kills every single karabiner process. This script has been very successful in solving the karabiner issues I had in the past but had no effect on this issue

In conclusion, the only fix is restarting my computer, but now this issue happens every 1-2 days so I'd like to avoid that. For now, my workaround will be to just have a backup key instead of ⌃⌥⇧⌘E. That should actually be a fine workaround so as long as that key doesn't experience issues, this is probably a low priority issue... but thought I'd raise it here anyway out of curiosity

What does the macro do?
When does this happen? In all apps? some apps? After some time passes?
Is it a Global macro? or only active for some apps?
What KM version? What OSX?

The macro is a relay for using global hotkeys in a python application I am developing. I could not find any python package with working global hotkeys, so instead, I use this macro. It just reads the hotkey and edits a file which python is watching and python responds to the hotkey there.

I don't think it matters though. Since I go into debug mode in keyboard maestro, I know there are no running macros. I even check "pause when macro starts" so it's clear that it has nothing to do with the contents of the macro.

It is a global macro. ⌃⌥⇧⌘E still works in other apps. In fact, it still works in keyboard maestro when I'm inputting it into a keystroke field in the editor. Just not as a trigger.

So far I've only been able to fix it by restarting.

Mac 11.2.1

See Troubleshooting in the KM Wiki.

As soon as it fails, examine the KM Engine log to confirm the macro ran, or did not run.
From the KM Editor, menu Help > Open Logs folder.

You can also run this macro:

MACRO: Display Last KM Macro Error Ver 4 [Pub]

The macro also has an option to get the last N entries in the KM log.

Add an Acton to your macro that displays a notification as the first Action.

1 Like

Ok perfect, we definitely need more information so I'll check out the log and that macro next time the problem occurs!

I was about to write a very long and tedious post about my struggles but finally I have have figured it out. Thanks to a very handy tool called ShortcutDetective, I found a rogue app that was opening randomly out of nowhere and intercepting the key event.

Now this got me thinking. Consider ShorcutDetective is a tiny utility whose functionaility would surely fit inside KM, wouldn't that be nice to have the tool available right in the editor?

Thanks for sharing this tool.
I found it here: ShortcutDetective
and also at ShortcutDetective for Mac --

Looks very useful.

Hey Matt,

What app?

Thanks very much for calling my attention to ShortcutDetective. I wish I'd known about it long ago...

Hey @peternlewis – something like this in Keyboard Maestro would make troubleshooting hotkeys a whole lot easier.


I have no idea how that could be done using public APIs.