Streamdeck Plugin request

So I've been toying (briefly) with the official Streamdeck plugin for Keyboard Maestro. Previously I'd been using my applescript Streamdeck plugin ( ), just copying/pasting the applescript trigger. Works great, and is really easy to set up since I don't need to bounce back and forth between KM and SD.

The new plugin gives some features I've wanted (specifically 'set title' and 'set image' in the macro itself) but I'm not sure defining button position as X/Y really makes the most sense? For triggering the macro, at least. Is there a way to trigger a macro based on the "Button ID" you set in the SD plugin? From what I can tell I can edit the "Virtual Row" and "Virtual Column" to be whatever number I want, and keyboard maestro will pick that up (so I could have Row 35 and Column 761, waaaay outside of the bounds of the actual streamdeck). But I have to set that every time I'd make a new button.

I use a LOT of profiles on my streamdeck, so the default row/column positions are going to be repeated constantly. Trying to keep track of which profile is using which buttonIDs/rows/columns is going to be hellish. Why not just have each new instance of a button get a UUID (similar to how each macro gets a UUID) and trigger/refer to that? Would just be a single variable to keep track of instead of 2-3.

Yes, it could work differently. But mostly I did not really want to add a specific Stream Deck trigger, and so I cheated somewhat and made it work with the existing trigger. This also means you get all the features of that trigger for free, like pressed, released, while down, tapped three times.

Yes, I possibly should have used the Button ID instead, and hacked the trigger some more, but there are tradeoffs with everything. And as much as I like the Stream Deck, 95+% (probably 99+%) of Keyboard Maestro users will not have a Stream Deck. So the amount of development time spent on it has to be limited. So it felt more reasonably to piggy back off existing triggers, even if it was slightly more cumbersome to set up.

Understandable - as it is I'm probably going to keep using my applescript-based triggers for most of my macros. I have some big/long/involved ones that would benefit from the added user-feedback so I might switch those over to the new style, but my simple 'trigger this macro' won't get switched over.

1 Like

Hi mushoo,

i've made my own Streamdeck plugin for KM mainly for not having to use applescript or trigger files.
Maybe it can be useful for you too...

1 Like

Hi corcules,

I just tried your Streamdeck plugin and I am very impressed! Thanks for making it available. I can see myself using it a lot in the future.

A couple of ideas for you (should you be feeling generous!):

  1. When presenting the list of macros to choose from don't show disabled ones in the list.
  2. Sort the available macros alphabetically within each group.

Once again - thanks!

Yes @corcules, I remember your plugin from Reddit - I actually helped you get it to not hang on untitled groups/macros, IIRC.

I actually prefer using the inline applescript triggers (though not trigger files). It's a lot quicker for me to just copy from KM's 'or by script' at the macro's trigger setup area, and then paste straight into the inline field in my streamdeck plugin. It's like, 2-3 clicks.

@mushoo, yes i remember and thank you for your help.
Since these days, i’ve completely rewrite the plugin full obj-c, no AppleScript, and it’s really much more faster to get and parse the km macro list. Almost
instantaneous indeed...