Hacker Newsnew | past | comments | ask | show | jobs | submitlogin
Show HN: KeyboardNotifier: Debug intermittent keyboard/input issues (github.com/jconley88)
1 point by jconley88 47 days ago | hide | past | favorite
Problem:

I was getting intermittent repeating characters on random keys after replacing my mechanical keyboard switches with Outemo switches (spoiler: they were not the issue). This was often outside of a text-input application, spamming Ubuntu, preventing input and causing freeze-like issues. In addition, I often didn't recognize it right away and could not reliably determine which recent modifier or other keys I had just been pressing. There was no physical indication on the keyboard to alert me either.

Solution:

I needed a way to clearly identify when a key was stuck so I could isolate other hardware components. I also needed to know which keys it was happening on to find out if it was a small set of bad switches or randomly any key.

I wasn't able to find an existing solution that 1. Monitored continuously 2. Checked for repeating keys rather than just single presses.

Implementation:

Built for Linux and tested on Ubuntu.

This runs as a simple bash script after the user configures their input device name. It can optionally be set up as a system daemon. (The README has comprehensive instructions)

The script: 1. Sets up an input stream from `evtest` 2. monitors for repeat events 3. Notifies and logs the key name when the configurable threshold is exceeded 4. ... and again if/when the same key gets unstuck

While the body of the script was designed specifically for my use case, ie repeat keys, the project is meant as a template that sets up monitoring and notifications/logging for physical inputs. You could change it to monitor other input streams, check for press down/release events, duplicate/bounce key strikes or limit the set of keys that's monitored.

Thanks!

I hope that somebody, somewhere finds this useful in some form, even if just as a reference!



Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: