Stream Deck and Microsoft Teams™

Good afternoon everyone.

I use Microsoft Teams™ for my real job. I hold both large and small meetings with video (large meetings just have one presenter and I act as producer.) I just purchased a Stream Deck.

I have created a Stream Deck profile. And I have created a mute on/off as well as a video on/off button. The problem is that these get “out of sync” with the status in Teams. I’d like the visual appearance of the button to accurately reflect whether the mic is active in Teams. Same for video.

Is there any way to easily create a button that will always accurately reflect the current status and then change the status when pushed?

Second part of the equation. Sometimes I’m in a different window. Perhaps I have an Excel Sheet open on my second screen. What is the best way to continue to be able to have mute button? I’m currently using a Teams Profile but its only active when Teams is the front window.

Is there some rule of thumb on when I should use a profile, versus when I should use a folder?

Is there a way. Yes. Is it easy? Depends on how comfortable you are with coding a plugin for the Stream Deck to talk directly to the Microsoft Teams app.

You might well be able to work around it by having something running in the background monitoring the Teams window in the foreground (e.g. looking for a button/image, or menu match (sorry I use Teams too, but on a PC for work, so I’m not sure how these vary on the Mac version). Keyboard Maestro’s official plugin will allow you to update keys on the deck, but I suspect it would still take some effort to get things working smoothly.

The trickiest part might be only sending the updates when the right profile is active, but if you have tied it to the app, and the timing is sufficiently large, you shouldn’t get false activity.

  1. Add a Mute button to all of your other Stream Deck profiles that you might have open.
  2. Get a second StreamDeck for it so you always have it available :wink:
  3. Use a fallback keyboard shortcut trigger.

I don’t know if there is exactly. I generally use profiles tied to apps, but when I run out of space I add folders to the profile. For apps where I don’t have a profile assigned, the default profile gets assigned, and that again would have some folders.

I use mine on both my wok PC and my Mac, and while the functionality I have varies as widely as the apps and needs I have on each, the general approach remains the same on both.

Hope that helps.

Thank you for the explanation - I’ll work through those and see what works for me. I did come up with another dumb but quick question. I am trying to write two KM scripts - one to mute, and one to unmute. I’m putting a conditional that looks at the state of the mic picture found in the call window. If its unmuted, the mute script will execute. If it is already muted it will do nothing. Seems like it will help make it easier to keep in sync while I find a more permanent solution.

The question centers around how to select the correct TEAMS window. I may have a separate chat window, and the primary window opening addition to the Call window. So, here’s the dumb question. Is the window index reliably reflected in the order they are listed in the Window menu? For example, is the top most window 0 or 1, then the next window down is the next index? I’ve noticed that calls are usually (dangerous I know) the second window down in that list. So I was looking to reference it by index. Otherwise is there another way to identify any call window (they’ll have different names) from the chat windows, and primary window?

Thanks again for the time to answer above. And BTW - thanks for the blog suggesting the Nerd or Die buttons for the SD. I love the aesthetic.

1 Like

Have you considered maybe just taking a different approach and rather than working with Teams, working more towards the hardware level?

A few years back I made a Keyboard Maestro macro that toggled the sound level of my microphone effectively muting and unmuting it. That means I can mute my microphone regardless of the app.

Since you can query the level, you could use that to get an accurate read regardless of windows, and irrespective of which app. If you have an accurate read, you could set an accurate picture of the microphone level.

Just an idea, but it might be too broad I guess if you might need to use your microphone for other things like a Siri query I guess. Assuming that is that Teams on Mac controls the microphone input independently for the app; otherwise, it would effectively be the same.

1 Like

Thanks. I think Stream Deck has a native function to mute and unmute the mic at the system level. I was testing it and it puts a warning window over the top of the incoming video which is less than ideal. For standard Teams meetings, the software also shows an indicator to everyone that the mic is muted. Unmuting your mic is an informal way to indicate you’d like to say something. However, If it weren’t for the warning box over the video, I’d have considered the system level mute.

I can barely walk and chew gum. No way I’m going to have my mic live in another app while my meeting is going on. I’d end up broadcasting my unfiltered thoughts to the world. Would not be good.

Thanks for the idea.

DK

The answer is no, especially with the word “easily”.

The only “easy” way to do this is to “train” yourself to only using the Stream Deck button to Mute/Unmute and Video On/Off.

There’s no easy way to programmatically make sure it is current.

I wanted to create one for Webex. I just wonder how you create and test one for a video call service without debugging it “live” and annoying the heck out of everyone else.

Join your call as a guest from another device for a call that will only be with you - a bit like the Skype echo123 test but you get to use both accounts. We used to use that approach in my last job all the time for testing video conferencing. No disturbing anyone else and testing on your own terms. Headphones and muting the guest account allow you to check all of your outbound AV.

1 Like

Thank you all!

The best I was able to come up with was 2 KM scripts. I created a “Hotkey Switch” with a separate KM script on each. I select the proper window for the call, then use a found image step to determine whether the mic is on or off. If it is out of sync the button doesn’t do anything. If it is in the correct state, then the script executes.

So, when I press the button to turn the mic on, it checks to see if it is currently on. If it is, the script doesn’t do anything. but the state of the button on the Streamdeck still changes. When pressed again, the second script checks to see if the mic is off, and if it is on, it does execute and turn it off.

A little Rube Goldberg - esque, but it is pretty self-syncing.

As far as testing goes, Microsoft TEAMS™️ has a “meet now” function. So I just punch up a meeting with me as the only attendee any time I need to test.

Note for future reference. Microsoft TEAMS™️ gained support this year for a “New Meeting Experience” which opens a separate window for calls, and importantly has the controls persistently visible. My approach would not work in the standard meeting experience.

2 Likes

You might also want to support this admittedly far down the list suggestion on the MS Teams site (https://microsoftteams.uservoice.com/forums/555103-public/suggestions/40187815-applescript-for-mute-or-global-shortcut-on-macos) so that they expose something AppleScript can attach to and then it would be a simple job to fork the excellent Zoom plugin (https://github.com/smitmartijn/streamdeck-zoom-plugin) - I’m not holding my breath though

1 Like

Thank you. Agreed that its probably not gonna happen soon, but: Done!

Can you please share your KM scripts, I was hoping to do this also.

Thanks!

I use a few things to mute in Teams and to show what the status is…

  • I have a variable in Keyboard Maestro named teamsMuted which will either be true or false
  • I have two Keyboard Maestro named clipboards (micOn and micOff) that contain images to represent whether the mic is muted or not.
  • I use the Keyboard Maestro Streamdeck plug-in with the Virtual keys mapped to Row 900 and Column 900 (which allows you to move the key around if required).

The Keyboard Maestro macro does two things:

  1. It activates the active call window and then hits ⌘+⇧+M to toggle mute
  2. It then tests if the value of teamsMuted, sets the appropriate icon from the named clipboard and toggles the teamsMuted variable.

There are occasions where the value of the variable and the actual mute status will get out of sync. I am working on a way to handle that.

1 Like

Got it, makes sense. Thanks!

That’s a great use for a Named Clipboard.

On a more abstract note, why did you choose to use a named clipboard instead of a variable pointing to those image files? I’m trying to grasp the difference, pros and cons between variables and named clipboards.

I decided it would be easier just to have the image file in Keyboard Maestro rather than retrieving the file from disk. You could do it either way I suppose.

1 Like

Stream Deck has had a plugin to show mic status and mute/unmute, but until recently it was Windows only.

However, a recent update has added macOS support. I wrote about it here:

or you can get it from GitHub here:

(This is included with the default Stream Deck software, but the version on GitHub is updated more often than the version with Stream Deck software.)

Also …

Especially if you have an M1 Mac, make sure you have the recent 4.9.3 version of the Stream Deck software which makes it usable again on M1 Macs (previously CPU usage went 100%+ and it was super laggy and frustrating).

Nitpick: You mean “has added Mac OS support” towards the top of your comment.

Oy. Yes I do. Fixed. Thanks.

1 Like