[Question] How to write ignore statement in json conf
Closed this issue · 2 comments
verygoodlee commented
In this case, both MBTN_LEFT double_click
in json conf and MBTN_LEFT_DBL
in input.conf have taken effect, double click cycle fullscreen twice.
# inputevent.conf
configs=~~/inputevent.json
[
{
"key": "MBTN_LEFT",
"on": {
"click": "cycle pause",
"double_click": "cycle fullscreen"
}
},
{
"key": "MBTN_LEFT_DBL",
"on": {
}
}
]
# input.conf
MBTN_LEFT cycle pause
MBTN_LEFT_DBL cycle fullscreen
In general, json conf overrides input.conf for the same keys, but the MBTN_LEFT_DBL
can't be ignored.
verygoodlee commented
maybe it's a mpv bug, mp.add_forced_key_binding("MBTN_LEFT_DBL",...)
doesn't overwrite the user's custom bindings in input.conf.
#input.conf
MBTN_LEFT_DBL show-text 'aaa'
--test.lua
mp.add_forced_key_binding("MBTN_LEFT_DBL", "MBTN_LEFT_DBL", function()
mp.commandv("show-text", "bbb")
end)
binding success, but still show 'aaa'
update:
Confirmed to be a bug in mpv mpv-player/mpv#13083
natural-harmonia-gropius commented
我的建议是不要绑定 _DBL
, 逻辑上和 @double_click
冲突.