natural-harmonia-gropius / input-event

Enhanced input.conf for mpv-player. with better, conflict-free, low-latency event mechanism.
MIT License
51 stars 5 forks source link

I need to click 3 times to get double click. #43

Open wooshaq opened 7 months ago

wooshaq commented 7 months ago

Until now I've used mpc but mpv is so much more configurable, one of the last things that I need to set is a mouse control. Ideally I would like to have

L single click for pause/play L double for exit

M single fullscreen

Problem is that for some reason left is somewhat too sensitive in mpv, sometimes is pause when I click on ousc seekbar, sometimes it register double-click and closes player.

So I found InputEvent plugin which expends up to four clicks but while since click is treated as it should for double click to register I need to click trice!? Like first click is being registered as a single and another two clicks as double. Any idea how to fix that?

natural-harmonia-gropius commented 7 months ago

Upload your input.conf and mpv.conf, also show me what scripts you are using.

wooshaq commented 7 months ago

mpv.zip As for scripts, i only use:

uosc inputevent.lua createchapter.lua chapters.lua user-input.lua

natural-harmonia-gropius commented 6 months ago

L single click for pause/play L double for exit

M single fullscreen

input.conf

L       cycle pause         #@click
L       quit                #@double_click

M       cycle fullscreen    #@click

for some reason left is somewhat too sensitive in mpv

Try to remove input-doubleclick-time=200

it should for double click to register I need to click trice!? Like first click is being registered as a single and another two clicks as double.

What about remove user-input.lua? I'm not sure what is that. click should equals to down,up and double_click is down,up,down,up.

wooshaq commented 6 months ago

I alredy tried to disable it, the user-imput plugin. i think it is a part of some other plugin but even without it itcwas the same. I tried to mess with input dounleclick but, ive removed it, set different values and that didnt help. The best resaults are when i set the value above 400 as to get any response i need to click like crazy to register as dbl click.

natural-harmonia-gropius commented 6 months ago

The best resaults are when i set the value above 400 as to get any response i need to click like crazy to register as dbl click.

There's nothing I can do. If 400 works okay, use it.

wooshaq commented 6 months ago

Not ideal, on 400 to get double i need to click 3 times, ill try to get the clean profile with only your script and later add additional ones to see what is causing this. 🤔

wooshaq commented 6 months ago

Ok, I found that double click works well when I move mouse during clicking, but when cursor stands still it begaves buggy, I even tried deleting the profile and use only your script any nothing else.

natural-harmonia-gropius commented 6 months ago

double click works well when I move mouse during clicking when cursor stands still it begaves buggy

That doesn't make sense, your mouse in other software working properly?

Append this line to your mpv.conf:

script-opts-add=inputevent-configs="input.conf,~~/test.json"

And create test.json in same directory of mpv.conf

[
  {
    "key": "SPACE",
    "on": {
      "click": "show-text click",
      "double_click": "show-text double-click",
      "penta_click": "show-text penta-click",
      "press": "show-text pressed",
      "quatra_click": "show-text quatra-click",
      "release": "show-text released",
      "repeat": "show-text repeat",
      "triple_click": "show-text triple-click"
    }
  }
]

Then test all actions include press and release. If anything going wrong report this issue to mpv, I don't think there's any mistake on my part. https://github.com/mpv-player/mpv/issues

wooshaq commented 6 months ago

I found that there must be a problem with mpv.net, script works ok on regular mpv but there are problems on net. Now I need to decide to keep net for the extra features like remembering last size and position or keeping this script... Darn!

natural-harmonia-gropius commented 6 months ago

I did some testing, you need to report this issue to mpv.net, It doesn't report key events correctly.

mp.add_forced_key_binding(
    "MBTN_LEFT",
    "MBTN_LEFT",
    function(e)
        print(e.event)
    end,
    { complex = true }
)

When I have double click. image