natural-harmonia-gropius / input-event

InputEvent.lua for mpv-player, enhanced input.conf with better, conflict-free, low-latency event mechanism.
MIT License
45 stars 5 forks source link

Shouldn't have repeat before press. #9

Closed natural-harmonia-gropius closed 2 years ago

natural-harmonia-gropius commented 2 years ago

https://github.com/Natural-Harmonia-Gropius/InputEvent#press-to-speedup-release-to-restore

I've been thinking about it for a while, and it looks like the step acceleration in evafast can be done like this. We can do more in command of repeat, like max_speed. If https://github.com/Natural-Harmonia-Gropius/InputEvent/issues/4 could be done. But as the title, repeat before press can cause a bad experience.

SPACE           cycle pause                         #@click
SPACE           no-osd set speed 1; set pause no    #@press
SPACE           ignore                              #@release
SPACE           no-osd add speed 0.1                #@repeat
po5 commented 2 years ago

I have a question about your evafast example, what is the benefit over the built-in logic of RIGHT script-binding evafast?
It's registered as a repeatable complex keybind and detects all states.
Have I missed something that makes it undesirable in some way? Thanks.

natural-harmonia-gropius commented 2 years ago

what is the benefit over the built-in logic of

If the user wants to use both scripts to get customized behavior of the RIGHT of repeat, click and *_click. Maybe someone did, although I wouldn't do that.

Another point is that add_forced_key_binding will override mp.add_key_binding("RIGHT", "evafast", evafast, {repeatable = true, complex = true}).

EDIT: By the way, the mouse event does not have repeat, Maybe someone is using a mouse like the Razer Naga. 😂

natural-harmonia-gropius commented 2 years ago

fixed by https://github.com/Natural-Harmonia-Gropius/InputEvent/commit/d996bd255c2a078127b7749fa06929083bd7d82b