Scroll Wheel Acceleration

x64 Replacement/Alternative to Microsoft's IntelliMouse application.
Forum rules
Please read the forum rules before posting for the first time.
The more information you can provide, the quicker and more accurately someone can help.
NOTE: To reduce spam, new users can not post links, files or images until they have at least 4 posts.
Post Reply
MouseBuck
New User
Posts: 4
Joined: Mon May 06, 2013 7:24 am

Scroll Wheel Acceleration

Post by MouseBuck »

The MS Intellimouse s/w allows for single line scrolling with the mouse wheel. It also has a setting for acceleration of the scroll when the mouse wheel is moved rapidly.

So on a long page I can scroll one line at a time, or by quickly moving the wheel I can scroll many lines at a time.

I have looked but I cannot find a similar setting in XMouse.
User avatar
phil
Site Admin
Posts: 7670
Joined: Sun Apr 06, 2003 11:12 pm

Re: Scroll Wheel Acceleration

Post by phil »

That's because there isn't a similar setting.
I dont think at the level XMBC works, I can reliably do acceleration because XMBC is intercepting windows messages and simulating input. To do acceleration properly I think it needs to be done before the windows mouse messages are sent, but I will have a think and see if I can come up with anything.

Thanks,
Phil
--[ Phil ]--
--[ Administrator & XMBC Author ]--
Logitech G9/G604/M720/MX518, Microsoft Intellimouse, Trust 16341 BT Mouse
Windows 10 x64, AMD Ryzen 5900x, MSI x570 Tomahawk, 32GB DDR4,
nVidia RTX 2070s, Evo 970 1Tb NVME, 2x2TB WD Black (RAID1)
MouseBuck
New User
Posts: 4
Joined: Mon May 06, 2013 7:24 am

Re: Scroll Wheel Acceleration

Post by MouseBuck »

You don't really need precision. Whether the page scrolls up 10 lines or 11 lines is irrelevant. I am just looking for a faster movement than one line at a time when I "spin" the mouse wheel.

For instance this page is 33 lines top to bottom if I click one line at a time. If I quickly move the mouse wheel, then I can get top to bottom with a single flick of my finger. The number of fast wheel clicks is about 5, yet the page scrolls 33 lines.

A slower "fast" movement takes about 11 clicks to go top to bottom.

Maybe you could save the time between clicks and use that as a basis for generating extra pseudo-clicks when the time goes down.
User avatar
phil
Site Admin
Posts: 7670
Joined: Sun Apr 06, 2003 11:12 pm

Re: Scroll Wheel Acceleration

Post by phil »

OK, An interesting solution.... Maybe it would work for some, but the problem is, generally I don't know you have spun the wheel until after I get x messages in y time.... At best this will introduce lag. With XMBC running at user level, you have no guarantee of the time taken before each message is delivered, it makes it rather difficult to do this sort of thing in XMBC!

The messages are timestamped so inserting one or two extra messages if the time is low might just work - I will try and have a look, but how would you suggest the scale works... Im thinking there might be problems with a lot of new (MS) mice where there is no click and the wheel free-spins, but I guess this will be an option that can be enabled/disabled if it does work.

What sort of scale are we thinking here.. I guess you want the number of messages inserted to increase the more you get too... could be possible, just a couple more globals hanging around in the hook :)

Thanks,
Phil
--[ Phil ]--
--[ Administrator & XMBC Author ]--
Logitech G9/G604/M720/MX518, Microsoft Intellimouse, Trust 16341 BT Mouse
Windows 10 x64, AMD Ryzen 5900x, MSI x570 Tomahawk, 32GB DDR4,
nVidia RTX 2070s, Evo 970 1Tb NVME, 2x2TB WD Black (RAID1)
MouseBuck
New User
Posts: 4
Joined: Mon May 06, 2013 7:24 am

Re: Scroll Wheel Acceleration

Post by MouseBuck »

In the MS mouse driver there is an incremental slide bar to choose the acceleration factor, so I would think that there is some sort of table which adds scroll wheel events. Somewhat like "if x events per interval insert an extra y events", with each amount hard coded. I have mine set to go plaid...

Or maybe just a multiplier modified by the scale. So at the low end of the scale
5 * 1, insert 5

At the high end
5 * 10, insert 50

with the scale running from 0 to 10 by 1, or 0 to 5 by .5, or ?

So you are hooking into the message queue, then adding/substituting event messages. Interesting. I guess because MS mouse is a driver that it gets "earlier" mouse events than you can. I do not seem to have any lag at all.
User avatar
phil
Site Admin
Posts: 7670
Joined: Sun Apr 06, 2003 11:12 pm

Re: Scroll Wheel Acceleration

Post by phil »

Yes, the MS (or other manufactures) driver works at a much lower level, which is why I still think it might not be so simple to do in XMBC.

As for the scaling, its not a simple "at lower end, insert 5" etc. because that wont accelerate, it will simply send 5 clicks for every one click. Its all got to be relational to the time between clicks and how many clicks we have previously seen - which makes it a whole bunch more complicated but should still be possible - we shall see when I get a chance to look at the code :)
--[ Phil ]--
--[ Administrator & XMBC Author ]--
Logitech G9/G604/M720/MX518, Microsoft Intellimouse, Trust 16341 BT Mouse
Windows 10 x64, AMD Ryzen 5900x, MSI x570 Tomahawk, 32GB DDR4,
nVidia RTX 2070s, Evo 970 1Tb NVME, 2x2TB WD Black (RAID1)
Post Reply