Author Topic: Partial debounce failure on keyboard keys  (Read 660 times)

0 Members and 1 Guest are viewing this topic.

Offline e100Topic starter

  • Frequent Contributor
  • **
  • Posts: 566
Partial debounce failure on keyboard keys
« on: July 05, 2023, 01:02:00 am »
Several of the keys on my computer keyboard sometimes generate 2 key press events when pressed once.
Does anyone know how modern keyboards do their debouncing?
I assumed it would all be done inside the keyboard controller chip and therefore I don't understand why only some keys are affected and not all keys.
 

Offline RoGeorge

  • Super Contributor
  • ***
  • Posts: 6185
  • Country: ro
Re: Partial debounce failure on keyboard keys
« Reply #1 on: July 05, 2023, 06:52:05 am »
Yes, all debouncing and key codes generating are done on the keyboard side, not on the PC.

Try opening the keyboard and clean it, maybe some liquid was spilled.  Depending on the model, some keyboards have sheets of membrane contacts that can be peeled apart for cleaning.
« Last Edit: July 05, 2023, 09:23:45 am by RoGeorge »
 

Offline Bryn

  • Contributor
  • Posts: 39
  • Country: gb
Re: Partial debounce failure on keyboard keys
« Reply #2 on: July 05, 2023, 08:18:39 am »
I had a similar problem with my tablet keyboard, only that it affected the space bar only and most times when I press that it would do several key press events at the one time (even down to the space bar being stuck as a result). I simply threw it out though...

Should also say that the "i" key on my laptop keyboard would sometimes trigger two press events at once but strangely was during the early days I had this laptop and since then had used an external keyboard from my old computer - and still going strong 14 years since I first got it.
 

Offline SiliconWizard

  • Super Contributor
  • ***
  • Posts: 14445
  • Country: fr
Re: Partial debounce failure on keyboard keys
« Reply #3 on: July 05, 2023, 08:35:36 pm »
So yes, the debouncing is done in the keyboard's firmware.

If you suddenly get multiple key presses for one press, it basically means that the corresponding keys are bouncing for a longer time / slower than normal, which makes the integrated debouncing ineffective.

Reason is likely that the keys are either sticky (from accumulated dirt, liquid, etc) or just plain worn out - which would require a replacement.

You'll have to figure out if this is a membrane keyboard or a "mechanical" one. If this is a membrane keyboard and some basic cleaning doesn't help, unfortunately there's nothing much you'll be able to do except replacing the membrane (if you can even find a replacement.) Probably not worth the trouble compared to buying a new keyboard.
 

Offline thm_w

  • Super Contributor
  • ***
  • Posts: 6349
  • Country: ca
  • Non-expert
Re: Partial debounce failure on keyboard keys
« Reply #4 on: July 05, 2023, 09:27:44 pm »
What is the model number of the keyboard?
While debouncing is done in the kb as mentioned above, very high polling rates might make key bounce worse. So if it is a high end keyboard, maybe some small chance you could try adjusting that before cleaning it.

https://www.clickspeedtester.com/keyboard-latency-test/

mx red key switches (linear) seem to be worse than a blue or brown (tactile) for this.
Profile -> Modify profile -> Look and Layout ->  Don't show users' signatures
 

Offline sopheadave

  • Newbie
  • !
  • Posts: 1
  • Country: us
Re: Partial debounce failure on keyboard keys
« Reply #5 on: April 16, 2024, 08:30:42 pm »
The issue could be due to dirt or debris under the affected keys. Try gently cleaning the affected keys with compressed air or a keyboard cleaning tool for proper testing and fix.

Edit: spam link removed
« Last Edit: Yesterday at 06:29:10 pm by gnif »
 

Offline floobydust

  • Super Contributor
  • ***
  • Posts: 6958
  • Country: ca
Re: Partial debounce failure on keyboard keys
« Reply #6 on: April 16, 2024, 09:46:25 pm »
I've seen keyboard problems due to cracked solder joints to switches (Cherry style)- inspect the PC board for bad connections, to the MCU as well. Resolder the problem switches, or swap them with lesser used switches.
Food/hair inside membrane style switches can make them malfunction as well.

There are many different S/W debounce algorithms out there, some better than others. A small glitch can be ignored or taken as an entirely new key press event.
 

Online wraper

  • Supporter
  • ****
  • Posts: 16846
  • Country: lv
Re: Partial debounce failure on keyboard keys
« Reply #7 on: April 16, 2024, 10:07:01 pm »
Several of the keys on my computer keyboard sometimes generate 2 key press events when pressed once.
Does anyone know how modern keyboards do their debouncing?
They do it in their shitty broken MCU firmware that makes it fail either because they sacrifice proper debounce for response time or programmers don't know what they're doing in regards to how switches operate/bounce (I suspect both). At least from what I've seen on this forum people usually want to register button press only when contact totally settles which is quite lame considering that first appearance of conductivity (in most common normally open switch) means that for sure button is in pressed position, and the only thing you really need to debounce is button release (that it does not make a contact at all for a long enough time, as contact does not bounce in released position). Like really, if firmware is done well, you can make it work even if contacts never settle and make electrical connection only 1/5 of the time during the time button it pressed. As a bonus, for example, Logitech does not care about providing anywhere near to reasonable wetting current in their keyboards and mice. All combined with shitty switches which often do not even have a half-decent silver plating, not to say gold.
Quote
I assumed it would all be done inside the keyboard controller chip and therefore I don't understand why only some keys are affected and not all keys.
Because keys do not bounce equally.
« Last Edit: April 16, 2024, 10:41:04 pm by wraper »
 

Offline amc184

  • Regular Contributor
  • *
  • Posts: 126
  • Country: nz
Re: Partial debounce failure on keyboard keys
« Reply #8 on: Yesterday at 02:39:54 am »
I've had switches in mice where the failure mode was that the button would send out multiple impulses per click, which wasn't suppressed by the mouse's deboucing.  I think I replaced the main switches in the mouse twice before I retired it for a new one (it had rubber soft touch parts that were getting goey).  There was no other issues - no cracked solder joints, no contamination, just wear.

Of course these mouse switches were a bit different to a keyboard, I'm just saying that this could be down to wear and tear only.  Are the affected keys ones that see more use, say W, A, S and D if you're a gamer?
 


Share me

Digg  Facebook  SlashDot  Delicious  Technorati  Twitter  Google  Yahoo
Smf