Debounce mechanical keyboard in OS X
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.


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