-
Notifications
You must be signed in to change notification settings - Fork 114
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
feat: movemouse-speed #490
Conversation
I tried modifying distance instead, and while it works perfectly for distance = *distance * (self.move_mouse_speed / 10) / 10, Unfortunately copy-pasting this line for min and max_distance yields pretty weird results. |
This case that is not handled correctly:
|
however it would require having absurdly high |
Alright, I think the only thing left to do is to restore |
This is a decent idea, however I'd suggest to use a list instead of a hashmap. Hashmaps/sets can't have duplicate keys (assuming you wanted to use the hashmap as set) while we need to handle a case where 2 same values are added. |
This way makes tons more sense and gets rid of all the previous issues we had for free. I couldn't get it to panic at all through my limited testing, plus it isn't choppy anymore due to high interval values. |
Besides the comment above, this PR looks good to me now. |
I wonder if this should also apply to the scroll events? |
I agree with the idea of having a speed modifier for scroll, but I think it should be a separate action, because someone might have use case where they want only scroll or only mouse movement speed affected at a time. |
Yeah, although I don’t think that’s in the scope of this particular PR. |
Co-authored-by: jtroo <j.andreitabs@gmail.com>
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Nearly there! Thanks for doing all of the revisions so far.
Only some minor textual suggestions for clarity/accuracy- can take them, leave them, or use different text for clarity.
Other than that, please fix the formatting with cargo fmt --all
and fix the clippy errors.
Co-authored-by: jtroo <j.andreitabs@gmail.com>
Co-authored-by: jtroo <j.andreitabs@gmail.com>
Co-authored-by: jtroo <j.andreitabs@gmail.com>
Closes #488
Adds a
movemouse-speed <percentage>
action which somewhat hackily makes the mouse go at a different speed, at runtime.I did some dogfooding and I think the math checks out.