I just set up a Stream Deck with the KM Plugin and it is terrific.
One question however...
Is it possible to program KM macros on subfolder pages or on alternate Profile pages? In either case, the Button ID is not unique so I get a secondary menu asking me to pick among multiple macros. Is there any way to resolve this so a Button ID is unique per subfolder/per Profile?
I’m on mobile, so I can’t verify anything, but one way I can think of is to create macro groups and profiles both based on applications. That way the macros will be unique per application and will pop up when the application is activated.
Another way is to not use the KM plugin for the stream deck. You can simple copy/paste the AppleScript to trigger a macro into a file, then create a StreamDeck action to “Open” that file. It’ll run the AppleScript and trigger your macro. This method feels more flexible to me, but less convenient to set up.
Give the buttons different virtual rows and columns and different Button IDs. The virtual rows and columns affect the trigger (which button triggers which macro). The different Button IDs affect which button is targets by the various Screen Deck actions.
That would be great it it worked - I can assign a different Button ID but that seems to have no effect on a button press. The virtual row and virtual column are greyed out in the Config app; how can I change those?
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:
Copy the AppleScript or Shell script generated by KeyboardMaestro to your clipboard.
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.
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.
@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.
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?
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.
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.
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