Change Stream Deck Profile From Macro

Based on that, it's had to imagine an elegant solution. I can think of some really bad ones though :slight_smile:

Q: for @Timac.. So, maybe in the future we might see the capability via the API to switch to a 'named' profile?

Another 'hack' is that I can write my own plugin that embeds a profile and can switch to that via an external trigger.

One 'hack' would indeed consist of creating your own plugin containing a predefined profile.

Stream Deck obviously lacks a proper solution for this problem. We will try to come up with a solution in a future version.

1 Like

Fantastic! Thank you

Following up on this - if anyone is interested, I figured out how to replicate this all within the KM ecosystem. Using KM Groups as virtual STreamdeck profiles.

If there’s interest, i’m happy to post.

Please do! Thank you

Here's how I'm replicating different streamdeck profiles. I'm not great at "walking though" macros so please tell me if something here is not explained clearly enough!

On the streamdeck software, all 15 of my buttons are set to the KeyBoard Maestro actions.

In KM, I have two Macro Groups, each being a "profile." I have a "Work Main" group, and a 2nd group, and a 2nd group called "Work PW." The 2nd group is disabled.

In each group, I have a macro called "~Launch Streamdeck buttons" which assigns an icon and text to each of the 15 buttons. (I keep a template of all "blanks" at the top, so that duplicating this is always fast.) In the Main group, this macro runs at engine launch, so when I turn on my computer, this macro assigns icons and text to all my keys.

One of my buttons/macros simply "switches profiles". It does this by enabling my 2nd Macro Group, running the macro in that group that reassigns the icons and text to all 15 buttons, and then disables the Main group (which this macro is in.)

In my 2nd macro group, each macro performs a task (in this case, inserting the text of very low-level passwords that everyone in my office already knows and not for anything very sensitive!) and then runs a 2nd macro, called "Revert Back to Main."

"Revert Back to Main" is a macro that Enables the "Main" macro group, runs that first Macro that had been run at Engine launch to reassign all 15 keys, and then disables this 2nd Macro group.

That's it. It took a little bit to set up, but now that it is, it's very easy to replicate. I also have a version (on my home machine) that does this based on what app is in the foreground, but that may be a bit much to add here!

I hope this helps!

2 Likes

Sorry for my ignorance here, why go this route instead of using a combo of StreamDeck profiles that contain some KM macros in them?

Is it so you are basically making one big grid of KM macros that switch on the fly and that in other profiles you dont even have to add the KM macro to the StreamDeck profile since your solution is a programmable "grid" of KM macros?

thx

@richtack I think this is a nice workaround until they enable true 'profile' switching. Thanks.

@keyskeys .. The reason for this is that otherwise there is no programatic way to switch profiles, @richtack's solution allows for essentially that. Imagine a scenario where you run a macro in KM and as a result of that macro you want your Streamdeck to land on a specific profile when it's done. This will allow you to do that.

1 Like

@keyskeys What John said. :slight_smile:

You can use Streamdeck to switch profiles based on what app is running, but that's about it. If you want one KM macro (or more complex environment variables) to switch "profiles", you need a workaround like this. Now, I can have a KM trigger a "profile" switch.

And then you're unlimited to what you can do. For example, If I wanted just to have StreamDeck switch profiles when I'm using an app like ScreenFlow, I can do that. But KM as the solution, I can switch to my "ScreenFlow" specific Macro Group on the StreamDeck any time ScreenFlow is running, even in the background - which is really great when I'm recording videos on my computer.

1 Like

I see.

thx

So its KM macros (and possibly turtles) all the way down.

Also just realized that moving KM macros around that have been attached to a certain Stream Deck key is not as easy as copy and paste.

When you copy and paste you break the reference to the actual key that you set it up to be. Yes you can change in KM. but I have a feeling your method would allow for easier moving around of KM macros on the stream deck.

I expect that depends on whether you have explicitly set the virtual row and column.

If you have explicitly set that, then moving the key should not change the link to the macro. However if you have left it as the default, then that virtual row and column will track the physical row and column if you move the button.

1 Like

Just wondering if there has been an update to this. @peternlewis mentioned he was reaching out to Elgato. I have been resisting the workaround because it's clunky.

I have not heard anything further about this, I don't know if @Timac knows of any changes.

(As a heavy user of both Streamdeck and Keyboard Maestro I’m not sure why I haven’t noticed this thread before. Oh well.)

My use case would be to add a button definition to a profile - from Keyboard Maestro. For example, when creating a new client study there’s some file and directory setup I’ve taught KM to do. I’d like to set up a StreamdDeck button or two, too.

At the moment Stream Deck doesn't contain the APIs to let Keyboard Maestro change the profiles. That's definitively something that we want to address in a future Stream Deck version. However at the moment I don't have a specific estimated date.

2 Likes

In my case using "Trigger Apps" is the best work around. I created a bunch of apps that do nothing and have no windows. I've created macros that close the apps as soon as they launch. Then I assigned the apps to specific profiles of my Stream Deck. So for example if I wanted the keystroke "command + option + G" to open Profile 1 on my Stream Deck, I would assign that key command to launch an app which I have assigned to Profile 1. As soon as it launches it will close but not before switching to Profile 1. It works like a charm and it's pretty straight forward to setup!

6 Likes

I vaguely recall that if you open the Streamdeck editor and change to editing a particular profile and then close the editor the Streamdeck then has that profile for a while.

If this is true and reliable it might be the basis for some (UI Scripting) automation.

That's a brilliant workaround. You can create one app for each profile!

Cool! How did you create those empty apps?