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

[Question] How to write ignore statement in json conf #38

Closed
verygoodlee opened this issue Dec 13, 2023 · 2 comments
Closed

[Question] How to write ignore statement in json conf #38

verygoodlee opened this issue Dec 13, 2023 · 2 comments

Comments

@verygoodlee
Copy link
Contributor

verygoodlee commented Dec 13, 2023

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
Copy link
Contributor Author

verygoodlee commented Dec 13, 2023

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)

image
binding success, but still show 'aaa'

update:
Confirmed to be a bug in mpv mpv-player/mpv#13083

@natural-harmonia-gropius
Copy link
Owner

我的建议是不要绑定 _DBL , 逻辑上和 @double_click 冲突.

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

No branches or pull requests

2 participants