Keyboard Maestro's Native Stream Deck Plugin Versus Kmlink Plugin

Howdy folks, I'm writing this tutorial to help new(er) users understand the advantages/disadvantages to using the Keyboard Maestro native Stream Deck plugin versus the KMLink Plugin (now available directly in the Stream Deck app).

The KMLink is very handy when you do not need to update the title or icon via a Keyboard Maestro action. It is very simple to setup and is not dependent on button location, meaning it can be moved around with zero consequences.

The Keyboard Maestro native plugin requires a little more setup (typically assigning a virtual column and row, as well as a button ID), but has the unique advantage of allowing KM to communicate back to the button, thus being able to change it's icon and/or title.

To give you an example of how I use both plugins, consider these screenshots of my Zoom profile (or page).

KM native plugin Screenshot (click to expand/collapse)

KMLink plugin Screenshot (click to expand/collapse)

The first screenshot (KM native plugin), shows how I have assigned a Button ID, Virtual Row and Virtual Column to the button. This particular button is for Zoom's microphone. The Button ID allows KM to update the icon as well as the title from within an action. I have it set up to change the color to red when the mic is off, and green when it is on (as in the screenshot). The virtual row and column is used so KM can identify which button is being pressed. Each button should have a unique one to avoid conflict palettes. My naming convention consists of giving a unique number to each page (Zoom page being 3), and then combining that number with the button's position on the SD's layout to come up with row 34, column 33. Again, 3 for my Zoom page, 4 because it's the 4th row down, 3 because it's the 3rd column over. This means that no matter how many pages (or profiles) I have, I will never run out of virtual row/column numbers, and it makes it easy to keep track of them. This is just my method; it doesn’t have to be yours, as long as you assign each button that makes use of the KM native plugin some sort of unique number.

In the second screenshot (KMLink plugin), you can see that I have my 10)[AS:ZM] Unmute All macro selected. This can be selected/changed via the dropdown menu, which makes it very easy to change. Since it does not require a virtual row/column nor a button ID, it also does not matter where you place the button; it will always work. The disadvantage is that this method does not allow KM to communicate back to the button, therefore making it impossible to change it's icon/title. For simple macros, and where you do not need any kind of visual feedback on the SD itself, this probably does not matter. Another advantage to the KMLink plugin is the ability to pass a parameter to the KM macro, much like we can do from within KM. This allows you to execute different actions using a single macro all by changing the parameter. For an example see how I use these buttons on my Apple Music profile to play a specific playlist just by changing the parameter in the SD software.

Play a playlist button Screenshot (click to expand/collapse)

Using KMLink and a supplied parameter Screenshot (click to expand/collapse)

The macro it executes, using supplied parameter Screenshot (click to expand/collapse)

For another example, see @noisneil's post here for some Logic Pro buttons.

So what does this all mean? TL;DR time... if you want a simple button and do not need visual feedback on the SD itself, or you want to pass a parameter to the macro, use KMLink. If you want a button that allows KM to change it's icon and/or title (and don't need to pass a parameter), use the KM native plugin.

One more note on the KM native plugin... if you want to change the icon/title via KM... you CANNOT manually set either of those items from the SD software. They must be left blank (title) and default (icon), otherwise the KM action will not update them. Keep this in mind if you ever set them manually and then later on decide to change them via KM action(s).

Hopefully this quick tutorial helps, and if anybody has any questions on using Stream Deck with Keyboard Maestro, feel free to reach out to me or (hopefully he won't mind me tagging him here haha) @noisneil who also works quite a bit with SD and is knowledgeable about it and whom I have spoken with a number of times about it.

-Chris

18 Likes

One thing I would add is that KMLink has a parameter box that passes on a TriggerValue to KM. The same macro can be triggered by multiple buttons with different parameter values, which can be passed to variables or used to determine which of a number of actions are executed. This alone makes KMLink incredibly versatile.

As an example, you could have one macro that mutes or unmutes your microphone, depending on the TriggerValue it receives.

4 Likes

Great point. I only use the parameter feature on a handful of macros so I didn't think of it in my initial post. I updated it to reflect a basic usage. Thanks Neil!

1 Like

I use it all the time. Here's another great example. One macro is triggered with lots of different TriggerValues to load different plugins in Logic Pro.

SD Screenshot

Pasted_Image_27_03_2022__13_03

Macro Screenshot

Pasted_Image_27_03_2022__13_06

2 Likes

Not real clear on how the virtual page number is assigned. How is the Zoom page 3? I see a 3 in the name at the top left of the screenshot, but does it parse 3 out of that full name?

As you can see, Chris isn't using pages for this particular profile.
image

I'm guessing he's just named his profile "Meetings (3)" for some reason that makes sense to him.

Personally, I don't see any advantage of pages over folders, so I don't use them.

1 Like

Hi @leicaman, as Niel said in the examples I provided I'm not using pages (though I have started using them on other profiles). The Zoom profile screenshots will show you that I named the profile itself "Meetings (3)". The 3 is important (to me) because I prepend my virtual row/column numbers with it. So a button at the very top-left of that profile becomes R31C31, for profile 3, row 1, column 1. A button at the very bottom-right would become R34C38, for profile 3, row 4, column 8. Hope that helps explain it better!

-Chris

2 Likes

Hi Chris,

Just want to make sure I get back to you. After some time, I finally grokked it and it's working like a charm for me now. I love using the system as you described, because it's pretty simple and once I wrapped my head around it is getting me deep into it again. Thanks.

Eric

2 Likes

Hi Eric, glad you figured it out and got it working! Don't hesitate to reach out if you need any more help.

-Chris

2 Likes

Hi Chris,
Thanks for this informative tutorial. Would I be stretching the topic if I asked if you had experimented with Better Touch Tool's stream deck controller, and running KM scripts via that also?

I love the idea of the Streamdeck, but have to say, in practice, I rarely end up using it. I use it in excel for auto fitting column size, and deleting and hiding column's easily, and occasionally moving things to different spaces, but the investment in getting things set up, and then making them look pretty.... I just haven't ended up using it much.

Interested in your thoughts re: Better Touch Tool.

Hey Damian,

I'll be honest, I don’t care for BTT all that much. I find it to be only moderately reliable. I use it for only the simplest things that no other software can replicate.

Over the last few weeks I did take a more in-depth look at their SD integration, and briefly considered migrating my profiles over to BTT control, but ultimately decided against it for the following reasons:

  1. The aforementioned unreliability of the BTT software
  2. The insane amount of work it would take to rebuild my 20+ profiles using brand new software
  3. My astounding lack of motivation of rebuilding said profiles using said software :sweat_smile:

I believe @noisneil has more hands-on experience with the BTT/SD integration however!

2 Likes

Nope, not me. Never even tried BTT!

@devoy is a fan of that combo.

2 Likes

True. I've been steadily rebuilding all my "profiles" using BTT instead of the Elgato software. Being able to programmatically affect groups of buttons in the display is pretty great.

3 Likes

I have switched to using BTT to drive my Stream Decks and for me it works really well, including with KM.

I like the extra flexibility BTT provides with different long press actions etc. The biggest plus for me is the more flexible configuration allowing some keys to be fixed across profiles, for common actions. E.g. a mute button. I also like how BTT automatically adds an extra page of buttons if needed.

Not sure why, but the SD buttons via BTT still work when the dreaded secure input enabled happens. They can run a KM macro when I find a KM hot key won’t.

4 Likes

What's "the dreaded secure input enabled"? I've been unable to use my Stream Deck for about a month now since the Elgato Stream Deck software buttons won't respond to any physical presses, but BTT works, and the Stream Deck works on other computers. I can't tell what's the problem on my M1 Max Macbook running Ventura 13.6.3

Basically when macOS is preventing apps like KM doing their thing due it thinking a password input is open. See here:
https://wiki.keyboardmaestro.com/assistance/Secure_Input_Problem

2 Likes

I successfully downloaded "KMLink by Corcules" using the Elgato Marketplace, and I was expecting it to show up in my Stream Deck app, but it's not there. The original KM plugin is still there. I've restarted the Stream Deck app, and that didn't make it show up. I've searched through all the action folders. I'm stuck. Where is it?

I recall having a similar issue when I first tried to install it, but unfortunately, I can't remember what I did to make it show up :(. Reboot the Mac, maybe? I wish I could remember, but I do recall it wasn't anything like a Terminal command or similar tricky troubleshooting.

-rob.

Reboot didn't fix it.

It's not showing up in the Stream Deck Preferences / Plugins page, as if it didn't even download.

So I tried the process all over again.

  • Go to Elgato marketplace;
  • Search for KMLink
  • Click on Open in Stream Deck
  • Click on confirmation Open button

This time it worked.

If anyone else has problems downloading this thing, try downloading it a second time if the first time doesn't work.

1 Like

I have just tried the KMLink plugin, and while the ability to select a macro by name is nice, the cost of losing the ability to change the button and its label won't justify it for me. So I'll stick with the Steam Deck plugin. Not only is button colour and title important to me, but I can emulate the advantage of the KMLink plugin when I use the native Stream Deck plugin.

My current method is to create a dictionary whose keys contain the name (label) of all the buttons that I want to create, and whose contents are a list of colour names that I want the button to switch between, which is usually "Green,Red" or "Red,Green." When I press the button, the colour of the button changes to the next colour in the list, and the list rotates by one position. Not only that, but the KM variable equal to the button's label is changed to 1 (if Green) and 0 (if Red). This way my macros can detect the state of the button like this:

image

This allows me to detect the state of a button (red, green) and take action based on its state. Currently I don't have a use for triggering a macro when a button is pressed, I simply use the buttons as states upon which my macros rely.

I've been using this method every day for months, and I'm very happy with it. My plan is to share the macro, but I'd like to add more features first. I'm expecting people to say, "But I can't use it to trigger a macro," so that's probably the next feature I'll add.