You are not logged in.
Hi,
I had a look at the ArchWiki, more precisely at MPRIS page and it is said that the BT headset Sony WH1000-XM3 is capable of using AVCRP to kind of send keycodes to the computer (or at least that's how I understood it worked kinda).
I've launched xev to see what do these resolve to, I've seen XF86AudioPlayPause, XF86AudioPrev, XF86AudioNext.
My issue is when I press the Play/Pause button of the BT headset, the song played by Chromium (triggers a hotkey binding in my i3 configuration which calls "exec playerctl play-pause").
So let's suppose I'm playing a song (in Chromium):
Press Play/Pause -> XF86AudioPlayPause -> playerctl -> music on Chromium pauses.
Press again Play/Pause -> writes into terminal 426u which looks like a very weird character (in vim) no idea what is that but it doesn't display correctly under Chromium with my current set of fonts, so I took a screenshot of it ->
.
I can reproduce the issue reliably because the music never plays back again, even if xev shows it received the correct KeyPress event.
Here is the exact output of xev -event keyboard
> xev -event keyboard
Outer window is 0xa00001, inner window is 0xa00002
KeymapNotify event, serial 24, synthetic NO, window 0x0,
keys: 87 0 0 0 16 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
KeyRelease event, serial 25, synthetic NO, window 0xa00001,
root 0x6d5, subw 0x0, time 94050801, (-246,761), root:(723,785),
state 0x0, keycode 36 (keysym 0xff0d, Return), same_screen YES,
" XLookupString gives 1 bytes: (0d) "
XFilterEvent returns: False
MappingNotify event, serial 28, synthetic NO, window 0x0,
request MappingKeyboard, first_keycode 8, count 248
KeyPress event, serial 28, synthetic NO, window 0xa00001,
root 0x6d5, subw 0x0, time 94052184, (-246,761), root:(723,785),
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
KeyRelease event, serial 29, synthetic NO, window 0xa00001,
root 0x6d5, subw 0x0, time 94052194, (-246,761), root:(723,785),
state 0x0, keycode 208 (keysym 0x1008ff14, XF86AudioPlay), same_screen YES,
XKeysymToKeycode returns keycode: 172
XLookupString gives 0 bytes:
XFilterEvent returns: False
MappingNotify event, serial 29, synthetic NO, window 0x0,
request MappingKeyboard, first_keycode 8, count 248
# Here I pressed left CTRL
KeyPress event, serial 29, synthetic NO, window 0xa00001,
root 0x6d5, subw 0x0, time 94053201, (-246,761), root:(723,785),
state 0x0, keycode 37 (keysym 0xffe3, Control_L), same_screen YES,
XLookupString gives 0 bytes:
XmbLookupString gives 0 bytes:
XFilterEvent returns: FalseOffline