7

I'm in the process of getting 20.04 setup after having upgraded from 19.04, and part of it is getting my MM keys to work with spotify. While trying to make the custom shortcuts, I have run into a problem. On pre-existing system shortcuts, the MM keys on my keyboard are registered as valid inputs, and can be assigned:

enter image description here

However while trying to assign a keybind to a custom shortcut, the keypress is not recognized, and I am left on this screen:

enter image description here

What I have tried so far:

  • As suggested in the comments, followed this post's suggestion of disabling default play/pause keys from dconf-editor. No change.
  • I tried with a second keyboard (also with media keys), to no avail
  • I tried to bind a key and unbind it, also no help
  • Looked around in gnome-tweaks in case something got added/updated but couldn't find anything.
  • Came across this post, however, the solution there now shoots an error:
david@david-pc:~$ gsettings set org.gnome.settings-daemon.plugins.media-keys previous ''
expected value:
  (empty input)
  ^
  • After updating to kernel 5.4.0-28-generic, the media keys worked briefly, then seemingly randomly stopped again. After rebooting, the media keys started working again, then promptly stopped working after around 15 minutes.

Is this a bug, or am I doing something wrong? Either way, I would love an answer/workaround.

4
  • Same exact problem! Also following this with no luck -to save you the hassle-: askubuntu.com/a/1011096 Apr 27, 2020 at 12:50
  • 1
    @abdullahkady Didn't work, tried disabling from dconf-editor, but same deal.
    – David
    Apr 27, 2020 at 13:06
  • 1
    Yup, I'm saying it doesn't work either so that you can add to the original post to save people from going through the same hassle. It's really annoying, hopefully some solution comes up Apr 27, 2020 at 13:14
  • So regarding "media keys worked briefly", if you just need to assign them to Spotify I think I've figured it out -not sure, maybe it's just coincidence-. Whenever you reboot, open Spotify application before anything else, use the media keys to play, and then they will work fine through this session. May 5, 2020 at 5:26

1 Answer 1

15

It's a conflict with Chrome.

When I disable media key support via the config (chrome://flags/#hardware-media-key-handling). I was able to use media keys with Spotify without any additional Ubuntu configuration.

5
  • Worked for me as well!
    – Ed'ka
    Sep 1, 2020 at 7:56
  • Sorry that it took so long for me to get to this, but thank you so much :) Wouldn't have thought of that
    – David
    Dec 3, 2020 at 23:54
  • I wish there was a way for Chrome and everything else to work in harmony, because when I disable this setting, the media keys work everywhere else except chrome. They seem to be in exclusive-or conflict.
    – darksky
    Dec 23, 2020 at 7:11
  • Worked for me for Ubuntu22 with Microsoft Edge (which I have instead Chrome), but path to config option a little bit other: edge://flags/#hardware-media-key-handling Mar 2, 2023 at 16:50
  • This didn't work for me at first, and then I realized that my media keys were all disabled in the Ubuntu Keyboard (hotkey) settings. After I rebound the hotkeys in Ubuntu for Media Keys then this fix worked for me.
    – th317erd
    Nov 21, 2023 at 19:53

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .