Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Hi @CarlosRuiz-globalqss,
Firstly, thank you very much for this repository. It's a lifesaver for dealing with my chatty keyboard!
I have a specific situation where only some keys on my keyboard chatter (a lot, sometimes more than 150 ms between two key presses). As I am a relatively fast typer compared to that delay, setting a high global threshold slows me down and is quite annoying. On Windows, I use Keyboard Chatter Blocker which has a nice GUI for setting individual thresholds for each key, so I decided to implement something similar.
There is no GUI, but I added a YAML config where you can specify a threshold for each key. The only change needed in the code was really to replace the
int
threshold with adict
.By default, the program works as before. If the config file is not found, it uses the default threshold value (30 ms) or the one provided on the command line. If there is a config file, it will apply the thresholds for each specified key. Commented keys are ignored and use the default threshold specified in the file. I was struggling to find out the names of the keys, so I also added a function that can (optionally) create a template config file with the names of the available keys on a given keyboard. The usage is explained in the README.