Closed natural-harmonia-gropius closed 2 years ago
Do you know what key is triggered at all when you put on these headphones?
I don't know.
With mpv --input-test --force-window --idle
when I take off it only shows PLAYPAUSE
. nothing with put on.
[input] Key PLAYPAUSE is bound to:
[input] 1. 'cycle pause' in <builtin>:1 (default)
[input] 2. 'cycle pause' in D:/OneDrive/应用/mpv/portable_config/input.conf:80
I think it's not a KeyboardEvent, mpv have same behaviors as window.addEventListener("keydown", (event) => { console.log(event) });
Should this issue keep open?
You can use some third-party software like AutoHotKey to log all events to see what sort of event it looks like, but if mpv doesn't have it registered then --input-test
won't be able to detect it. See recent patches about F13 through F25 as an example. (Windows doesn't have this feature built-in, unfortunately.)
Media Session API can handle this.
might be useful: https://github.com/WebKit/WebKit/blob/main/Source/WebCore/platform/audio/PlatformMediaSession.cpp
One of the plugins that integrate mpv with Windows' media controls might enable this as a "side effect":
TWS headphones support put on to play, take off to pause, It works with Youtube in edge browser. But with MPV, take off triggered the
PLAYPAUSE
ininput.conf
, put on does nothing.