Stream Deck Plugin with Multuiple Folders or Profiles

Sure thing, but it’s past my bedtime right now. I’ll try to get back to you sometime tomorrow

1 Like

I see this issue was solved previously - it does work. Thanks

So the StreamDeck has a limited ability to run AppleScripts and shell scripts. From what I was able to tell, it looks at file extensions; any .sh extension will be run as a shell script and any .scpt extensions will be run as AppleScript. I've tried this with other types of scripts (for example .pl for Perl scripts) but haven't had much luck. It looks like shell scripts and AppleScript are special cases.

That having been said, the setup is pretty straightforward:

  1. Copy the AppleScript or Shell script generated by KeyboardMaestro to your clipboard.

  1. Open up a text editor and save the contents of your clipboard to a plain text file. In this example, I'm using SublimeText but TextEdit or any other text editor is fine as well.

  1. Create an Open action on your Stream Deck and point it at the file you just created.

And that should do it!

The reason I said this way is more flexible is because it separates away the physical structure of the StreamDeck from the trigger. This allows me to freely rearrange my stream deck without having to worry about going in and messing with my KM triggers.

@peternlewis related to this, I think it would be a nice enhancement to the Stream Deck plugin if instead of giving the button an identity and letting KM figure out what a particular button is supposed to do, you simply feed the Stream Deck a KM macro ID.

1 Like

@gposcidonio That works perfectly... excellent solution. And I agree this is nice in allowing you to arrange the Stream Desk profiles without having to edit the row/column positions. Very nice - thanks.

You can also achieve this by making a KM trigger file. And "open' that (as if it is an application) from Stream Deck.
That is how i used to do this before KM9.
But, i love the ability to change the stream deck icon and text by KM.

1 Like

I was wondering about that because KM9 gives the option to trigger "by URL" using a kmtrigger. These URLs work in the browser, but they do not work as a "website" URL in Stream Deck nor do they work with an "Open" command in Stream Deck. Can these be used somehow in KM? How do I convert these KM trigger URLs to KM trigger files?

Does this help?

https://wiki.keyboardmaestro.com/Stream_Deck

I tried using those URLs directly in the Stream Deck configurator but was unsuccessful in any way I tried. Looks like it only respects HTTP urls.

Just select your macro and under the file menu is Export as Trigger File. I place mine in Application groups under my Trigger Files Folder. Easy to make quick Stream Deck Profiles using this method.

That works well - thanks

I have made a Streamdeck plugin to launch KM macros. I don't like all these trigger files or applescripts...

1 Like

@corcules That works great - really nice - Thanks!

Thats very Nice @corcules!
Although the advantage of the KM Plugin is that it can change the icon and text from KM, where yours is fixed. And, a few macro's of mine use the Is Down or Key Release function.

Could you give some examples of how that may be helpful?

@rkaplan
To display the status of a function.

Imagine that the button is a toggle. John is home. John is out.

if variable John is "home" set variable John to "out" and make stream deck image icon out
else
set variable John to "home" and make stream deck image icon home

2 Likes

Well, i use two Streamdeck 15keys and one 32keys with a lot of profils and folders on each.
KM Plugin is not useable for me:

  • trigger by key position, quite annoying with multiple profil/folder
  • don’t remember key state
  • don’t identify a streamdeck device from another.

key feedback with dynamic title and icon is really interesting but i really don’t known what to do with that...

I made this streamdeck plugin to make my life simpler. So i prefer mine;-)

2 Likes

Yes, your way of selecting which macro to run with the current button makes much more sense. This is also how the application SoundFlow does this, for the people who are familiar with that app.
I will suggest Peter this:

Our Stream Deck just arrived and like another post we purchased because of Keyboard Maestro integration. I was struggling with this very thing since Keyboard Maestro is by key position using the multiple Profiles on the stream deck very confusing. When I am in Pro Tools I wanted to pick from all my Pro Tools limited Keyboard Maestro macros and when in Logic to be able to choose from my Logic Keyboard Maestro macros. The position only can work but as soon as I go into sub folders within the application then it all breaks down. Thank you for confirming that this is the way it behaved. Very nice app I look forward to using it.

It looks like we're off to a great start but further refinements can be made between the integration.

@corcules can you help me with the way KM Link sorts things, it seems completely random and not alphabetized. I am sure there is some logic but with 3,000 macros it takes a very long time to find and scroll through the list to get to the macros I am trying to assign. Is there a way to sort it like column view or to alphabetize the groups?

@skillet Yes, the macros list in KMLink just reflects the order in Keayboard Maestro list. Obviously, KM records macros in chronological order inside groups. At this time, i just use macro groups in the plugin. I'm planning to add some options to sort the macro list in the plugin, alphabetical, by date, etc... as soon as i have time...

1 Like

That would be wonderful, hoping you find the time soon, that would be a great addition! Thanks for your reply and making your plugin, it is very helpful! I realy wanted to use Peter's integration but unfortunately it just falls apart too much with sublevel folders.