Skip to content

fix(pointing): emit scaled smooth scrolling values#3383

Open
te9no wants to merge 1 commit into
zmkfirmware:mainfrom
te9no:codex/fix-smooth-scroll-scaling
Open

fix(pointing): emit scaled smooth scrolling values#3383
te9no wants to merge 1 commit into
zmkfirmware:mainfrom
te9no:codex/fix-smooth-scroll-scaling

Conversation

@te9no

@te9no te9no commented Jun 8, 2026

Copy link
Copy Markdown

What changed

apply_resolution_scaling() now emits the scaled wheel value instead of the unscaled accumulated value.

Bug fixed

When CONFIG_ZMK_POINTING_SMOOTH_SCROLLING is enabled, the input listener computes a scaled wheel value and stores the remaining fractional part in remainder. Before this change, the function calculated scaled but assigned evt->value = val, so the accumulated unscaled value was emitted. This made scaling ineffective and allowed leftover remainder to affect later wheel events.

Local testing

  • git diff --check passed.
  • app/run-test.sh tests/pointing/mouse-scroll passed in a clean upstream ZMK workspace initialized from this PR branch with Zephyr v4.1.0+zmk-fixes.
  • app/run-test.sh tests/pointing passed in the same clean upstream ZMK workspace.
  • Hardware reproduction was observed on a split pointing-device build where enabling smooth scrolling caused right-side trackball scroll output to continue/repeat unexpectedly. Removing smooth scrolling avoided the issue; this one-line fix addresses the underlying scaling bug.

Requested testing

Additional testing with real hosts that negotiate HID resolution multipliers would be helpful.

@te9no te9no marked this pull request as ready for review June 8, 2026 02:17
@te9no te9no requested a review from a team as a code owner June 8, 2026 02:17
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant