Google Groups no longer supports new Usenet posts or subscriptions. Historical content remains viewable.
Dismiss

Computer mouse switch debouncing

120 views
Skip to first unread message

John Doe

unread,
May 11, 2019, 3:27:38 AM5/11/19
to
I have put together many different switch types (conventional, light,
touch). I recall using some logic chip (4000 series) hysteresis for
debouncing.

Some mouse users complain about double-clicking when it should be single
clicking. So I'm looking around for information. One guy says Logitech
told him to remove the batteries and then click the buttons 30 times.
That would be for resetting software? Does that mean the debouncing
takes place in software? If that makes sense... Do they use software
debouncing to save money?

This is noncritical. Any general comments about the subject appreciated.

Thanks.

Piglet

unread,
May 11, 2019, 3:41:14 AM5/11/19
to
Multiple clicking mouse switches is a sign on wear-out. The contacts
have become dirty, corroded, lost their noble metal plating, developed
excessive bounce etc etc.

The Logitech advice had nothing to do with resetting software - it was
to help exercise the contacts and attempt to clean them up.

The microswitches typically used are rated for one million operations
and that can be reached after a few years usage.

Yes, debounce is done in software.

piglet

John Doe

unread,
May 11, 2019, 4:00:44 AM5/11/19
to
Piglet <erichp...@hotmail.com> wrote:

> The Logitech advice had nothing to do with resetting software - it was
> to help exercise the contacts and attempt to clean them up.

But seriously...
Obviously the contacts do not need exercise. And that clicking would be
the same as usual.

Piglet

unread,
May 11, 2019, 4:19:35 AM5/11/19
to
Have you ever "fixed" a crackly volume control by swinging the slider
from end-stop to end-stop rapidly a few times?

piglet

DecadentLinux...@decadence.org

unread,
May 11, 2019, 8:08:56 AM5/11/19
to
John Doe <alway...@message.header> wrote in
news:qb5th6$l0u$1...@dont-email.me:

> Some mouse users complain about double-clicking when it should be
> single clicking. So I'm looking around for information. One guy
> says Logitech told him to remove the batteries and then click the
> buttons 30 times.

After thousands of cycles, the switch contacts get impinged on by
their brothers and start to fail. We press mouse switches with our
finger rather lightly. IF you take a disconnected or unhooked or
bettery removed mouse and do this keypress operation, you should
also press on that switch slightly harder than you do in use. What
you are doing is burninshing the contacts against each other.

There is no debounce on logi mice, at least not the old ones. I
have had several that would multi-count keypresses. And not do so
if the keypress is more firm.

It may be that the driver 'sees' the noisey key and has no
circuitry to filter that and sends two presses to the OS.

I doubt much debounce at all, since gamers do not like any form of
latency.

DecadentLinux...@decadence.org

unread,
May 11, 2019, 8:12:47 AM5/11/19
to
Piglet <erichp...@hotmail.com> wrote in
news:qb60ii$7bn$1...@dont-email.me:
Rub-a-dub-dub. Definitely the switch.

Keeping old mice around, especially if you are brand loyal or
model loyal even (I always buy a ball mouse) can help as you can use
virtually unused "right mouse button" switches (or center)to replace
old, worn left mouse buttons.

John Larkin

unread,
May 11, 2019, 11:01:19 AM5/11/19
to
Sure they debounce in software. The battery/click thing probably
forces a uP reset which may help semehow.


--

John Larkin Highland Technology, Inc

lunatic fringe electronics

Jeff Liebermann

unread,
May 11, 2019, 11:19:17 AM5/11/19
to
On Sat, 11 May 2019 07:27:35 -0000 (UTC), John Doe
<alway...@message.header> wrote:

>This is noncritical. Any general comments about the subject appreciated.

Probably the mouse switch. They wear out fairly easily. I see the
problem often and simply replace the switch. They can be found in the
usual places for about 10 pcs for $5 or 100 pcs for $15.
<https://www.ebay.com/sch/i.html?_nkw=mouse+switch>
Too bad nobody uses a hall effect, optical, or other no-metal-contact
type push button switch that doesn't wear out.

Sometimes, I see Windoze machines where someone has played with the
mouse settings in the control panel. If temporarily replacing the
bouncing mouse with a known good mouse does the same thing, then
checking the settings might be a good idea. I've also seen problems
with loose and intermittent USB connectors which tend to make the
mouse move to parts unknown, usually to the opposite side of the
screen. Wiggle the connector to see if that's a problem. There are
also expensive mice designed for gamers with built in repeat
circuitry. This feature is handy to keep from wearing out the mouse
button switches, but tends to be glitchy if set too fast and the
computah becomes busy running the game.


--
Jeff Liebermann je...@cruzio.com
150 Felker St #D http://www.LearnByDestroying.com
Santa Cruz CA 95060 http://802.11junk.com
Skype: JeffLiebermann AE6KS 831-336-2558

---
This email has been checked for viruses by Avast antivirus software.
https://www.avast.com/antivirus

Rick C

unread,
May 11, 2019, 2:33:42 PM5/11/19
to
On Saturday, May 11, 2019 at 8:08:56 AM UTC-4, DecadentLinux...@decadence.org wrote:
> John Doe <alway...@message.header> wrote in
> news:qb5th6$l0u$1...@dont-email.me:
>
> > Some mouse users complain about double-clicking when it should be
> > single clicking. So I'm looking around for information. One guy
> > says Logitech told him to remove the batteries and then click the
> > buttons 30 times.
>
> After thousands of cycles, the switch contacts get impinged on by
> their brothers and start to fail. We press mouse switches with our
> finger rather lightly. IF you take a disconnected or unhooked or
> bettery removed mouse and do this keypress operation, you should
> also press on that switch slightly harder than you do in use. What
> you are doing is burninshing the contacts against each other.
>
> There is no debounce on logi mice, at least not the old ones. I
> have had several that would multi-count keypresses. And not do so
> if the keypress is more firm.
>
> It may be that the driver 'sees' the noisey key and has no
> circuitry to filter that and sends two presses to the OS.
>
> I doubt much debounce at all, since gamers do not like any form of
> latency.

Debounce does not require latency.

--

Rick C.

- Get a 1,000 miles of free Supercharging
- Tesla referral code - https://ts.la/richard11209

Jasen Betts

unread,
May 11, 2019, 4:31:09 PM5/11/19
to
On 2019-05-11, John Doe <alway...@message.header> wrote:
> I have put together many different switch types (conventional, light,
> touch). I recall using some logic chip (4000 series) hysteresis for
> debouncing.
>
> Some mouse users complain about double-clicking when it should be single
> clicking. So I'm looking around for information. One guy says Logitech
> told him to remove the batteries and then click the buttons 30 times.
> That would be for resetting software?

Cleaning the contacts in the switches. the cause is going to be dirt
in the switch or bad solder on the pcb

> Does that mean the debouncing takes place in software?

no

> If that makes sense... Do they use software debouncing to save money?

absolutely

--
When I tried casting out nines I made a hash of it.

Jeff Liebermann

unread,
May 11, 2019, 6:25:53 PM5/11/19
to
On Sat, 11 May 2019 08:19:16 -0700, Jeff Liebermann <je...@cruzio.com>
wrote:
(...)

Here's a potential band-aid.

Buggy-Mouse.ahk - Fix a buggy mouse. Stop it from double-clicking
when you try to single-click.
<https://jslover.net/AutoHotkey/Scripts/Buggy-Mouse>
<https://jslover.net/AutoHotkey/Scripts/Buggy-Mouse.exe>
<https://jslover.net/AutoHotkey/Scripts/Buggy-Mouse.ahk>

I ran the .exe version on my Windoze XP machine. I planted an icon in
the system tray. However, I couldn't figure out a way to test it or
to understand the debug output, so I don't know if it really works.

Ah, got it.
- Right click on the "H" icon in the system tray.
- Check "Debug"
- Uncheck "Debug (only blocked)
Click any mouse button. A box full of debug gobblygook will appear.
If you click any mouse button normally, it will just show which button
was clicked. However, if you rapidly tap any button, it will show a
button blocked message in the box. Right clicking on the "H" icon in
the system tray will show a counter after the "Clicks Blocked" showing
how many clicks were eaten by the program.

Kinda looks like this program might be sufficient to save you the
$0.15 for a replacement mouse switch.

DecadentLinux...@decadence.org

unread,
May 11, 2019, 10:40:27 PM5/11/19
to
Rick C <gnuarm.del...@gmail.com> wrote in
news:dc90c19e-d43d-4c19...@googlegroups.com:
Dip ass. Debouncing introduces it. Sheesh, WTFU.

Rick C

unread,
May 11, 2019, 11:08:30 PM5/11/19
to
Sorry, it doesn't. If you would like to learn, apologize for calling me a name. Then I'll be happy to explain to you how to debounce without latency.

Or remain ignorant.

--

Rick C.

+ Get a 1,000 miles of free Supercharging
+ Tesla referral code - https://ts.la/richard11209

jurb...@gmail.com

unread,
May 11, 2019, 11:34:20 PM5/11/19
to
Just put a fucking 0.068uF across it.

DecadentLinux...@decadence.org

unread,
May 12, 2019, 1:17:43 AM5/12/19
to
Rick C <gnuarm.del...@gmail.com> wrote in
news:3e899534-986e-44f3...@googlegroups.com:
I was counting switch events before you even knew what they were.

Not interested in your 'explanations'.

John Doe

unread,
May 12, 2019, 2:13:58 AM5/12/19
to
I don't see how latency is introduced. The signal would be relayed
instantly. Any follow-up signal within X amount of time is
disregarded. Sounds simple enough. How else would it be done via
software?


--

DecadentLinux...@decadence.org

unread,
May 12, 2019, 6:25:28 AM5/12/19
to
John Doe <alway...@message.header> wrote in news:qb8dj1$2jo$2@dont-
email.me:

> I don't see how latency is introduced. The signal would be relayed
> instantly. Any follow-up signal within X amount of time is
> disregarded. Sounds simple enough. How else would it be done via
> software?
>
The fact that the driver has to process it and determine if
additional noise is additional button presses or just noise and then
pass the decision on.

How can you say that does not take time?

Lasse Langwadt Christensen

unread,
May 12, 2019, 11:18:13 AM5/12/19
to
instant reaction and a blanking period

DecadentLinux...@decadence.org

unread,
May 12, 2019, 11:19:56 AM5/12/19
to
Lasse Langwadt Christensen <lang...@fonz.dk> wrote in news:278151af-
c160-4f34-95c...@googlegroups.com:

> instant reaction and a blanking period
>

Oh I am sure that will make the gamers happy. How many missed
presses per hundred... hint: one is too many.

gray_wolf

unread,
May 13, 2019, 12:17:45 AM5/13/19
to
I have a wireless mouse, Logic Tech or similar the right and left button's
actions have become reversed. Has anyone seen such a thing? It's not
a PC problem as another mouse works fine.
Thanks

John Doe

unread,
May 13, 2019, 12:48:35 AM5/13/19
to
gray_wolf <g_wolf@howling_mad.com> wrote:

> John Doe wrote:

>> I have put together many different switch types (conventional,
>> light, touch). I recall using some logic chip (4000 series)
>> hysteresis for debouncing.
>>
>> Some mouse users complain about double-clicking when it should be
>> single clicking. So I'm looking around for information. One guy
>> says Logitech told him to remove the batteries and then click the
>> buttons 30 times. That would be for resetting software? Does that
>> mean the debouncing takes place in software? If that makes
>> sense... Do they use software debouncing to save money?
>>
>> This is noncritical. Any general comments about the subject
>> appreciated.

> I have a wireless mouse, Logic Tech or similar the right and left
> button's actions have become reversed. Has anyone seen such a
> thing? It's not a PC problem as another mouse works fine.

I believe it's a Windows setting for all mice. Just look in mouse
properties... Control Panel > Mouse > Buttons. Make sure the box is
unchecked.

Rick C

unread,
May 13, 2019, 1:42:54 AM5/13/19
to
Is the other mouse the same brand and model? They all use different drivers for the special features.

I turn off the touch pad on my laptop so I don't get palm swipes. It turns itself back on from time to time. Go figure.

--

Rick C.

-- Get a 1,000 miles of free Supercharging
-- Tesla referral code - https://ts.la/richard11209

Rick C

unread,
May 13, 2019, 1:46:25 AM5/13/19
to
I like the fact that you have explained to him how debounce could work without any perceptible latency and he is backpedaling saying debouncing at all would lose button presses. That's why I wouldn't explain it to him until he apologized. I knew he wouldn't apologize and even if I did tell him he wouldn't understand/believe even such a simple concept. The guy is really amazing.

--

Rick C.

-+ Get a 1,000 miles of free Supercharging
-+ Tesla referral code - https://ts.la/richard11209

DecadentLinux...@decadence.org

unread,
May 13, 2019, 6:56:04 AM5/13/19
to
Rick C <gnuarm.del...@gmail.com> wrote in news:b0ca0815-9941-
455c-8ed3-8...@googlegroups.com:

> The guy is really amazing.

You are truly fucked in the head.

Backpedal that you retarded fuck.

Jeff Liebermann

unread,
May 13, 2019, 10:35:09 AM5/13/19
to
On Sun, 12 May 2019 23:17:40 -0500, gray_wolf <g_wolf@howling_mad.com>
wrote:

>I have a wireless mouse, Logic Tech or similar the right and left button's
>actions have become reversed. Has anyone seen such a thing? It's not
>a PC problem as another mouse works fine.
>Thanks

You have your mouse settings in the Windoze Control Panel set to "left
handed" mouse.
<http://www.bbc.co.uk/accessibility/guides/mouse_easier/left_handed/win/win7/index.shtml>
There may also be a similar setting under "Accessibility" features.

Or, you could learn to use a mouse with your left hand, which might be
useful in the future.

mako...@yahoo.com

unread,
May 13, 2019, 12:42:03 PM5/13/19
to
On Saturday, May 11, 2019 at 11:34:20 PM UTC-4, jurb...@gmail.com wrote:
> Just put a xxxxxx 0.068uF across it.

+1

Yes, I have used a 0.005uF.

It does work.

The small spark keeps the contacts clean.

m

John Doe

unread,
May 13, 2019, 8:40:53 PM5/13/19
to
mako...@yahoo.com wrote:

> Yes, I have used a 0.005uF [across the mouse button contacts].
>
> It does work.
>
> The small spark keeps the contacts clean.

And it's cheap, and easy.

Maybe I will try that someday if I wear it out.
0 new messages