Skip to content

trackpad scroll precision#107

Merged
forketyfork merged 1 commit intomainfrom
fix/trackpad-scroll-precision
Jan 14, 2026
Merged

trackpad scroll precision#107
forketyfork merged 1 commit intomainfrom
fix/trackpad-scroll-precision

Conversation

@forketyfork
Copy link
Owner

Summary

  • Restore trackpad scroll sensitivity after SDL 3.4 migration by consuming wheel integer ticks.
  • Maintain scroll line scaling and inertia behavior; document trackpad scrolling support.

Solution

  • Use SDL MouseWheelEvent.integer_y (added in 3.2.12) to accumulate high-precision deltas and convert to line scrolls.
  • Apply lines-per-tick multiplier and sign flip for terminal scroll direction; fallback to float deltas when integer_y is zero.
  • Update README scrollback description to mention trackpad/high-precision gestures.

Prompt: Scrolling in terminals now has a very low sensitivity: when I scroll using my trackpad and do small movements up and down, they are completely ignored, I have to do a long gesture to actually trigger the scroll. Please investigate this. It was working fine recently, and I have a suspicion it might be related to migration of SDL from 3.2 to 3.4 so you might want to look into the changelog there.

Solution: - Consume SDL wheel integer_y ticks to accumulate high-precision trackpad deltas and convert to line scrolls
- Preserve lines-per-tick scaling and negative direction for terminal scrollback
- Document trackpad scrolling support in README to reflect the input change
@forketyfork forketyfork merged commit bcb2f18 into main Jan 14, 2026
7 checks passed
@forketyfork forketyfork deleted the fix/trackpad-scroll-precision branch January 14, 2026 08:54
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