Can Keyboard Maestro make Stream Deck go to a specified page or folder?

I've read many great posts from brilliant people in this forum about using Stream Deck with Keyboard Maestro, but haven’t been able put it all together to make what I want. So after a few hours, it’s time to just ask!

My goal is to have the "tap" open the keyword panel in Adobe Lightroom, and the long-press go to a set of Stream Deck buttons for sending hotkey commands to that panel. This is a way to drill down into Stream Deck folders or pages of keyword commands using the same button that opened the keywords panel.

So, is there a way tap a Stream Deck button and have it send a hotkey, and long-press (or tap twice) that same key and have Stream Deck go to a certain page or folder?


1 Like

Strap in....

You'll want to use the Long Press macro here:

...and have it open a trigger app that loads the SD profile with this method:

A lot to digest here, but I think I get the picture. The blank app circumvents SD’s one profile per app structure. I could use a multi action button to send the hotkey to make Lightroom change modules, then change profile to display the buttons to show actions for that profile.


1 Like

It won't be anywhere near as complex to set up for you, as you're manually triggering the profiles.

Lightroom SD Profiles.kmmacros (44 KB)

Macro screenshot

When I run this I get:


Also, I’m having the same problem Reknes mentioned in his Jan 31 post at Triggering Stream Deck profiles for Logic Pro plugins - #9 by noisneil

In the Stream Deck profile, when I select the blank app I’ve named, the Application field still says Blank App. I see it’s not, though, so is it getting the app name from somewhere besides its filename?


Try right-clicking and selecting open. If that works, it shouldn't throw that error again. (Reference)

This is what happens when you duplicate an applet rather than create a new one. It should still work despite the name inconsistency. If not, open the blank app in a Script Editor and Save As with your preferred name.

Thanks for the quick response!

Got it to stop the unidentified developer message. Doing a Save As (now Duplicate) had no effect. But you say even though SD displays Blank App, it’s really associating that profile with, since that’s what I selected?

Still, nothing happens when I run this macro. Is this the logic behind this approach?

  1. I create a. "LR keywords" profile in SD and put the buttons I want to issue keyword commands to Lightroom in that profile's opening button set.
  2. SD associates this LR keywords profile with
  3. The Lightroom SD Profiles.kmmacros opens, and SD's "smart profiles" feature changes the SD display to the "LR keywords" profile.

But still, nothing happens when I run the Lightroom SD Profiles.kmmacros. Maybe I haven’t modified Lightroom SD Profiles.kmmacros correctly. I don’t understand what the "Log Trigger State" and "Detect Press Type" do. I assume the ↓Keyword Panel Action HERE↓ comment has no effect on the macro. Seems you only need the Open SD Profile Trigger App Here action, so there must be something I'm still not "getting."

I changed the macro's hot key trigger to hyperkey ; (semicolon) for testing, as the Ctrl Opt Cmd L was conflicting with an actual Lightroom command.

I think so yeah. Been a while since I had to do any of this, in all honesty. Creating a brand new blank applet isn't hard in Script Editor. Perhaps you could try that?

So the app is triggering a profile switch? Ok, sounds like you're almost there!

This is how the macro detects a tap or long press. If the key is released before the timeout, it's a tap; if not, it's a long press.

Correct. You said you wanted a tap to do something in Lightroom, so put the actions that do that here instead of the green comment. A longer press will open the trigger app. If you just want a button on the SD that opens a profile, you can do that natively; no need for KM or trigger apps at all.

No, it’s not triggering a profile switch at this point. I was just verifying that’s what’s supposed to happen.

Just to see if the KM macro is running, I added some Apple script to display the current date in a dialogue. And it did display the dialog. So you’re right that even though the SD profile application says "Blank App" it really is running

However, when that app runs, SD isn't switching profiles.

I’ve set up the SD profile "LR keywords:

I’ve made a KM Link button that runs Lightroom SD Profiles.kmmacros:

Just to see if I could get SD to switch profiles when is run, I disabled the "Log Trigger State" and "Detect Press Type" actions and duplicated the Open SD Trigger App Here, only that action runs.

Went to Lightroom, used the keyboard shortcut to run the macro, and IT DID switch to the LR keywords profile. But it also threw up this:

To prevent this, I verified that Script Editor's "Show startup screen" wasn’t checked. Someone wrote that holding ctrl while launching the script causes this popup to show, so I took that out. Still pops up. And when I click Quit or Run, SD returns to the previous profile, instead of staying on the LR keywords profile. I feel close!

P.S. I really appreciate your generosity! When you've had enough of my questions, just say the word!


Try using this instead and see if it works. It's just a newly created blank app saved with an actual name and set not to stay open. (54.5 KB)

Regarding the tap/long press macro... Download the template again, set a trigger and just trigger it. It should display "Long" onscreen when a long press is detected; "Short" if not. If that isn't working properly we can look into why.

The new stopped the dialog from appearing. Once I get this working, can I just duplicate that one for other profiles, instead of

I downloaded the template macro again, and set a KMLink button to trigger it, but nothing displays when I short- or long-press that button, whether or not I’ve pointed the last action to (But I don’t see anything in the macro that would display text on the screen.)

However, if I invoke the macro by pressing and holding its trigger keys, the SD profile very briefly (1/4 sec?) changes, then returns to the prior profile.

I don’t know if the trigger state actions are supposed to be monitoring the KM hot keys or the SD buttons...

You'll have to try it. If it doesn't work, just make an applet in Script Editor containing the following, which should make it quit itself. Also, uncheck "Stay Open after Run Handler" when saving.

on run
    delay 1
end run


Remove the Lightroom app as a profile trigger and use another blank app instead.

Lightroom SD Profile.kmmacros (21 KB)

Macro screenshot

What do you want to press in order to trigger the profile? If it's an SD button, set one up with the native Stream Deck KM plugin, and set this as the macro's USB Device Key trigger (one for pressed and one for released).

I must have missed an updated macro. I modified the one I have to match what you've shown:

I’ve put this macro in the Lightroom group, and whether I long or short-press the button pointing to the macro with KMLink, with Lightroom active, nothing happens.

It occurred to me that this approach might be doomed to fail. Are the Logic Pro plugins seen as separate apps? What I’m hoping to do is all within the Lightroom app. And if the "blank" app runs and causes the profile switch, won’t it jump back to the Lightroom profile as soon as I start working in Lightroom?

Do the Semaphore actions you sent have something to do with this? Sorry, but I don’t know what to do with them. When is the Finder activated in this process?

Nope. What I did was made you a custom one, then totally forgot I'd done that rather than just give you the template. My bad!

You can't use KMLink as it isn't a device key and therefore has no 'released' state. Use the native plugin for this, as described above.

Not if Lightroom's profile is triggered independently, with a trigger app.

They might not be needed actually.

I have to go out, but send me your actual macro and I'll see if I can write a better how-to when I get back.

Getting close. Short/long press "Check for release" works, displaying text. I’ve tried an enabled set that tries to open, but that doesn’t work. I’ll attach the macro.

Lightroom SD Profiles-RB's mods.kmmacros (39.3 KB)

At all? Works fine here.

Here's what my trigger app folder looks like:


I don't use Lightroom but I do use Logic. As you can see, there's a trigger app for Logic too which I use to load Logic's profile whenever it activates. If I didn't do this, SD will keep switching away from manually triggered profiles and back to Logic's default one. So, to reiterate, you don't want SD using the default method to trigger its main Lightroom profile. You want to replace that with a trigger app.

Here's a blank app, named appropriately, for you to use:

Lightroom Default Trigger (54.8 KB)

Here's a macro to trigger your default profile whenever Lightroom activates. You need to change the bits highlighted in pink:

Lightroom - Load Default SD Profile.kmmacros (21 KB)

And finally, here's the macro that allows you to do something for a tap and load your Keywords profile with a long press. Again, you need to change the bits highlighted in pink. As you can see, we're being doubly sure the trigger app closes!

Lightroom - Short-Long Press.kmmacros (48 KB)

Definitely ask Elgato for the ability to switch Stream Deck pages via AppleScript or a command line tool - people definitely want this feature, and Elgato is only likely to implement it if they hear from customers.

1 Like

I’ll definitely do that. Seems it would open the door to much more complex workflows for SD.


I put Lightroom - Load Default SD Profile.kmmacros in my Global group-- is that right? However, it goes into an unending loop, with a lot of flickering in the menu bar. Here's how I set it up, trying to follow your instructions:

In the Lightroom SD profile, should I set the "Application" to None, or leave it as Lightroom?


Welp, turns out I was right about needing that semaphore lock after all. Try this version:

Lightroom - Load Default SD Profile.kmmacros (22 KB)

Macro screenshot

Looks good to me!

You need to associate the Lightroom SD profile with Lightroom Sounds like you already did that. :+1:t3: