Skip to content

Show visible feedback while auto-scroll is active#14

Open
damiangonzalez wants to merge 3 commits into
fromis-9:mainfrom
damiangonzalez:fix/autoscroll-active-feedback
Open

Show visible feedback while auto-scroll is active#14
damiangonzalez wants to merge 3 commits into
fromis-9:mainfrom
damiangonzalez:fix/autoscroll-active-feedback

Conversation

@damiangonzalez

@damiangonzalez damiangonzalez commented Jul 5, 2026

Copy link
Copy Markdown

Problem

When auto-scroll is activated there is no visible indication that the mode is on. The app calls NSCursor.hide() / scrollCursor?.set(), but a background menu bar app cannot change the pointer over other apps' windows, so the custom cursor never actually appears. Users activate auto-scroll (especially via middle click or utilities like MiddleClick that synthesize middle clicks on trackpads) and have no way to tell whether the mode is active except by moving the mouse and seeing whether the page scrolls.

Change

Adds visual feedback for every activation path (middle click and variants, trackpad Option+scroll, and the menu bar toggle), all cleared when auto-scroll stops. Two commits, one file (ScrollappApp.swift), no behavior changes otherwise:

  • On-screen anchor indicator - a small click-through overlay panel showing a blue arrow.up.and.down.circle.fill symbol at the activation point, similar to the Windows auto-scroll origin marker. It ignores mouse events, floats above other windows, and joins all Spaces.
  • Menu bar active state - the status item switches to the filled symbol with a green tint while active, and back when inactive.
  • Menu item label - "Start/Stop Auto-Scroll" reads "Stop Auto-Scroll" while active.
  • "Show Activation Indicator" menu toggle - lets users turn the on-screen anchor off (on by default). Persisted in UserDefaults following the same pattern as "Invert Scrolling Direction"; takes effect immediately, including mid-session.

The existing trackpad-mode notification is left unchanged.

Testing

Manual (the repo has no committed Xcode project or runnable test target, so no automated tests could be added):

  • Built from source (swiftc, macOS 26.5, arm64) and ran on a MacBook Pro trackpad using MiddleClick (4-finger tap synthesizes middle click).
  • Verified on activation: anchor appears exactly at the click point above other apps' windows, menu bar icon turns green/filled, scrolling works as before.
  • Verified on exit (click elsewhere or toggle again): anchor disappears, menu bar icon reverts, menu label reverts.
  • Verified repeated activate/deactivate cycles do not leak panels (the panel is closed and released each stop, and re-activation replaces any existing panel).
  • Verified the "Show Activation Indicator" toggle: unchecking hides the anchor (menu bar state and scrolling unaffected), toggling while auto-scroll is active shows/hides the anchor immediately, and the preference persists across app restarts.

Notes

  • NSPanel with .nonactivatingPanel avoids stealing focus from the frontmost app.
  • isReleasedWhenClosed = false prevents over-release since the panel is owned by the strong property.

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