-
Notifications
You must be signed in to change notification settings - Fork 18
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Cancelling double letters, even when they are separated #9
Comments
Hi @CarlosRuiz-globalqss. That's a good point. Unfortunately, in my experience, being smart with keystrokes, especially when it comes to taking into accout speed or duration, usually backfires somewhere. Here, we have to be smart by necessity, and it will never work perfectly. You could check the last key, sure. The issue is that, when typing fast, you can likely type the next letter in-between chatters, and the chatter will get through. As a fast typer, your presses likely overlap, so it's hard to say what's going on. In any case, if you want to try it, it should be easy. KeyboardChatteringFix-Linux/src/filtering.py Lines 57 to 58 in 2e610af
Here, add _last_key_code = None
Then here, change the condition to if prev is None or now - prev > threshold * 1E3 or _last_key_code != event.code:
And after this line, add _last_key_code = event.code This should work, you can try it for yourself and report if there are any issues. Also, you could try playing with the threshold value if you are typing very fast. |
Firstly I must say that I am a very fast typist.
So, the program is cancelling double letters when I type too fast.
For example "cancelling" turns out as "canceling", and "letters" turns out as "leters".
But that's understandable, if my second typing happens faster than the threshold.
The problem that I think it can be preventable is that the second letter is also cancelled even when is separated by another keystroke.
For example "even" becomes "evn", or "the elder" turns out as "the lder".
I don't know much about python to solve it myself, but I guess it can be something like, on every keystroke if the previous keystroke is different then cancel the threshold.
The text was updated successfully, but these errors were encountered: