ah- / anne-key

Firmware for Anne Pro Keyboard written in Rust
Apache License 2.0
567 stars 32 forks source link

Frequent key repetition while typing #58

Closed kpdb closed 6 years ago

kpdb commented 6 years ago

During typing every few keys, one key is repeated. Repetition occurs shortly after key press (less than 500ms?), but usually I'm able to type one more letter before the "ghost" one appears. As for now, I couldn't find any regularity in repeated key type (happens to alphas as well as mods) or time between repetitions.

Possible cause is that my Anne Pro is customized with Kailh Pro Purple switches, but on the other hand I verified that there are no repetitions on original firmware (v1.40).

kpdb commented 6 years ago

I'm investigating this issue myself but created it in case someone comes quicker with an idea how to solve it or even where to start looking ;)

MvEerd commented 6 years ago

You may be experiencing key chatter or contact bouncing;

You can read about it and find an application to test for it on the following page; https://elitekeyboards.com/switchhitter.php

Using this firmware with the stock Gateron Brown switches I have not experienced any issues so far, but have seen others mention it This firmware currently has a short wait in there https://github.com/ah-/anne-key/blob/b4f44243199698256239e1273cb4f7ba72cc5bb7/src/keymatrix.rs#L63-L67 But there has been discussion on the discord of this not being enough, which might be the case for your switches

martijnvandijk commented 6 years ago

I experience this on the stock firmware when the bluetooth connection stutters. You might want to consider that too.

kpdb commented 6 years ago

Thanks guys! I experimented a bit with wait_until_tick but didn't come up to any satisfying solution. May be that I've go really shitty switches, but o the other hand they works without any problems on v1.40 so there is hope ;). Anyway, I'm gonna close this issue, learn more Rust and, with a bit of luck, come up with working debouncing algorithm :).