De-bounce butterfly keyboard double keypress with Karabiner-Elements

Grrr, to no one’s surprise, my MacBook Pro with butterfly keyboard is experiencing keyboard issues. In my case, a keypress on “j” is often triggered twice, resulting in “jj”. And with the lockdowns, I don’t want to risk a repair! So, here is a quick workaround using Karabiner-Elements v12.9.0.

In a previous post, I describe using a Karabiner-Elements’ custom Complex Modification to map my physical ~ key to Escape. So, only had to add another Complex Modification rule to “de-bounce” my stuck key:

Open up Karabiner-Elements Preferences, under the Misc tab, hit Open config folder (~/.config/karabiner).

Using a text editor of your choice (I use Visual Studio Code), edit the file karabiner.json.

If you are facing similar issues on a different key, simply change the key_code above. Note that the key will lose long press accented / alternate characters. You know the popup like below. Fortunately, this doesn’t apply to the j key anyway, and in any case, I don’t use accented characters.

Compared to the Stack Exchange post, I enabled repeat, but if that doesn’t work for you, set it to false - you will loose repeat keys in Apps that don’t support accented characters (like Terminal). However, I do face a tiny quirk - after holding the key down for a while, when I release the key, I get the one more character added. I don’t encounter this scenario enough for it to bother me.

Finally, I don’t know if the Complex Modification will impact games, or behaviour of other Apps. Good luck.