sumatrapdfreader / sumatrapdf

SumatraPDF reader
http://www.sumatrapdfreader.org
GNU General Public License v3.0
12.95k stars 1.67k forks source link

Analog-like touchpad scrolling #2267

Open zycsss opened 2 years ago

zycsss commented 2 years ago

Currently the double finger scrolling gesture on touchpad functions in Sumatra PDF the same as mouse scrolls. But that's not the best experience for touchpad. I wonder if you guys can add features so that the scrolling experience on touchpad is continuous and analog-like. Thanks.

GitHubRulesOK commented 2 years ago

Most hardware settings are controlled by the system so on my ancient Win7xP NetBook same as my spanking Win10 touchpad both only have Right and left controls

Analog scrolling is activated by Windows ClickLock in mouse settings for trackpads (not that different to using a mouse middle button but those uses smoother AutoScroll)

zycsss commented 2 years ago

Most hardware settings are controlled by the system so on my ancient Win7xP NetBook same as my spanking Win10 touchpad both only have Right and left controls

Analog scrolling is activated by Windows ClickLock in mouse settings for trackpads (not that different to using a mouse middle button but those uses smoother AutoScroll)

Thank you for your explain. So that means Web browsers such as Chrome wrote their own scrolling method or so? Sry, not very familiar with codes.

GitHubRulesOK commented 2 years ago

For me browsers generally behave the same as SumatraPDF but dont have ClickLock, only AutoLock with a mouse. Which one behaves different? and how? But SumatraPDF is limited to passing clicks over to windows for many User Interface functions, thus the jerky stepping of line feeds as set in windows settings.

zycsss commented 2 years ago

For me browsers behave the same as SumatraPDF which one behaves different? and how?

I'm current running a device with Precision touchpad. So, with Chrome or Chromium based Edge (they are the only two web browsers I've used so far), if I use double finger gesture on touchpad scrolling up and down, the page moves up and down with no glitter/ jam. The scrolling experience is the same as you scrolling up and down on any application on an Android or IOS device.

GitHubRulesOK commented 2 years ago

Ok this Windows 7 Edge has no support for scrolling except with a mouse but Windows 10 Edge with similar pad does scroll smoothly so I guess its a Microsoft Edge thing, but thats why I tend to use a mouse rather than the touchscreen

zycsss commented 2 years ago

Ok this Windows 7 Edge has no support for scrolling except with a mouse but Windows 10 Edge with similar pad does scroll smoothly so I guess its a Microsoft Edge thing, but thats why I tend to use a mouse rather than the touchscreen

Excectly, that's the reason I wanted to ask if it's possible for adding simular support in Sumatra PDF.

DevBeatDad commented 2 years ago

@GitHubRulesOK What would it take to add that kind of support for SumatraPDF??

GitHubRulesOK commented 2 years ago

I have no Idea possibly a programming team like Google or Microsoft with a set of hooks into those various drivers, There have been other suggestions to use extra 3rd party drivers.

DevBeatDad commented 2 years ago

@GitHubRulesOK Hmmmm, that's never the kinda hook-up to which one hopes to end up tied; especially long term - I didn't know callback weren't just for comedy... And interviews. . . Oh, golly, I have to find out ... SO MUCH!!

kjk commented 2 years ago

Do other programs scroll differently with mouse vs. touchpad scrolling?

You seem to be requesting smooth scrolling which has already been requested in https://github.com/sumatrapdfreader/sumatrapdf/issues/606

If we had smooth scrolling, it would be always enabled.

I think this mouse vs. touchpad is just a red herring.

zycsss commented 2 years ago

Do other programs scroll differently with mouse vs. touchpad scrolling?

You seem to be requesting smooth scrolling which has already been requested in #606

If we had smooth scrolling, it would be always enabled.

I think this mouse vs. touchpad is just a red herring.

Several applications that I used provides seperate touchpad and mouse scroll. When I'm using mouse wheel, the application scrolls exactly the lines I set in the windows setting. But when I'm using touchpad, the experience is the same as when you scrolling up and down in a phone as I mentioned before. And yes, it's the second time I mentioned this issue. Perhaps there was some comprehension probelms. What I wanted to say is using seperate scrolling mechanism for touchpad and mouse wheel.

yoSachinkr commented 2 years ago

I think this blog may be of some use to improve scrolling in sumatra pdf https://blogs.windows.com/msedgedev/2020/04/02/scrolling-personality-improvements/#:~:text=In%20previous%20releases,looks%20and%20feel.

GitHubRulesOK commented 2 years ago

@yoSachinkr In my current win11 which as before has no middle touchpad button but does have smooth one finger touch pad hold and scroll (two fingers often takes several tries to trigger in Edge, and often my fingers accidentally invoke pinch zoom in either) it is as smooth in SumatraPDF as in windows Edge/Chrome

However its a pain in the fingers as one finger grab hold and scroll, so I keep scrolling via a mouse.

Its more refined I can change speed from slower than centipedes crawl to smooth cheetah speed just by a light nudge.

expikr commented 1 year ago

It seems that even with v3.4's smoothscroll enabled, the scroll steps are still being accumulated to a threshold then fired like a normal scrollwheel, rather than reacting to the individual counts accordingly like firefox

yoSachinkr commented 1 year ago

Can Sumatra have scrolling behavior just like Microsoft Edge has?

GitHubRulesOK commented 1 year ago

@yoSachinkr generally no app will behave same as another Lets take your example of Edge at this device / point in time if I use mouse Wheel to scroll this Edge discussion, it Jumps up and down one apparent inch, that is not "smooth" but SumatraPDF (opened alongside), behaves roughly the same so its Windows mouse driver jumps that much per click as its a digital device. say 26 to 46 =20 points, If I zoom in then SumatraPDF appears to jump only half a line 44 to 49 = 5 points, thus the difference is how the units vary at zoom as much as any other means of screen scaling.

If I use Auto scrolling both apps will scroll at the same smooth rate. so its the hardware driver needs to vary per click per window.

balthild commented 9 months ago

I'd like to explain it by referring the scrolling behavior on mobile devices - the view instantly (says, as fast as the screen's refresh rate) reflects the movement of your finger, no matter how much the distance or velocity is.

For reference, Okular has this desired behavior. Also, I have made an interactive example to show the difference between the disired behavior and the current behavior of SumatraPDF: https://jsfiddle.net/balthild/h75qtorv/