Skip to content
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

Crazy behaviour with rollover/ghosting #70

Open
columna1 opened this issue May 10, 2023 · 6 comments
Open

Crazy behaviour with rollover/ghosting #70

columna1 opened this issue May 10, 2023 · 6 comments
Labels
bug Something isn't working

Comments

@columna1
Copy link

columna1 commented May 10, 2023

Using this HID remapper I sometimes get really weird key repeats and such when typing. I have done some research and have come to the conclusion that this likely has to do with ghosting/rollover sending all 0x01 bytes in the keycode report when there is an error state. This likely causes prev_input_state to be overwritten with all 0x01 or something similar making hid-remapper think the keys are no longer pressed. Then, when the keyboard comes out of error state and sends the rest of the keys currently pressed hid-remapper thinks that all of those keys are pressed sends them all again a second time.
this results in things like in colemak the "oul" keys when pressed on a cheap hp keyboard gives an error state. (; I and U keys in qwerty) leading to things like typing "could" resulting in "cououllud" or something similar. I would assume we want to ignore packets that have that error state or at least prevent updating the keyboard state when one is received.
I am able to reproduce this when using a proper 6-key rollover keyboard and pressing more than 6 keys.

@jfedor2
Copy link
Owner

jfedor2 commented May 11, 2023

Good catch!

@jfedor2 jfedor2 added the bug Something isn't working label May 11, 2023
@columna1
Copy link
Author

columna1 commented Nov 22, 2023

I just want to clarify, on some keyboards this can occur when pressing as little as 3 keys at once, it's not just a 6kRO (only) bug. That's why it was an issue with my cheap company provided keyboard at work. I was hitting this when typing normally.

@jfedor2
Copy link
Owner

jfedor2 commented Nov 22, 2023

I haven't forgotten about this!

@jfedor2
Copy link
Owner

jfedor2 commented Nov 23, 2023

If you still have access to that keyboard and are up for some testing, you can try a test build from here (the artifact link at the bottom):

https://github.com/jfedor2/hid-remapper/actions/runs/6973886250

I'm not sure if it's necessarily the solution I want to go with, but it's one possible solution.

@columna1
Copy link
Author

Sorry for the delay. I've managed to test the firmware you provided and it works great.

@jfedor2
Copy link
Owner

jfedor2 commented Jan 10, 2024

The latest official release also contains a (different) fix for this!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

2 participants