3

My work has me back on a Mac. I am using my mechanical keyboard (USB, Cherry blue switches, not that that's important) with OS X. The problem though, is that I get relatively frequent "bouncing" or "chatter" of the keystrokes. For example, if I type hello something like heello might appear. This is rather annoying, especially when entering passwords.

Under Linux I could solve this in software by debouncing, using the xkbsetbouncekeysdelay setting, which adds a minimum number of milliseconds, e.g. 40ms, between key presses. Rather a blunt tool but solves the problem perfectly. However, I haven't been able to find an analogue under OS X.

Does anyone have any software based suggestions? Am I overlooking a simple plist setting somewhere?

  • Can system preferences/accessibility/keyboard/Slow Keys help? – Tom Gewecke Jul 22 '16 at 12:14
  • No, i'd prefer not to have to hold down each key for longer (i type relatively fast), i simply want to introduce a minimum time between acceptance of new physical presses of the same key (note that this different from the key repeat and key delay settings, because i have the impression that my keyboard is actually firing multiple spurious keypresses in a very short timeframe). Thanks though! – RogerTheDragon Jul 25 '16 at 0:41
  • Was therre ever a solution to this? I'm haviing terrible troubles with it at the moment – Shayne Sep 20 '17 at 6:43
5

I had actually forgotten about this, but a recent comment prompted me to post the solution I ended up going with. Since macOS does not provide a debouncing facility, I ended up writing my own [1]. It hooks into keypresses using a CGEventTap, and if the most recent keypress keycode is equal to the current one, with a timestamp more recent than ±30ms, it disregards it as a bounce.

I apologise for the rough and ready state of the tool, but compile it with the Makefile (you'll need XCode or Developer Tools or whatever they're called these days), and run it using sudo ./debounce (root permissions are necessary because it hooks into all keypresses). It works and has worked for me for the last year-ish, but use at your own risk, free of charge, free of warranty.

  1. https://github.com/toothbrush/debounce-mac/
0

Have you tried going to System Preferences->Keyboard and increasing "Delay Until Repeat"?

  • As mentioned in the comment above, my issue is separate from the key repeat delay. This value is in the order of a few hundred milliseconds, while the multiple keypresses (literally bouncing — this is the technical term for the phenomenon) are within about 30ms of each other, which is way too short to be caused by the software key repeat value you refer to. – RogerTheDragon Jul 25 '16 at 8:42

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .