mpv.net
mpv.net copied to clipboard
Potential bug with `MBTN_RIGHT` / `MBTN_RIGHT_DBL` handling
Describe the bug
While testing mouse controls i've noticed that mpv.net
seems to be having issues with detecting consecutive MBTN_RIGHT
clicks, even when it's unbinded from default context menu command, or when defined as MBTN_RIGHT ignore
.
On top of that… MBTN_RIGHT_DBL
seems to only be detected on third mouse click.
And if this is any clue… When MBTN_RIGHT_DBL
is unbinded, mpv.net
doesn't seem to send the typical message:
[input] No key binding found for key 'MBTN_RIGHT_DBL'
like it happens in mpv
.
Â
Steps to reproduce the behavior:
- Either use
RMB
in the linkedseek-to.lua
script or put this into input.conf:
MBTN_Right script-message-to console type "print-text 'MBTN_Right'" ; keypress ENTER
MBTN_Right_dbl script-message-to console type "print-text 'MBTN_Right_dbl'" ; keypress ENTER
Screenshots In case of the mentioned .lua script:
Spamming RMB
in mpv.net
https://github.com/mpvnet-player/mpv.net/assets/77424331/e0db3c44-a4ba-4196-a08e-bfb15ba9c7cd
And in mpv
for comparison
https://github.com/mpvnet-player/mpv.net/assets/77424331/2306d343-adec-4c30-ad2a-7b984a046ca1
https://github.com/mpvnet-player/mpv.net/assets/77424331/bd27d547-a2b6-46ef-9262-1d852ce51964
https://github.com/mpvnet-player/mpv.net/assets/77424331/5bc4fa9f-e5f9-4ec7-a907-7a25b9ce2af5
Expected behavior
MBTN_RIGHT
should detect every single click the same as in mpv
, and MBTN_RIGHT_DBL
shouldn't require 3 clicks.
At first i thought that this might not be a bug, since mpv.net
uses the RMB
for handling the context menu. On the other hand, it does this through a normal command like any other hotkey, so the disparity seems a bit odd, especially when MBTN_RIGHT
is unbinded or when forced by mp.add_forced_key_binding
.
Additional context
- mpv.net version:
mpv.net 7.0.0.5 (28.12.2023)
- Windows version
WIN10 22H2
- GPU name
RX570
I hope I can reproduce and fix it.
I couldn't get something that works better, unfortunately.