PromyLOPh / pianobar

Console-based pandora.com player
http://6xq.net/pianobar/
Other
1.73k stars 323 forks source link

Adding XF86AudioPlay to keybindings? #718

Closed horomancer closed 2 years ago

horomancer commented 2 years ago

Subject of the issue

I would like to start/stop play back using the touch buttons on my wireless headphones

Your environment

password = [redacted] act_songpausetoggle3 =


### Steps to reproduce
I added the line 'act_songpausetoggle3 = <XF86AudioPlay>' to my ~/.config/pianobar/config file using the line 'act_songpausetoggle2 = <Space>' as a template

I used 'xev' to determine the headphone's button-

KeyPress event, serial 49, synthetic NO, window 0x4200001, root 0x102, subw 0x0, time 20001551, (470,58), root:(474,540), state 0x0, keycode 208 (keysym 0x1008ff14, XF86AudioPlay), same_screen YES, XKeysymToKeycode returns keycode: 172 XLookupString gives 0 bytes: XmbLookupString gives 0 bytes: XFilterEvent returns: False


### Expected behaviour
Pressing the touch button on my headphone to stop/start playback similar to pressing <space>

### Actual behaviour
Pianobar does not register any input from the headphones
PromyLOPh commented 2 years ago

pianobar is not an X11 application and thus cannot respond to this key press. There is a pipe for remote control, see manpage.