-
Notifications
You must be signed in to change notification settings - Fork 119
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
Typing "zu" sometimes becomes "zuzu" #53
Comments
This does sound strange. My first thought is that this is some form of double-key-event generation that I've encountered on that keyboard: specifically if I pressed a certain key (and in my case it only happened on one key) on the side instead of in the middle, then it would generate an event both when pressed and when released - try playing around with pressing the z and u keys on the various sides and see if you can get a double event. Now, I would normally think that you would then get things like zzu, zuu, or even zzuu, not zuzu, but the latter is possible if z is pressed, u is pressed, then z released, and finally u released. Also, try setting the
and then show what events are reported when this happens. |
So, finally I managed to find a way to reproduce it. It's related to hitting the allowed maximum number of keys pressed in parallel. That limit seems to be dynamic, depending on which keys are pressed. E.g. for pressing Easiest way to reproduce:
Expected output: Attached is a debug log of pressing " |
The keyboard sends an all keys = 1 keyboard event when an overflow is detected, which we need to detect and ignore. This fixes #53.
Excellent debugging work! Thanks. Easy to reproduce now. So it looks like the solution is just to ignore these rollover-overflow keyboard messages. I just pushed an update to my fork - if you can try that out and confirm it fixes things, I'll send the pull request. Btw., while on the topic of key rollover, @cb22 you have a note in the README saying that key rollover does not work properly - can you elaborate? I'm not aware of any issues or missing functionality (especially with this issue here fixed). |
Thanks for the quick fix. 👍 It's already a significant improvement, but a small annoyance remains: With enabled key repeating its output isn't as expected. Pressing and holding |
Yeah, I was thinking about this too after my last update. The problem is this: disabling of autorepeat only happens on another key-event, and there is no clean way to signal this condition. The best I've been able to come up with is to send a dummy key down/up event for the |
I did a check what Apple does in this situation under macOS, because maybe they have some smart handling for that. Turns out: no, their behavior is exactly the same as with your patch. |
The keyboard sends an all keys = 1 keyboard event when an overflow is detected, which we need to detect and ignore. This fixes #53.
The keyboard sends an all keys = 1 keyboard event when an overflow is detected, which we need to detect and ignore. This fixes #53.
I've a very strange bug, I'm encountering pretty irregularly and I can't actively reproduce it, but it happens from time to time that when I type the German word "
zu
" instead "zuzu
" appears on the screen. I haven't encountered this problem with any other combination of characters so far.The text was updated successfully, but these errors were encountered: