You are not logged in.
There's some media keys on my keyboard, and I can let Firefox play or pause by pressing the play/pause key.
But for mpv it doesn't work at all, mpv doesn't respond to that.
I can pause VLC with my play/pause key, but cannot resume after that.
And...I can't assign my media keys in VLC because VLC cannot detect my media key press. BUT, there's some Media Controller shortcuts in my KDE setting and I can assign media keys to them, they are already assigned by default. So I think right now KDE is monitoring media keys, and relays media controlling events to applications.
So I kind of don't get what's going on? Perhaps there's an option somewhere to enable controlling mpv with media keys. As for VLC, probably either KDE or VLC went a bit wrong.
Offline
They're likely assigned to a global daemon (kglobalaccel) that forwards them via https://wiki.archlinux.org/title/MPRIS
https://wiki.archlinux.org/title/Mpv#mpv-mpris needs a plugin, no idea why vlc doesn't resume but I assume the key is bound to pause, not playpause?
Offline
no idea why vlc doesn't resume but I assume the key is bound to pause, not playpause?
I checked, it's bound to play/pause.
Btw I installed playerctl, and I can control VLC with it: `playerctl play-pause` works fine. But my play/pause key just wouldn't work with VLC.
Offline
I checked, it's bound to play/pause.
Where exactly? In vlc or in KDE?
More success w/ the mpv plugin?
Offline
Where exactly? In vlc or in KDE?
In KDE my Media Play key is assigned to "Play/Pause media playback".
In VLC, "play/pause" is assigned to "Space" and "Media Play/Pause".
Both shortcuts in KDE and VLC are default settings.
Though in KDE it's "Media Play" and in VLC it's "Media Play/Pause", I believe they correspond to the same key, because if I delete the shortcuts and then add them back again seperately by pressing my Media Play/Pause key, KDE shows "Media Play" and VLC shows "Media Play/Pause".
Btw, if I have my "Media Play" assigned in KDE, I can't change the shortcut in VLC because VLC doesn't respond to my keystroke. I think it's because KDE intercepted the keystroke.
More success w/ the mpv plugin?
Installed mpv-mpris, works perfectly.
Last edited by FishBoneEK (2024-10-18 04:08:29)
Offline
KDE grabs a global shortcut that will hide the key from clients, that's normal.
If you disable that and assign the internal VLC shortcut and that can also no toggle play/pause, that would rather point at a VLC issue (how does the space key behave?)
To see what gets send to VLC, run
dbus-monitor --session &| tee /tmp/dbm.log
and press the key (the dbus traffic should also be logged to /tmp/dbm.log)
Offline