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 continuous scrolling speed adjustment #1649

Merged

Conversation

FireChickenProductivity
Copy link
Contributor

Add the ability to adjust continuous scrolling speed while scrolling by dictating a number_small. The speed becomes the speed setting multiplied by the dictated number divided by ten. The acceleration gets reset every time the speed gets changed. The scrolling speed reverts to the default after the current scroll is finished.
closes #1648

@FireChickenProductivity
Copy link
Contributor Author

I added the ability to set the scrolling speed when starting continuous scrolling.

plugin/mouse/mouse_scroll.py Outdated Show resolved Hide resolved
plugin/mouse/mouse_scroll.py Outdated Show resolved Hide resolved
plugin/mouse/mouse.talon Outdated Show resolved Hide resolved
@FireChickenProductivity
Copy link
Contributor Author

I found a bug that should be resolved before merge.

@FireChickenProductivity
Copy link
Contributor Author

Actually, the "issue" seems to happen without my pull request. Is it intended for some reason for using the continuous scrolling action twice in the same direction to stop the scrolling completely?

@AndreasArvidsson
Copy link
Collaborator

Yes that is on purpose. For people using a foot switch, noise or other to toggle the scrolling on and off.

@FireChickenProductivity FireChickenProductivity deleted the adjustable-scrolling-speed branch January 2, 2025 22:08
@FireChickenProductivity FireChickenProductivity restored the adjustable-scrolling-speed branch January 2, 2025 22:08
@AndreasArvidsson
Copy link
Collaborator

@knausj85 Will test this. If someone else has time before that please go ahead.

@knausj85
Copy link
Member

Actually, the "issue" seems to happen without my pull request. Is it intended for some reason for using the continuous scrolling action twice in the same direction to stop the scrolling completely?

I initially thought this was a bug too; these commands used to be compatible with repeaters and such. I guess I missed that memo!

If needed, we can explore how to make these more friendly for hotkeys / pedals in a separate issue

I tested this a bit and it's a great improvement. I've a few minor suggestions before we merge.

@knausj85
Copy link
Member

Actually, the "issue" seems to happen without my pull request. Is it intended for some reason for using the continuous scrolling action twice in the same direction to stop the scrolling completely?

There is a separate few bugs with this logic though that we might as well fix while we're here:

  • the imgui should probably close & tag be cleared when this happens.

I took a quick swing at fixing that.

@FireChickenProductivity
Copy link
Contributor Author

I identified an issue where if the scrolling speed becomes less than one but non-zero the result is no scrolling. Should I address that by rounding up? (This can happen when trying to set the scrolling speed to a small number)

@FireChickenProductivity
Copy link
Contributor Author

It looks like float values for the scrolling speed get truncated, so changing the scrolling speed from some values to certain other values through voice commands has no effect. I am not sure if we should try to address that to make increasing speed value always increase the actual scrolling speed, but the issue is worth noting.

plugin/mouse/continuous_scrolling.talon Show resolved Hide resolved
plugin/mouse/mouse_scroll.py Outdated Show resolved Hide resolved
plugin/mouse/mouse_scroll.py Outdated Show resolved Hide resolved
plugin/mouse/mouse_scroll.py Outdated Show resolved Hide resolved
Copy link
Member

@knausj85 knausj85 left a comment

Choose a reason for hiding this comment

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

This looks good to me, thanks.

@knausj85 knausj85 enabled auto-merge (squash) January 25, 2025 18:08
@nriley nriley dismissed AndreasArvidsson’s stale review January 26, 2025 01:09

Review is obsolete

@knausj85 knausj85 merged commit 16adf1c into talonhub:main Jan 26, 2025
2 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.

implement scrolling speed adjustment commands
5 participants