Fix chattering Cherry MX switches in Xubuntu


I own one mechanical keyboard: a cheap ThermalTake eSports Poseidon something-or-other with blue backlighting and blue switches. For the price it's a pretty awesome keyboard, except for one fatal issue (and I might have favored the slightly-more-expensive Cooler Master keyboard had I known about this): most of the keys have a tendency to trigger twice.

After extensive Googling, I found that this is generally called "chattering" switches, and is a semi-common problem among mechanical keyboards.

After more Googling, I found that while many Linux users have experienced this issue, and there are software fixes for Windows, there is no well-documented software fix for Linux.

The Concept

The basic software logic to fix this issue is "if the key is pressed twice within less than x milliseconds, ignore the second press." Pretty simple, right?


This feature is usually included with your operating system as an accessibility feature, aimed at people who suffer from hand tremors. Luckily, it also helps those of us who suffer from bad keyboard engineering. It's called "Bounce Keys" in Ubuntu, and can be accessed in your "System Settings" app under "Accessibility."

However, the problem with setting it in the typical place is that the minimum value is 50ms. For me, this was just high enough that when I legitimately pressed a key rapidly (particularly backspace) it caused most of my keypresses to be ignored.

The solution is to use Xubuntu's "Settings Editor" app.

The app is vaguely reminiscent of Windows' Registry Editor, and it allows you to set raw values for tons of system settings. If you enter the accessibility tab, you get these options, all off by default:

First, enable the BounceKeys boolean by checking the box under "Value" for BounceKeys.

Next, set the Delay integer value to whatever you want. I'm still tinkering with mine, but somewhere between 30 and 60 seems to be the best range. In the end, my settings looked like this:

In my experience, this does not totally eliminate the problem, but it comes darn close. The problem resurfaces only occasionally, infrequently enough that I subconsciously correct it without even noticing.

I think the lesson here for me is that mechanical keyboards are expensive for a reason. However, this fix works well enough that I think I'll continue using this keyboard. I hope this post helps you!