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?
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.
In the Stream Deck profile, when I select the blank app I’ve named Keywords.app, the Application field still says Blank App. I see it’s not Blank.app, though, so is it getting the app name from somewhere besides its filename?
Try right-clicking Keywords.app 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.
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 Keywords.app, since that’s what I selected?
Still, nothing happens when I run this macro. Is this the logic behind this approach?
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.
SD associates this LR keywords profile with Keywords.app
The Lightroom SD Profiles.kmmacros opens Keywords.app, 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 keywords.app, 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 Keywords.app.
However, when that app runs, SD isn't switching profiles.
Just to see if I could get SD to switch profiles when Keywords.app 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. Keywords.zip (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 Keywords.app stopped the dialog from appearing. Once I get this working, can I just duplicate that one for other profiles, instead of Blank.app?
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 Keywords.app. (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
quit
end run
Remove the Lightroom app as a profile trigger and use another blank app instead.
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’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?
Getting close. Short/long press "Check for release" works, displaying text. I’ve tried an enabled set that tries to open Keywords.app, but that doesn’t work. I’ll attach the macro.
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:
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!
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.
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: