You are not logged in.
Hello,
I'm using bluetooth headphones to listen to music that's playing with MPD.
When I press prev/next on the headphones, MPD is reacting properly, skipping to the prev/next song.
However when I press the play/pause button on the headphones, nothing happens.
I've also noticed that play/pause is actually working on other applications like SMplayer (but prev/next doesn't work there!).
How can I solve that?
Last edited by Alm (2019-04-08 13:40:54)
See, you're unpacking.
Offline
Hi all, any ideas?
See, you're unpacking.
Offline
Yes.
Don't do that...
https://wiki.archlinux.org/index.php/Co … ct#Bumping
Offline
MPD does not react to mpris events (or for that matter key events) by default, which client are you using? Have you checked configuration of said client?
Last edited by V1del (2019-04-03 16:25:26)
Offline
MPD does not react to mpris events (or for that matter key events) by default, which client are you using? Have you checked configuration of said client?
I'm using ncmpcpp; but actually the prev/next actions are working without any client being open
Yes.
Don't do that...
https://wiki.archlinux.org/index.php/Co … ct#Bumping
Oops, really sorry - won't do it again!
See, you're unpacking.
Offline
That's impossible, from what I'm seeing mpd does not have any support whatsoever to react to any keyboard events by itself. Did you set up some global hotkeys? Which buttons do register when you press them in xev?
Last edited by V1del (2019-04-04 14:58:34)
Offline
That's impossible, from what I'm seeing mpd does not have any support whatsoever to react to any keyboard events by itself. Did you set up some global hotkeys? Which buttons do register when you press them in xev?
I have the following hotkeys set up through dwm:
{ 0, XF86XK_AudioPlay, spawn, SHCMD("mpc toggle") },
{ 0, XF86XK_AudioStop, spawn, SHCMD("mpc stop") },
{ 0, XF86XK_AudioPrev, spawn, SHCMD("mpc prev") },
{ 0, XF86XK_AudioNext, spawn, SHCMD("mpc next") },
This is all that is printed out by xev when I press "next" then "prev" on my headset:
MappingNotify event, serial 32, synthetic NO, window 0x0,
request MappingKeyboard, first_keycode 8, count 248
FocusOut event, serial 32, synthetic NO, window 0x4200001,
mode NotifyGrab, detail NotifyAncestor
FocusIn event, serial 33, synthetic NO, window 0x4200001,
mode NotifyUngrab, detail NotifyAncestor
KeymapNotify event, serial 33, synthetic NO, window 0x0,
keys: 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0
0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0
FocusOut event, serial 33, synthetic NO, window 0x4200001,
mode NotifyGrab, detail NotifyAncestor
FocusIn event, serial 33, synthetic NO, window 0x4200001,
mode NotifyUngrab, detail NotifyAncestor
KeymapNotify event, serial 33, synthetic NO, window 0x0,
keys: 2 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0
0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0
And this is what's printed out when I press "next" then "prev" on my keyboard:
MappingNotify event, serial 32, synthetic NO, window 0x0,
request MappingKeyboard, first_keycode 8, count 248
FocusOut event, serial 32, synthetic NO, window 0x4200001,
mode NotifyGrab, detail NotifyAncestor
FocusOut event, serial 32, synthetic NO, window 0x4200001,
mode NotifyUngrab, detail NotifyPointer
FocusIn event, serial 32, synthetic NO, window 0x4200001,
mode NotifyUngrab, detail NotifyAncestor
KeymapNotify event, serial 32, synthetic NO, window 0x0,
keys: 58 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0
0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0
FocusOut event, serial 33, synthetic NO, window 0x4200001,
mode NotifyGrab, detail NotifyAncestor
FocusOut event, serial 33, synthetic NO, window 0x4200001,
mode NotifyUngrab, detail NotifyPointer
FocusIn event, serial 33, synthetic NO, window 0x4200001,
mode NotifyUngrab, detail NotifyAncestor
KeymapNotify event, serial 33, synthetic NO, window 0x0,
keys: 1 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0
0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0
See, you're unpacking.
Offline
I've also noticed that play/pause is actually working on other applications like SMplayer (but prev/next doesn't work there!).
You globally bound prev/next to mpc in dwm, so no other player will see the key presses. You probably did not bind the correct key for play/pause, look in xev for the key name.
| alias CUTF='LANG=en_XX.UTF-8@POSIX ' |
Offline
I've also noticed that play/pause is actually working on other applications like SMplayer (but prev/next doesn't work there!).
You globally bound prev/next to mpc in dwm, so no other player will see the key presses. You probably did not bind the correct key for play/pause, look in xev for the key name.
Thanks, it all seems to make sense now.
I guess I'll remove global bindings and find a way to pass the keys to mpd when there's no active window to receive them.
See, you're unpacking.
Offline
just install mpdris and let it run in the background. This will act as a mpris2 daemon for mpd.
He hoped and prayed that there wasn't an afterlife. Then he realized there was a contradiction involved here and merely hoped that there wasn't an afterlife.
Douglas Adams
Offline