[PR #198] [MERGED] Scroll acceleration for macOS #365

Closed
opened 2026-03-02 23:46:09 +03:00 by kerem · 0 comments
Owner

📋 Pull Request Information

Original PR: https://github.com/anomalyco/opentui/pull/198
Author: @remorses
Created: 10/3/2025
Status: Merged
Merged: 10/6/2025
Merged by: @kommander

Base: mainHead: scroll-acceleration


📝 Commits (8)

  • ed69372 example implementation done
  • c494c66 nicer scroll example
  • 6ece618 enable on mac
  • 4dbc353 better paramters
  • e4612d4 d(t) = v₀ * ( t + A * (exp(t/τ) - 1 - t/τ) ).
  • a0b8b07 format
  • 9c81551 add test. create interface for scroll accel
  • bb2c3ed Merge upstream/main into scroll-acceleration

📊 Changes

5 files changed (+251 additions, -15 deletions)

View changed files

📝 packages/core/src/lib/index.ts (+1 -0)
packages/core/src/lib/scroll-acceleration.ts (+97 -0)
📝 packages/core/src/renderables/ScrollBox.ts (+29 -4)
📝 packages/core/src/tests/scrollbox.test.ts (+49 -3)
📝 packages/react/examples/scroll.tsx (+75 -8)

📄 Description

This PR adds scroll acceleration, enabled by default for macOS

Without acceleration, notice that all scrolls are the about the same speed

https://github.com/user-attachments/assets/7913e603-ba37-416c-bb22-02ae629c2648

With acceleration, notice some scolls are faster, in those cases I moved the mouse wheel faster

https://github.com/user-attachments/assets/bb7f2b86-17fa-473d-bded-1d0cdee803c2


🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.

## 📋 Pull Request Information **Original PR:** https://github.com/anomalyco/opentui/pull/198 **Author:** [@remorses](https://github.com/remorses) **Created:** 10/3/2025 **Status:** ✅ Merged **Merged:** 10/6/2025 **Merged by:** [@kommander](https://github.com/kommander) **Base:** `main` ← **Head:** `scroll-acceleration` --- ### 📝 Commits (8) - [`ed69372`](https://github.com/anomalyco/opentui/commit/ed6937212719fd33a33f20e94205543fa50053f6) example implementation done - [`c494c66`](https://github.com/anomalyco/opentui/commit/c494c66aaf7b8799c108d8a88f84ac25a468d086) nicer scroll example - [`6ece618`](https://github.com/anomalyco/opentui/commit/6ece618ab69e7b86fa3a60dcdedfc30020b4d2f5) enable on mac - [`4dbc353`](https://github.com/anomalyco/opentui/commit/4dbc353aa23203be592f7f3fa04fda819bf25860) better paramters - [`e4612d4`](https://github.com/anomalyco/opentui/commit/e4612d40493748a154f4402a4c44dfd56dff3275) d(t) = v₀ * ( t + A * (exp(t/τ) - 1 - t/τ) ). - [`a0b8b07`](https://github.com/anomalyco/opentui/commit/a0b8b072b9613db23cce19770afb1507fcbe53f9) format - [`9c81551`](https://github.com/anomalyco/opentui/commit/9c8155100abea967b67f32d0f056b1696fd60304) add test. create interface for scroll accel - [`bb2c3ed`](https://github.com/anomalyco/opentui/commit/bb2c3ed60c0979994faf4b5a3fbd32671ee6025a) Merge upstream/main into scroll-acceleration ### 📊 Changes **5 files changed** (+251 additions, -15 deletions) <details> <summary>View changed files</summary> 📝 `packages/core/src/lib/index.ts` (+1 -0) ➕ `packages/core/src/lib/scroll-acceleration.ts` (+97 -0) 📝 `packages/core/src/renderables/ScrollBox.ts` (+29 -4) 📝 `packages/core/src/tests/scrollbox.test.ts` (+49 -3) 📝 `packages/react/examples/scroll.tsx` (+75 -8) </details> ### 📄 Description This PR adds scroll acceleration, enabled by default for macOS Without acceleration, notice that all scrolls are the about the same speed https://github.com/user-attachments/assets/7913e603-ba37-416c-bb22-02ae629c2648 With acceleration, notice some scolls are faster, in those cases I moved the mouse wheel faster https://github.com/user-attachments/assets/bb7f2b86-17fa-473d-bded-1d0cdee803c2 --- <sub>🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.</sub>
kerem 2026-03-02 23:46:09 +03:00
Sign in to join this conversation.
No milestone
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set.

Reference
starred/opentui#365
No description provided.