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.
- 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.