Weird apparent bug somewhere in StreamDeck / Keyboard Maestro

Today I created 4 macros on my StreamDeck. I’m using the right-most 4 buttons to basically create a palette for MailMate actions. Archive, Delete, Flag As Spam, and a single button that saves financial stuff to my preferred folder.

I wanted the last one, and while I was at it I figured I’d just make a vertical row because there are only 4 things I typically do with a message.

Each StreamDeck button triggers a Keyboard Maestro Macro. Got everything created, tested, and working individually, without issue. Archive / Delete / Junk are very basic “type a keystroke” macros, without any real logic at all. The one to archive to a particular folder is “type a keystroke”, pause, “type the folder name”, pause, and “type Enter”. Nothing exotic at all.

So I sit down to work on my email.

After using the macros 2 or 3 times, things just suddenly stop working. I can keep pressing StreamDeck buttons, but nothing happens. Clicking out of MailMate and clicking back in sometimes solves the problem, sometimes not.

I went back into KM and defined the macros to map to keyboard commands of Command-Option-Control-Shift 1, etc.

Went back to MailMate. Held down the modifier keys, and the macros worked as fast as I could type the numbers 1-4.

This makes me think there’s a glitch either with the StreamDeck sending repeated button clicks, or with how KM gets the signals from the StreamDeck.

The StreamDeck is direct-wired to my M1 MBA, with an appropriate cable.

Anybody ever have something like this happen? Any thoughts regarding a solution?

Can you try creating one that sends character key presses so you could have a test you could run in a new e-mail in Mailmate? That way you can visually see if there is anything being sent.

Do this with key presses specified in the Stream Deck software and another with Keyboard Maestro.

With any luck, this will help you figure out where in the chain there’s a weakness.

Just did the key presses one, and it worked fine. So I switched it back to my original keystrokes, and (fingers crossed) it’s been working ever since. Wondering if something else was causing an issue and somehow got reset between attempts.

Thanks for the troubleshooting suggestions!

If this is true, I think you’d be better off using the KM Link Stream Deck plugin instead of simulating keyboard buttons. Keypress simulation is always fragile, in my view. Might as well create the direct, scripted link if you can.

Isn’t it the Keyboard Maestro macros doing the key presses rather than key presses triggering the macros?

In my case Keyboard Maestro is set up to use “type a keystroke” as the action. It’s set to execute the macro with a “this device key” condition. I would think that means KM just listens for the keypress, and then triggers the macro…?

As long as you have something like the entry shown below, then that just means you are using the official Keyboard Maestro macro rather than the one @ryanjamurphy suggests. It does “listen” for a keypress, but it is not listening for a standard keyboard keypress like a shortcut key keypress per se.


The KM Link plugin is useful and you can use it as well, or even just a URL call with no plugin at all.

What you don’t really want to do is have a keyboard shortcut associated with a Keyboard Maestro macro that triggers key presses, and then a key press action defined in the Stream Deck software to trigger the Keyboard Maestro macro. That’s just keyboard keypress simulations all the way down at that point.

1 Like

Yup, that’s exactly what I have - the setup in the screenshots. :slight_smile:

Just posting back to document experiences.

All of the buttons work individually from a “fresh start”. When using them in rapid succession, it seems to work sometimes for an extended period of time. Other times not. Rebooting doesn’t always seem to affect the length of time that it works or doesn’t.

It’s bizarre. I think I’m going to find a different trigger method to do what I’m looking for, and maybe ask over on the KM forums to see what they have to say. :slight_smile:

Try launching from a KM URL? You have to select it as a trigger option at the top of the macro.