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

Add optional acceleration to the mouse macro. #931

Merged
merged 4 commits into from
Aug 13, 2024
Merged

Conversation

jdoda
Copy link
Contributor

@jdoda jdoda commented Jul 30, 2024

No description provided.

Copy link
Owner

@sezanzeb sezanzeb left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Nicely done! Thanks

inputremapper/injection/macros/macro.py Outdated Show resolved Hide resolved
inputremapper/injection/macros/macro.py Outdated Show resolved Hide resolved
@sezanzeb
Copy link
Owner

sezanzeb commented Aug 4, 2024

Have you thought about the pros and cons of acceleration being a relative value, resulting in an acceleration curve instead of linear acceleration current_speed *= 1 + resolved_accel?

@jdoda
Copy link
Contributor Author

jdoda commented Aug 5, 2024

Have you thought about the pros and cons of acceleration being a relative value, resulting in an acceleration curve instead of linear acceleration current_speed *= 1 + resolved_accel?

Yeah, I had considered whether a different acceleration curve would be better (and I've experimented with an exponential curve since you suggested it) and I like linear acceleration best. Most importantly, I think it just feels the best, but also it's easy to understand, easy to tune, and, even though this probably doesn't matter, it does actually match the usual physical definition of acceleration.

@sezanzeb
Copy link
Owner

sezanzeb commented Aug 6, 2024

Once you pull the latest changes from the main branch, the pipeline will hopefully pass, afterwards I'll happily merge this

Copy link
Owner

@sezanzeb sezanzeb left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

To get the black pipeline to pass (https://github.com/sezanzeb/input-remapper/actions/runs/10295303648/job/28607445456?pr=931) some small changes need to be made. See below. Or run black . in the project directory to automatically format it for you.

inputremapper/injection/macros/macro.py Show resolved Hide resolved
inputremapper/injection/macros/macro.py Outdated Show resolved Hide resolved
tests/unit/test_macros.py Outdated Show resolved Hide resolved
Co-authored-by: Tobi <28510156+sezanzeb@users.noreply.github.com>
@sezanzeb sezanzeb merged commit f06b3ed into sezanzeb:main Aug 13, 2024
4 checks passed
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

Successfully merging this pull request may close these issues.

2 participants