os
os copied to clipboard
Media Playback Keys not Handled in elementary OS Odin
See this elementaryos.stackexchange question for more context.
I'm on elementary OS Odin, obviously on Linux amd64 on a fairly modern desktop, and another user on StackExchange reported the same issue. I have an old USB Apple keyboard and an old Logitech G700 mouse, with both having keys for the various media actions, in X terminology:
- XF86AudioPlay: toggle play/pause
- XF86AudioPrev: next track
- XF86AudioNext: previous track
When using the same peripherals on Hera and previous elementary OS versions, the keys work and control playback with whatever music player I am using. I'm not sure how they work in practice (is it done in X? is it done in the WM? is it all done in D-Bus?), but I've played around in D-Bus and usually things are toggled using the org.mpris.MediaPlayer2.Player
interface with the PlayPause
action.
When I am playing music, the media sources (Spotify, elementary's Music, even YouTube) show up in the sound-bar drop-down, and playback can be controlled for there, so clearly it's not an issue with D-Bus or something unique to Spotify.
When I open up Settings/Keyboard/Shortcuts/Media, by default on Odin, there are no mappings to the media keys. If I add them, it still accomplishes nothing and the keys don't actually control playback.
Clearly this is a regression from previous elementary OS releases. I'd love to help, but I don't know Vala, but do know many other programming languages, but I wouldn't know where to look.