kanata icon indicating copy to clipboard operation
kanata copied to clipboard

Feature request: add action to set movemouse-accel-xx acceleration to max value

Open amospalla opened this issue 1 year ago • 2 comments

Is your feature request related to a problem? Please describe.

Using the pointer with kanata mouse features works pretty well once you get your ideal interval/acceleration-time/min/max values. You start with slow movements but also allow to accelerate to move large distances.

When I already know I need to move some large distance from the beginnig, I need the pointer to already start moving fast, I do a short-in-time but fast-in-distance movement (using movemouse-speed), and after that I release the pointer and start again with the minimum acceleration. This pattern works pretty well once you get used to it.

I tried using movemouse-speed with different values, but the mix of movemouse-accel-xx and movemouse-speed feels unpredictable and not useful for short-medium distances.

Describe the solution you'd like.

It would more be predictable and comfortable if instead of having a modifier key to multiply the speed which in turn is accelerating, the modifier key would just set the distance to its max value instantly. This speed is well known and predictable.

Describe alternatives you've considered.

As an alternative the action could be used set the timeout between min and max values shorter, which would make it faster to arrive to the max value. A variant of movemouse-speed like for example movemouse-timeout which instead of being a ratio to the pointer speed, would be a ratio to the mouse acceleration-time.

Additional context

No response

amospalla avatar Nov 24 '24 20:11 amospalla

Some useful code references:

Check for max distance:

https://github.com/jtroo/kanata/blob/e8afdc43eef4d010fac9f0270865a1f74abc1a5c/src/kanata/mod.rs#L866

Custom action handling:

https://github.com/jtroo/kanata/blob/e8afdc43eef4d010fac9f0270865a1f74abc1a5c/src/kanata/mod.rs#L1323

Sample PRs for adding new action parsing:

https://github.com/jtroo/kanata/pull/1355/files https://github.com/jtroo/kanata/pull/1336/files

jtroo avatar Nov 25 '24 02:11 jtroo

Thank you for the references. I do not know rust still I'll try to do this on a free weekend :)

As always, thank you very much for this amazing software.

amospalla avatar Nov 25 '24 12:11 amospalla