SOLVED

Media Keys and Teams notifications

Brass Contributor

If I use keyboard media keys to pause music when I receive a call in teams, the notification sound doesn't seem to get dismissed when I answer the call. So, when I later press play, it also resumes playing the teams call sound over my music. 

 

It does seem to go away on it's own eventually, but it's kind of annoying when I want to listen to music!

graemec5_0-1606932042920.png

 

47 Replies
best response confirmed by ThereseSolimeno (Microsoft)
Solution
Hi @graemec5

Known issue, as raised here on uservoice

https://microsoftteams.uservoice.com/forums/555103-public/suggestions/39956326-media-keys-affecting-...

If you go to that uservoice, a few comments down you should see a solution to this: go to avatar > settings > permissions > turn off midi device. People have reported that it has solved it for them

Hope this resolves and answers your question

Best, Chris
Sadly, it does not work... :(

@graemec5Like you, I suffered from this. For me, this has fixed the issue:

try starting Teams with -disable-features=HardwareMediaKeyHandling

eg. C:\Users\Username\AppData\Local\Microsoft\Teams\current\Teams.exe -disable-features=HardwareMediaKeyHandling

If you have e.g. a start menu shortcut (or other shortcut for teams), you can edit it and add it as a (commandline) argument so you wont have to remember it. The solution mentions Windows, but for me it also works on Linux, which is really nice!

 

Taken from here: https://answers.microsoft.com/en-us/msteams/forum/msteams_tfb-msteams_persett-msteams_subnotif/teams...

@graemec5 as a workaround, update the teams autostart post in the registry.


It's located in the following path

Computer\HKEY_CURRENT_USER\Software\Microsoft\Windows\CurrentVersion\Run

Key is named "com.squirrel.Teams.Teams"


If you modify the --process-start-args to contain the "-disable-features=HardwareMediaKey" value, then it should be set when launched on startup.


On my computer, the full value is

C:\Users\My Name\AppData\Local\Microsoft\Teams\Update.exe --processStart "Teams.exe" --process-start-args "-disable-features=HardwareMediaKeyHandling --system-initiated"

 

 

@dhvik thank you very much!

Your suggestion didn't work for me perfectly as my registry entry got overwritten with every restart of windows but this is my modified solution now:

1) Go to settings and switch off "Auto-start application"

2) Go to C:\Users\USERNAME\AppData\Roaming\Microsoft\Windows\Start Menu\Programs and search for "Microsoft Teams" / Right click on the short cut / Copy

3) Press WIN+R / type in shell:startup

4) Right click in the autostart folder / Paste (now the shortcut should have been added to your autostart folder)

5) Right click on the short cut / properties / short cut and copy/paste the following to target:

 

C:\Users\My Name\AppData\Local\Microsoft\Teams\Update.exe --processStart "Teams.exe" --process-start-args "-disable-features=HardwareMediaKeyHandling --system-initiated"​​

 

6) Apply changes

7) Restart your computer

 

This works fine for me now. Hope it helps you, too :smile:.

@AndreDIAL I noticed the same. Seems that Teams updates the autostart registration each time it starts (and overwrites any changes).
I also switched off the autostart setting (in Teams configuration). This removed the registry autostart key.
Then you are free to manually launch teams any way you would like to. 
(I added a new key to the same registry folder and named it Teams instead, but a shortcut in the autostart folder as you mentioned, works just as fine)

Has anyone heard of a solution to this that still works? It seems to suddenly have gotten worse on my system and it completely ignores the "-disable-features=HardwareMediaKeyHandling" flag. I have to restart Teams every time I get a call for my media keys to work.

I am so sick of the Teams devs spending all their time adding new features and none fixing the myriad of bugs this program has. We can't get rid of this program fast enough for me.
Same Problem here. It is really annoying.

The command line parameters are no longer passed to the Chromium instance of Electron. I'm not sure if it's a bug of Teams or Electron, but I have my guess ;)


But you can still disable HardwareMediaKeyHandling by some advanced methods. Take a hex editor and search for HardwareMediaKeyHandling in teams.exe.

You'll find something like:

 

4D 65 64 69 61 4B 65 79 48 61 6E 64 6C 69 6E 67 00 00 00 00 00 00 00 00 38 C7 09 47 01 00 00 00 01 00 00 00 00 00 00 00

 

 Replace the last instance of 01 with 00 which should disable HardwareMediaKeyHandling again

 

4D 65 64 69 61 4B 65 79 48 61 6E 64 6C 69 6E 67 00 00 00 00 00 00 00 00 38 C7 09 47 01 00 00 00 00 00 00 00 00 00 00 00

 

This will most likely violate the end-user license agreement and these changes will also most likely be reverted by any Teams update. But if you came this far, you should be able to find a way to patch the file automatically after every Teams update.

Well, that's what we are left with when Teams can't get basic features right in 2022.

@dawustIt seems absolutely insane that this is the only viable solution in 2022 to disable a "feature" that has no reason to even be in the application.

Thanks, but somehow I cannot find 4D 65 64 69 61 4B 65 79 48 61 6E 64 6C 69 6E 67 00 00 00 00 00 00 00 00 38 C7 09 47 01 00 00 00 01 00 00 00 00 00 00 00 :thinking_face:

@TheParadoX1984 

Search using HxD for the following hex 4D 65 64 69 61 4B 65 79 48 61 6E 64. Make sure that Hex-values is selected when searching. On the "Decoded text" column it should say MediaKeyHandling

It should be at offset 0706CF00.

@dawustThe fix works great. Thanks!

Microsoft seems to have deprecated this setting entirely, because as of today, not even editing teams.exe like this seems to prevent them from preventing me from pausing my music when I get a call. I cannot fathom what they stand to gain from this.

Hex editing worked for me today @Christian_Wenz

I had to change the 01 to 00 on the first byte of the last group of 8 bytes

4861726477617265 4D656469614B6579
48616E646C696E67 0000000000000000
38C7094701000000 0100000000000000

I don't recommend people do this unless they know what they are doing though, you will end up having to reinstall if it goes wrong.

The second to last group of 8 bytes is different for me, which is why I was confused. I can confirm that it does in fact work for me now, as well.

@dawust Hey, thank you very much for this tip. Seems to work fine.

 

BTW just use notepad++ with HEX-Editor Plugin to edit it.

I really hate that Microsofts approach has become "make everything as primitive as can be for idiot users" without giving their users any option to customize their apps anymore. Back in the day you had tons of settings, now everythings forced onto you. Same for Windows 11. Took me one year to find some hidden Windows <10 menus where I could finally disable Headset mode on my bluetooth headphones, just so that games and Teams stopped enabling Headset mode everytime although I explicitly deactivated those audio devices. All they make is more problems and worse software...

I just tried it, and when I set that byte to 00, Teams won't launch until I change it back to 01 :(

unionp_0-1668631101842.png

 

@unionp 

What is the filepath of your Teams shortcut 'C:\Users\YourName\AppData\Local\Microsoft\Teams\Update.exe --processStart "Teams.exe"' or 'C:\Users\YourName\AppData\Local\Microsoft\Teams\current\Teams.exe'? The former one doesn't work for me either, maybe Update.exe verifies the checksum of Teams.exe. So could you just try to start Teams.exe instead if it isn't already the case.

1 best response

Accepted Solutions
best response confirmed by ThereseSolimeno (Microsoft)
Solution
Hi @graemec5

Known issue, as raised here on uservoice

https://microsoftteams.uservoice.com/forums/555103-public/suggestions/39956326-media-keys-affecting-...

If you go to that uservoice, a few comments down you should see a solution to this: go to avatar > settings > permissions > turn off midi device. People have reported that it has solved it for them

Hope this resolves and answers your question

Best, Chris

View solution in original post