Disable media playback with media keys



  • ThatOneRock

    This so much. I recently got the update on my discord client and I dont like it at all. its annoying when I have my media keys binded to my music players and nw discord is binded to them too. Its not something im fond of at all and I wish for this to be changed please

  • Maxbeebs

    It is very frustrating when I pause/play my music on Spotify via my media keys and I get ear-raped by some video that a random person has posted in the chat.

    Hoping to have an option to disable this soon, I know it is a flag that can be changed in chrome by going to " chrome://flags/ "  and then searching 'Hardware Media Key Handling' and then selecting disabled via the dropdown list.

    I know that Discord uses Electron and Chromium so I was thinking, maybe this option to disable the handling of media keys is in Discord somewhere?

  • pack

    This. It is a nuisance. Please give us the option to disable it.

  • bruh

    Facts, add an option to disable it

  • pack

    In the meantime, here's a fix for this bug:

    The problem only happens when playing a video from the chat, so if you are halfway through a video and don't want to play more or have it hijack your media keys, switch channels and then go back. The video will be stopped and you can get your keys back.

  • cydak

    Im surprised this made it out of beta without an option to turn it off. its kind of annoying to start a video, pause your music. and then start the video again because discord thinks you also wanted to pause the video.


    Figured this out. Discord is electron and it uses chromium (chrome). In Chrome there are flags and one of them is "Hardware Media Key Handling" and it can be accessed from chrome://flags/#hardware-media-key-handling . So how to get that on Discord? Well for me discord starts with windows and for it its simple. So lets start with that.

    Follow the steps.

    1. Open "Registry Editor"

    2. Navigate to "Computer\HKEY_CURRENT_USER\Software\Microsoft\Windows\CurrentVersion\Run"

    3. Find Discord, Right click and choose "Modify"

    4. Add " -disable-features=HardwareMediaKeyHandling" to the end of "Value data

    5. Click "Ok"and close Registry Editor

    6. Restart your PC and you are done.


    Now if you use discord from a Shortcut on your desktop or from start menu its bit more complicated. So here is how to do that.

    1. Start by going to your Discord installation folder. For me it's "C:\Users\USERNAME_HERE\AppData\Local\Discord\app-0.0.306"

    2. Now right click "Discord.exe" and choose "Create Shortcut"

    3. Rename Shortcut to "DiscordFlags" (or something similar but you need to remember this later)

    4. Right click "DiscordFlags" and choose "Properties"

    5. Now in "Target" at the end add " -disable-features=HardwareMediaKeyHandling

    6. Click "Ok"

    7. Now navigate to desktop or where ever your shortcut is (For start menu and Cortana search use the search it self to find discord and right click and choose "Open file location" and there is your shortcut to modify)

    8. Now that you have your preferred shortcut selected right click on it and choose "Properties"

    9. Now at the end of "Target" modify "Discord.exe" to "DiscordFlags.lnk

    10. Click "Ok" and you are ready to use your shortcut (Remember to close and open Discord for it to work)


    Hope this helps and I hope discord dev team can implement this as an standard feature on on-off setting inside of Discord settings.

  • cydak

    The solution does work, but i want to add a few things i ran into while running the second solution.


    It is possible your link doesn't link to discord but instead the update utility, in this case you will have to reroute the link to the latest version that is installed.

    Windows will also rightfully call you out for linking to a link, so instead of modifying the existing link, replace it with the link in which you added -disable-features=HardwareMediaKeyHandling



    Yeah I know it's stupid way of doing it (with the double link) but I'm not sure of the usage of "Update.exe" and based on the name its something to do with updating :D. And that's why I didn't do a straight up link to "Discord.exe" from desktop etc. I wanted to keep basic functionally the same way it's intended.

  • lollilol

    you do, the updater.exe starts Discord.exe and you just replace it with the link that executes "Discord.exe with the flag thingys"

    no basic functionality gets broken or some shit

  • vertex

    Solution works, but I'd still like to see an option for it. The Vivaldi browser implemented a switch, which I most happily turned off :D

    Media keys are for media software - like Spotify or Foobar2k. I really don't like it when other programs hijack these buttons, because then I can't pause my music in order to watch a video - be it on youtube.com or in Discord. There should be a switch and it's default value should be set to false.

  • Echo51

    Couldn't agree more with all of what's already been posted/said. A simple switch/toggle would be great

  • LumpyCustard

    Please add an option to disable this feature. I'm sick of pausing a song while playing a game only to have discord start playing something in the background. I don't play entire playlists in discord or use it as my music player, i don't understand why this option needs to be forced on everyone. Since Discord runs on chromium i'd hope it would be a simple matter of adding a checkbox to modify the media keys flag.

  • lynnesbian

    If you're using Linux, Discord will not only hijack and react to the media keys (play/pause/etc) like on Windows, but it will also appear as an MPRIS media player (with the name "Chromium") - meaning that for desktop environments with integrated media controls (KDE, GNOME, Cinnamon...), it will appear as an available media player with playback controls that do nothing:

    Not only does this hijack the media controls, but it adds a useless "player" that only serves to annoy you when you try to control music playback in the media player you actually want to use. Lollypop (the media player I use) still appears in the list, and if I click on it, my media keys once again control music playback in Lollypop, but if I start playing a video in Discord while Lollypop is paused, I have to do this again.

    This can be disabled similarly to how you would disable it on Windows:

    Launching Discord directly

    Whenever you launch Discord directly, pass the flag -disable-features=HardwareMediaKeyHandling. For example, in Cinnamon's Startup Applications settings:

    Desktop files

    Copy the desktop file provided by the Discord package from /usr/share/applications/discord.desktop to ~/.local/share/applications/discord.desktop, and add -disable-features=HardwareMediaKeyHandling to the end of the Exec command. Here's an example .desktop file:

    [Desktop Entry]
    Comment=All-in-one voice and text chat for gamers that's free, secure, and works on both your desktop and phone.
    GenericName=Internet Messenger
    Exec=/usr/bin/discord -disable-features=HardwareMediaKeyHandling


  • seagull

    Can Discord stop ignoring this bug please? Fix it! It ruins the desktop experience.

  • Telvas

    This bug drives me crazy every damn time I play an embedded video in Discord..... Can you please just FIX IT finally? This is absurd that some random chatting app makes global hooks for my keyboard. What else is Discord snooping? My passwords? My microphone? My network traffic? -_-

  • Etshy

    Can you please fix this already ....

    Lots of people complain about this, it should be something easy to do (just force a chromium parameters or make it available in the settings) and it's still not solved.

    Worse than that, almost every update I have to redo the registry and shortcut edition.

  • Binary

    I found a solution for Update.exe --processStart Discord.exe, you can define arguments for this using
    --process-start-args "-disable-features=HardwareMediaKeyHandling"
    C:\Users\{UserName}\AppData\Local\Discord\Update.exe --processStart "Discord.exe" --process-start-args "-disable-features=HardwareMediaKeyHandling"

  • Revelation

    That "fix" has two problems.

    • Its not persistent across updates
    • It only works on windows
  • Binary

    I think this will work with updates because I'm not using the discord version directly

  • cydak

    your fix is also two years old



  • quentinooo


  • lollilol

    BetterDiscord has an option for that now! :)

    v1.3.0 on betterdiscord.app

  • Az X

    "BetterDiscord has an option for that now! :)"

    Thank you. I appreciate you.


Please sign in to leave a comment.