Mute teams meeting with media key

Get help with using AutoHotkey and its commands and hotkeys
theIT
Posts: 2
Joined: 21 Jan 2021, 04:19

Mute teams meeting with media key

Post by theIT » 21 Jan 2021, 04:43

Hi,

I would like to have an AHK script that mutes / unmutes my mic in the ongoing Microsoft Teams meeting if I press a button (play/pause or volume up / down) on my bluetooth headphone. I found an existing solution for that, what is basically working, but it seems if spotify or media player (or I guess any simular app) is running it won't pass the key to AHK, so my script doesn not work in this case. I wrote a simple script to test it like:

Code: Select all

#Persistent
#InstallKeybdHook
Media_Play_Pause::
MsgBox, Pressed
if spotify or media player (sometimes even if only teams) is running it doesn't do anything.
is there a way to always get the media keyevent?

Thank you in advance!
I.T.
User avatar
mikeyww
Posts: 5104
Joined: 09 Sep 2014, 18:38

Re: Mute teams meeting with media key

Post by mikeyww » 21 Jan 2021, 05:49

You may want to have a look at the KeyHistory, to see what is being registered.
theIT
Posts: 2
Joined: 21 Jan 2021, 04:19

Re: Mute teams meeting with media key

Post by theIT » 22 Jan 2021, 03:21

In this case (if spotify is running for example) nothing is registered. :(
User avatar
mikeyww
Posts: 5104
Joined: 09 Sep 2014, 18:38

Re: Mute teams meeting with media key

Post by mikeyww » 22 Jan 2021, 06:32

I can't be of much help.

If you search the forum for "Bluetooth headset", you'll find related posts. One example is below.

https://www.autohotkey.com/boards/viewtopic.php?f=76&t=74226
Post Reply

Return to “Ask For Help”