Hello everyone, I have a question that's bothering me. So I have a friend whose mouse scroll wheel just broke, but not mechanically, it's just went crazy - scrolling by itself without any input. I wrote a simple c++/batch program, which asks you if you wanna disable scroll button by modifying values in registry:
Unfortunately, it works only in some applications e.g. chrome. Like when he opens Adobe Premiere or any additional software, the scroll actually is not disabled - it keeps scrolling by itself randomly up and down. Yeah, I know that's not a problem to buy a new mouse, but I'm just curious if there's any other way around it. And I found a piece of software called X-Mouse Button Control (written in C/C++ I guess), which actually have an option to disable scrolling permanently but it only works while program is running. I tried to reverse its binary in IDA although couldn't find actual function used to disable scrolling in whole system, not just couple of Windows apps.
So I thought I'd ask, maybe you have some ideas if there are possibilities in C++ to make it disabled in whole Windows (within any application running)? I guess if someone did it via this software, X-Mouse Button Control, it's probably possible but I haven't found anything yet. Anyway, any help is much appreciated and I'm looking forward to your replies, thanks!
There are at least two better ways to solve this. Go through the mouse settings, either on the mouse software if it has it, or the driver settings for the mouse (ELAN/Synaptic).
Another solution would be to open up the mouse and simply remove whatever is in there constantly making the mouse send a scroll signal. Most mice will have the screw either in the battery compartment or under a sticker of some sort.
Also, those registry keys won't disable the actual scroll wheel. All it does is disable Windows from using that input. So other programs (as you've seen), which take in the input themselves and don't rely on Windows to interpret it for them will still get the signal. EX: If you set the scroll wheel to skip a whole page at a time, Chrome will respond to that because Windows is a middle man. Something like Adobe Premiere won't care since Windows isn't regulating how it uses the scroll wheel input.
Edit: I'm not sure, but it's possible the program you talk about just runs something in the background that checks for the scroll wheel input and simply tosses away that input.
if you were being paid to code or fix this, the payment for the time invested and aggravation would by a half dozen mice.
that said, windows *everyone once in a very rare while* will read a non-mouse as a mouse from a usb port and the cursor/buttons/etc goes haywire. Did he plug anything new into his box? Unplug every usb thing, put back mouse only, check that ... if it is still messed up, go hit up wallyworld.
@zapshe and @jonnin make all the important points.
I thought I'd chime in with these notions, but they're not suggestions. They're warnings. This isn't something you'd want to do.
First, in theory, you can create an operating system hook. I haven't done this in a while, and I don't believe Windows 10 likes this (I think I read Microsoft was eventually going to kill this option).
However, the idea is to "hook" into the message pump at he OS level (there were/are functions for installing hooks). This is a "proposed" program (and bad idea) that stays active, intercepting message traffic and altering (or disposing of) it. It worked to good enough effect in older Windows versions, but I've not done it since XP or maybe Windows 7 (I don't recall).
The other idea, a winding road to be sure, is to write a device driver to replace the default windows driver or any specific mouse driver in use. Like the hook, you could "re-interpret" whatever you like, but the detail is mind bending. If you've ever written device drivers, you know it's not exactly light work.
Of course, with the driver approach, Windows just loves to replace drivers automatically to keep things "up to date", which won't help.
If hooks have been deprecated, that won't work, or at least will eventually not work, and was always a source of mischief (keystroke logging spyware).
On another front, I've had mice go nuts like this, to discover it was actually small, short, fine cat hair inside the mechanism. When it wiggles around the sensors think that's motion.
In one case I had an electronic issue on a "beloved" mouse my wife just would not let go of (she's an architect, and they get really particular). I managed to scavenge parts from another mouse to resurrect it for a few years.
I've had mice go nuts like this, to discover it was actually small, short, fine cat hair inside the mechanism.
I use a track-ball, and the "pins" that hold the ball in place while allowing it to be turned easily by hand get "gooped" up with use. It gets harder to swivel the track-ball, etc.
Occasionally I pop the ball out, and the mouse goes "nuts." The pointer scrolls all over the place, sometimes a get a right-click pop-up menu as well.
De-muck the pins, pop the ball back in, and the mouse is back to normal.
I've had electronics that run the track-ball start acting weird, it happened twice in 15 years with 3 PCs. The cost of a new device is low enough that I get a replacement as soon as possible. While using a cheap mouse as a temp substitute until I can get a new track-ball.