Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

mp.add_forced_key_binding() can't overwrite MBTN_*_DBL key in input.conf #13083

Closed
verygoodlee opened this issue Dec 13, 2023 · 1 comment · Fixed by #14328
Closed

mp.add_forced_key_binding() can't overwrite MBTN_*_DBL key in input.conf #13083

verygoodlee opened this issue Dec 13, 2023 · 1 comment · Fixed by #14328
Labels

Comments

@verygoodlee
Copy link
Contributor

verygoodlee commented Dec 13, 2023

Important Information

  • mpv version
mpv v0.37.0-90-g9b001b44 Copyright © 2000-2023 mpv/MPlayer/mplayer2 projects
 built on Dec 13 2023 00:36:31
libplacebo version: v6.338.0-62-g52314e0-dirty
FFmpeg version: N-112963-g03ac6aa62
FFmpeg library versions:
   libavutil       58.32.100
   libavcodec      60.35.100
   libavformat     60.18.100
   libswscale      7.6.100
   libavfilter     9.14.100
   libswresample   4.13.100

Reproduction steps

bind MBTN_*_DBL key in input.conf, and force bind same key in test.lua

# input.conf
MBTN_LEFT_DBL show-text "left_dbl input.conf"
MBTN_RIGHT_DBL show-text "right_dbl input.conf"
-- test.lua
mp.add_forced_key_binding("MBTN_LEFT_DBL", "MBTN_LEFT_DBL", function() 
    mp.commandv("show-text", "left_dbl test.lua")
end)
mp.add_forced_key_binding("MBTN_RIGHT_DBL", "MBTN_RIGHT_DBL", function() 
    mp.commandv("show-text", "right_dbl test.lua")
end)

image

Expected behavior

show "left_dbl test.lua" and "right_dbl test.lua"

Actual behavior

show "left_dbl input.conf" and "right_dbl input.conf"

Log file

log.txt

@guidocella
Copy link
Contributor

guidocella commented Dec 13, 2023

Related to #11154 and fixed by adding mp.add_key_binding("mouse_move", function() end), but MBTN_RIGHT_DBL also not being rebindable if it's in input.conf is a newly discovered bug.

Edit: actually this was already noticed in the last comment: "The builtin keybindings have a MBTN_LEFT_DBL binding, but not one for MBTN_RIGHT_DBL, which is why it works fine for the right mouse button."

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants