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

Optionally disable smooth scrolling on trackpads #237

Open
blehn opened this issue Oct 1, 2023 · 3 comments
Open

Optionally disable smooth scrolling on trackpads #237

blehn opened this issue Oct 1, 2023 · 3 comments
Labels

Comments

@blehn
Copy link

blehn commented Oct 1, 2023

Lenis seems to work pretty nicely with a mousewheel, but on MacOS, the native trackpad already has smooth scrolling with acceleration and momentum. Adding Lenis smooth scrolling on top of that makes scrolling feel too loose and unresponsive. There's no official trackpad detection that I know of, but it seems that there are some solutions: https://stackoverflow.com/questions/10744645/detect-touchpad-vs-mouse-in-javascript. I'd love to be able to enable or disable Lenis for trackpads and mousewheels independently.

@clementroche
Copy link
Member

clementroche commented Oct 2, 2023

https://codepen.io/ClementRoche/pen/eYbLWLV

This needs to be tested on different devices, not only MacOS

@arzafran
Copy link
Contributor

arzafran commented Oct 3, 2023

this is a tricky one, i'm using a Logi MX Master 3 mouse on MacOS Sonoma, and the wheel is detected as trackpad..
i don't think there's a reliable way to detect trackpad only.

@Krislunde
Copy link

https://codepen.io/ClementRoche/pen/eYbLWLV

This needs to be tested on different devices, not only MacOS

@clementroche This detects my macOS M1 touchpad as a mousewheel - unless I scroll sideways then it detects the track pad.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

4 participants