jfedor2 / hid-remapper

USB input remapping dongle
Other
1.04k stars 120 forks source link

Scroll Acceleration / Momentum #24

Open ciphan opened 2 years ago

ciphan commented 2 years ago

I really want to use a trackball in each hand - one dedicated to mousing and one dedicated to scrolling. I want the ball movement from the "scrolling hand" to act like scrolling on a touch screen with precise control for small and slow movements and with the ability to "flick" the ball and let the physical momentum transfer to momentum in the on screen scroll event. KensingtonWorks's TrackScroll in combination with a very tweaked SmoothScroll configuration gets really close but TrackScroll emulates a regular scroll wheel and so lacks the precise scrolling and I really like the idea of a hardware solution anyway.

With this project, although I'm sure I read that you have implemented precise scrolling it does not seem to act that way for me - it seems like normal scroll wheel emulation - and as it currently does not have scroll momentum I loose the momentum provided by TrackScroll.

In any case, I see the potential in hid-remapper. Do you think this dream can eventually be realized through this project? If so, please let me know if there is anything I can do to help it along.

jfedor2 commented 2 years ago

Personally I don't like acceleration, I want my inputs 1:1, which is why this feature never got priority. But of course I can see how some people might want it, for scrolling or just regular cursor movement. We should be able to implement it in some generic configurable fashion.

"Momentum", or inertial scrolling, is a bit tricky. It works really well on touchscreens and touchpads, because they know when your finger is touching the screen and when it is lifted. With this information it's possible to only apply it when the user expects it and do a normal stop otherwise. With a regular mouse or trackball we don't have this information and therefore we don't know what the user intended to do. I'd expect it to feel "floaty" if we gave it inertia all the time. Maybe it would be fine for scrolling.