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

trackpad scrolling improvements #361

Draft
wants to merge 4 commits into
base: dev
Choose a base branch
from

Conversation

GalaxyMaster2
Copy link
Contributor

@GalaxyMaster2 GalaxyMaster2 commented Nov 29, 2021

Submitting this as a draft for now. This is an initial implementation of improved trackpad scrolling. It does this by accounting for the size of the scroll value and keeping track with an internal counter. This changes trackpad scrolling from uncontrollably fast to natural and adaptive.

To do:

  • Verify the correct scrollSizeDivisor on macOS (will need outside help for this)
  • Add a scroll speed multiplier setting
  • Add similar logic to scrolling the cursor precision (Ctrl+Scroll)
  • Verify that scrolling with regular mouse wheels is not impacted in any way
  • (Potentially) add a settings toggle
  • (Potentially) add some visualization for the internal scroll step counter

@GalaxyMaster2
Copy link
Contributor Author

There seems to be a bug in unity on linux where trackpad scrolling specifically is different in the editor compared to standalone builds. In standalone builds the scroll values are reported as integer values, making the scrolling too fast and less precise. In the editor the scrolling works similar to on windows, with float scroll values and normal speed.

Upgrading unity to 2022.1.0a16 changed this, but instead of fixing the broken scrolling in standalone builds, it simply broke the editor in the same way. At least it's consistent I guess.

This problem makes a scroll speed multiplier setting pretty much necessary for proper trackpad scrolling on linux.

@yozzozo
Copy link

yozzozo commented Feb 13, 2022

Suggestion (if you haven't considered it already) -- if you're making a settings toggle for the scroll speed multiplier, could there be an additional one for "fast" vs normal speed? For example, trackpad scrolling would normally be at rate X, and holding down shift (or whatever you set the modifier to) and scrolling would be at rate Y.

@GalaxyMaster2
Copy link
Contributor Author

Suggestion (if you haven't considered it already) -- if you're making a settings toggle for the scroll speed multiplier, could there be an additional one for "fast" vs normal speed? For example, trackpad scrolling would normally be at rate X, and holding down shift (or whatever you set the modifier to) and scrolling would be at rate Y.

The setting I mentioned would just be a slider or a number input, not a fixed extra multiplier to be toggled on or off. As for your suggestion of a keybind to shift to a 2nd scroll rate, I don't personally think there will be much of a need for it, but I may consider it in the future.

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