Hacking Your Mouse To Fix The Misclick Of Doom

Ever had your patience put on trial by glitchy mouse buttons? That is one problem that simply should never have been on any half-decent mice.

Do you remember mechanical mice? They either had a gummy or rough ball protruding through the bottom to transfer motion to rollers mechanically coupled to optical rotary position encoders. The ball would inevitably pick up all sorts of crud from your mousing surface, which would then cake up on rollers until they eventually got stuck and required cleaning.

Once the ball's gummy coating wore out or its grippy surface got polished off (which rarely took more than a year of intensive use), the ball no longer had enough friction to turn the encoders' rollers. The mechanical mouse became nearly unusable, regardless of how much you tried to clean it. This usually meant buying a new mouse long before anything else had a chance to fail. Optical tracking eliminated that major mechanical shortcoming, enabling mice to remain usable for a few years longer and reveal their next major service life limitation.

Have you ever had a drag-and-drop file or text selection mysteriously disappear or reset on you as you pulled the mouse pointer from one corner of a selection to the other? How about single clicks registering as doubles, performing actions you never intended? In productivity applications, this can result in accidental file transfers and other irritating outcomes. In games, it can trigger the wrong ability or interface action, such as prematurely releasing an arrow, shot or other hold-to-aim/charge ability. That sort of outcome is simply unacceptable in a competitive environment.

So what's the issue here? Switches. The humble switch is the only remaining mechanical component still used in modern mice if we overlook the cord. While most PC enthusiasts associate switches with electricity, they're still mechanical systems performing an electrical function, which makes them inherently susceptible to wear from friction where different components rub together and material fatigue where these components are under mechanical loads, both static and dynamic.

And even though switches may look ideal at macroscopic time scales, with a contact closing and opening, they're not so binary as seen from a digital circuit's point of view in millisecond and less time scales.

This combination of less than ideal mechanical and electrical contact properties are the reasons why debouncing (the process of filtering or processing switch inputs to hopefully eliminate mechanically-induced glitches) is necessary when interfacing switches to logic and micro-controllers. As switches age, their characteristics degrade to the point of exceeding the debouncing circuit or algorithm's parameters, letting glitches through with increasing frequency and severity.

MORE: All Mice Content
MORE: All Peripherals Content

MORE: Peripherals in the Forums

Create a new thread in the US Reviews comments forum about this subject
This thread is closed for comments
56 comments
    Your comment
  • Rheotome
    I'll never look at a Mouse the same way after reading this !!!
    5
  • SirGCal
    My problem with my MS is just finding a mouse I can use well period.I have some mice like this trackball myself and still can't use it properly. I need one controlled with the mind instead of hand. Which is probably coming sooner then we think.
    1
  • mrface
    This is a really cool article. Thanks for sharing.
    6
  • theaudiophile
    Holy shit, you're crazy in many many ways. I am an electronics hobbyist myself, and you sir are simply insane. I hope this article gets enough traffic and ad clicks to make up for the time you put in instead of replacing switches.
    9
  • mikesinner
    Both me and a friend of mine have already bought new mice, but I did keep the old one, a logitech G700 with the terribly annoying double click glitch when only single clicking. It's not a very old mouse either, so I find it very disturbing that the switch is already worn!
    1
  • Daniel Sauvageau
    Anonymous said:
    Holy shit, you're crazy in many many ways. I am an electronics hobbyist myself, and you sir are simply insane.

    You give me too much credit. This is a simple hack once you know what you are dealing with - finding out what you have to work with is usually the most tedious part of a modification job, especially when you don't have design schematics or someone else's instructions to start from.

    The hack might be more trouble than it is worth but it does show that there is no reason for mouse buttons with SPDT switches to glitch until the switch mechanically fails. Other than mice manufacturers choosing to design them this that way that is.

    Anonymous said:
    Both me and a friend of mine have already bought new mice, but I did keep the old one, a logitech G700 with the terribly annoying double click glitch when only single clicking. It's not a very old mouse either, so I find it very disturbing that the switch is already worn!

    My G500S is about four years old and the glitching is at that early stage where I'm not sure if the glitches are caused by the mouse or by mouse movement when I click.
    1
  • razor512
    Wouldn't it be easier to just use hall effect switches (like with some industrial machines)?

    The switches can be magnetically shielded, and as long as the button actuation functions (no broken springs), the button will continue to work, along with any vibrations of the actuation being calibrated out in software.
    1
  • buzzrattie
    Wish there were a mouse that was cat-hair proof. Dang little buggers shedding all the time, and getting into the laser.
    0
  • Daniel Sauvageau
    Anonymous said:
    Wouldn't it be easier to just use hall effect switches (like with some industrial machines)?

    The switches can be magnetically shielded, and as long as the button actuation functions (no broken springs), the button will continue to work, along with any vibrations of the actuation being calibrated out in software.

    I doubt switches that require additional calibration steps would be popular in a market where manufacturers are trying to optimize every penny of profit they think they can get away with out of their product.

    One option which does not require calibration is optical sensing: poke a slotted stem through the detector. Most mechanical mice used optical wheel encoders to convert ball motion to digital. The same thing could be done for switches.

    I doubt either option would be as inexpensive as a mechanical switch and with the "memory" version of my hack, it would be a practically free fix. Free is a tough price to beat.
    1
  • waltsmith
    I agree totally that the reason manufacturers don't already implement one of these fixes or possible even a better one is simply, as you said, that it would screw with their replacement cycle. This kind of "designed to fail shortly after the warranty expires" philosophy is an integral part of the modern "consumer economy". I'd warrant that purposeful design flaws such as this are present in almost every modern "mature" consumer product branch.
    3
  • 80-watt Hamster
    I was more excited than was probably appropriate when I saw they mouse you were modding. Been using a Trackman Marble+ (same thing with a wheel) since '98. I don't make my living at a computer, and don't use the Trackman much for games, so it probably hasn't had as hard a life as yours did. In any case, it's still going strong, and it's nice to see that repair is a viable option if it ever goes south. Great article, even if most of the electrical stuff went in one ear and out the other.
    0
  • Nuckles_56
    When I read the title, I was wondering if April Fools day had come early... But thank you for what turned out to be an excellent article
    0
  • spentshells
    Quote:
    My problem with my MS is just finding a mouse I can use well period.I have some mice like this trackball myself and still can't use it properly. I need one controlled with the mind instead of hand. Which is probably coming sooner then we think.


    I'll take one of those please.
    0
  • Tom1945
    Mice last for years and they're cheap. When they fail I simply buy another rather than waste my time fixing it.
    0
  • Xivilain
    This article, is why I like Tom's Hardware. Keep up the good work!
    5
  • video99
    I don't suppose we will move on from mechanical switches in this application since it provides the short stroke and click feedback all in one. An optical or Hall Effect switch would still need a mechanical click function, and that would still wear out.

    It would be nice to hear back from the likes of Logitech or Microsoft about why they appear not to have implemented a proper de-bounce circuit of this type and when they intend to do so!
    2
  • alidan
    if the mouse was guaranteed for life, and the laser was user replaceable with no hassle, id be willing to drop 400$ on the mouse. it would need a 12 pad on the thumb though.

    im so sick of mice wearing out, you finally found the perfect mouse, then 4-5 years later it dies, and you are on the hunt again because that model is no longer in production, and quality took a nose dive while you were away.
    3
  • Shankovich
    These kinds of articles are what brought me to Tom's in the first place. Love it!
    6
  • Spanky Deluxe
    Fantastic article, this kind of stuff is what originally brought me to Toms Hardware about two decades ago and I'm so glad to see such in depth technical detail again. I don't think I've ever seen a clearer example of planned obsolescence in action. Next time my mouse dies, I'll be sure to replace the switches; I hate adjusting to a new mouse!
    8