Send shortcut to specific app (Microsoft Teams) action not working when app is on the foreground

Describe the bug
So, I may have found a very specific bug with the send shortcut to specific app action.

I'm trying to set up a global shortcut to mute/unmute Microsoft Teams even when I'm not viewing the app.

My trigger and action are defined as follows (note that I've checked "differentiate left/right modifier keys") so that when I press "right option + M", it should send "cmd+shift+M" to the Teams app. Quick note here: I've configured BTT in a way that maps my caps-lock key to right option and have been successfully using it as kind of a hyper key.

This action works perfectly fine if Teams is not on the foreground. However, when it is, the microphone is not being muted/unmuted even though I'm sure the action is being executed since the HUD overlay is being shown.

I've also verified that everything works if I uncheck the "differentiate left/right modifier keys" AND use the left option key. It still doesn't work with the right option key — in this case, caps lock.

Affected input device (e.g. MacBook Trackpad, Magic Mouse/Trackpad, Touch Bar, etc.):
Keyboard

Device information:

  • Type of Mac: iMac (Retina 4K, 21.5-inch, 2017)
  • macOS version: MacOS Big Sur Beta 11.2
  • BetterTouchTool version: 3.505 (1643)

Did you ever figure this out?. One thing I noticed when trying to set up a global mute for Teams is that the mute command only works if your meeting window is active and not the chat window which is hard to predict because its whichever is last, so i wonder if that was what was going on.

I'm trying to do a mute/unmute ALL videoconferencing platforms.
Webex and Zoom have 'universal' shortcuts, teams doesn't
so sending the sequence to ALL + Teams cancels out and nothing happens when in foreground, but works in background.
likely going to have to do some scripting.

I was able to solve this using AppleScript! It's been working very well so far, both with Teams running in the foreground and in the background. If I'm on a different space, it does switch to the Teams window though.

Action: Run Apple Script (blocking)

on run
	
	tell application "Microsoft Teams (work or school)"
		activate
		tell application "System Events"
			keystroke "m" using {shift down, command down}
		end tell
	end tell
	
	return input
end run
1 Like

This one worked beautifully! I did have to add it under All Apps, rather than specific under the "MS Teams" app.