qmk-firmware-ploopyco-dev icon indicating copy to clipboard operation
qmk-firmware-ploopyco-dev copied to clipboard

Rework scroll-wheel

Open jasom opened this issue 3 years ago • 0 comments

I was frustrated with the scroll-wheel squirrellyness, so I dug in and reworked it.

Note there is a tunable SCROLL_WHEEL_HYSTERESIS; higher values reduce the sensitivity of the scroll wheel. Setting it to 2 (what is in the PR) seems pretty solid on My Machine, but 3 would be more conservative.

The new code is pretty simple, it just requires a net SCROLL_WHEEL_HYSTERESIS number of transitions in either direction to trigger a scroll-wheel event. Also, unlike the previous code, it will set the state even when there is a "jump" of two states (though such jumps do not count as a transition for determining when an event happens).

One possible change might be to put SCROLL_WHEEL_HYSTERESIS somewhere that Via can configure; I'm not at all familiar with QMK, so I just hard-coded it for now.

jasom avatar Mar 24 '22 03:03 jasom