Are there any high-resolution mouse wheels?

57 views
Skip to first unread message

Neil Hodgson

unread,
Sep 24, 2022, 7:59:46 AM9/24/22
to Scintilla mailing list
On Win32, Scintilla's mouse wheel code is being worked on to support horizontal scrolling. There is support in the current code for high-resolution mouse wheels that could produce finer control but that don't seem to have ever been constructed. The supporting code would become even more complex if there had to be multiple accumulators for horizontal and vertical scroll wheels as well as interpreting the main (vertical) scroll wheel with shift as horizontal scrolling.

Has anyone ever used a mouse wheel that reports movement values that are not a multiple of WHEEL_DELTA (120)?

Without an example to justify this code, it would be better removed. If there ever are high-resolution mouse wheels (and its been more than 20 years since this code was written) then the code could be restored.

Raymond Chen (2013) on high-resolution wheels:
"I don’t know if anybody has developed such a mouse"
https://devblogs.microsoft.com/oldnewthing/20130123-00/?p=5473

Neil


Neil Hodgson

unread,
Sep 26, 2022, 6:50:46 PM9/26/22
to Scintilla mailing list
> Has anyone ever used a mouse wheel that reports movement values that are not a multiple of WHEEL_DELTA (120)?

It seems there are no real mouse wheels that do this but the mechanism has been used with other devices like ThinkPad TrackPoints or maybe touchpads. Drivers for these devices may send a stream of smaller increments.

tpmiddle-rs may implement partial wheel motion - I don't have a ThinkPad to check.
https://github.com/foriequal0/tpmiddle-rs

So, the wheel accumulation code will remain and be extended for horizontal scrolling.

Neil

Stefan Küng

unread,
Oct 5, 2022, 3:03:13 PM10/5/22
to scintilla-interest
Since many (most?) applications don't handle the WM_MOUSEHWEEL message properly, MS decided to leave the delta at 120 so those apps don't break.
Apps can however opt-in to receive wheel messages with less than 120 by adding a manifest:
there's also the even more advanced
not sure what the difference is between those two though.

And there are quite a few mouse types available that do this, for example the logitech MX3.


Neil Hodgson

unread,
Oct 5, 2022, 5:33:25 PM10/5/22
to Scintilla mailing list
Stefan Küng:

> https://learn.microsoft.com/en-us/windows/win32/sbscs/application-manifests#ultrahighresolutionscrollingaware
> not sure what the difference is between those two though.
>
> And there are quite a few mouse types available that do this, for example the logitech MX3.

Thanks, I'll have to pick up one of those.

Here is something about the above settings with precision trackpad devices:
https://learn.microsoft.com/en-us/windows/compatibility/precision-touchpad-devices

The Scintilla implementation should probably change to not wait for a full WHEEL_DELTA to scroll SPI_GETWHEELSCROLLLINES but to allow scrolling by individual lines at WHEEL_DELTA / SPI_GETWHEELSCROLLLINES. That would allow smoother scrolling.

Neil

Stefan Küng

unread,
Jan 13, 2023, 1:10:24 PM1/13/23
to scintilla-interest
So I did some testing.
Both my Logitech mice do NOT respect the manifest setting and always return a delta of +-120. However if "smooth scrolling" is enabled, the mice can provide smaller deltas. But (a big, big but): only apps that Logitech has approved get the smaller deltas. All other apps still get the default 120 sized delta.
You can test this by having a browser (e.g. edge or chrome) with focus set to it, then your own app on the side. When you now scroll over your own app (browser still needs to have focus!) then your app will get the smaller scroll deltas.
Another way to trick the logitech drivers is to rename your app to chrome.exe or firefox.exe - if your app starts with that exe name then it will get the smaller delta.

To test that this really is a logitech problem I also tried with the Microsoft surface mouse: with this mouse you get the scroll deltas as expected, you don't even have to activate something like "smooth scrolling" first. Ok, the surface mouse doesn't really have a scroll "wheel", it's more like a touchpad when scrolling. But anyway...


Neil Hodgson

unread,
Jan 17, 2023, 11:04:17 PM1/17/23
to Scintilla mailing list
Stefan Küng:

> only apps that Logitech has approved get the smaller deltas. All other apps still get the default 120 sized delta.

That is unfortunate. Likely due to some apps behaving poorly with the smaller deltas although the manifest check should avoid that.

> … I also tried with the Microsoft surface mouse: with this mouse you get the scroll deltas as expected, you don't even have to activate something like "smooth scrolling" first. Ok, the surface mouse doesn't really have a scroll "wheel", it's more like a touchpad when scrolling. But anyway...

Some of the interest in this is for touchpads and similar.
https://sourceforge.net/p/scintilla/feature-requests/1472/

Neil

Reply all
Reply to author
Forward
0 new messages