How do you switch whats controlled by media keys?

https://lemmy.dbzer0.com/post/25499675

How do you switch whats controlled by media keys? - Divisions by zero

I use Kubuntu 24.04. My keyboard has working media playback keys. When I listen to music and a video starts playing, I want to pause the music. It usually pauses the video which i could also pause easily in other ways. Is it possible to write a script that toggles through the other other media playing processes in terms of coupling them to the media keys?

I don’t have a solution for you, but to get you started, run xev and see which keycode event is triggered by the keypresses.