Skip to content

feat: volume-key page turning for e-ink + double-tap back#2185

Open
mjhfunctionalashtanga wants to merge 1 commit into
jocmp:mainfrom
mjhfunctionalashtanga:volume-key-paging
Open

feat: volume-key page turning for e-ink + double-tap back#2185
mjhfunctionalashtanga wants to merge 1 commit into
jocmp:mainfrom
mjhfunctionalashtanga:volume-key-paging

Conversation

@mjhfunctionalashtanga

Copy link
Copy Markdown

What

Adds an opt-in Volume keys turn pages gesture (Settings → Gestures → Reader), aimed at e-ink devices:

  • Volume-down pages the article forward ~90% of the viewport; volume-up pages back.
  • At a scroll edge it rolls to the next / previous article.
  • Double-tap volume-up = Back, dispatched through the normal back handler so it honors the existing back-action setting (close article / open drawer / navigate to parent).
  • Also pages the article list.
  • Yields to audio — while something is playing, the rocker still controls volume.
  • Off by default.

Why

On e-ink readers (Boox, etc.) the hardware volume rocker is the natural way to turn pages hands-free without touching the screen — screen taps/swipes cause ghosting, and physical page keys are a defining e-ink affordance (à la EinkBro). This is a frequently-requested pattern for reading apps on those devices.

How it's built

  • A small VolumeKeyPager singleton bridges MainActivity.dispatchKeyEvent (which consumes the volume keys only when the feature is active) to the reader/list scrollers registered from Compose.
  • Discrete-press + repeat-count guards mean holding to page never misfires, and only volume-up double-taps trigger Back, so paging forward is always safe.
  • Self-contained and independent of other features; ~230 lines, off by default.

Happy to adjust naming, the settings placement, the double-tap window, or gate it behind an "e-ink" section if you'd prefer.

🤖 Generated with Claude Code

Adds an opt-in "Volume keys turn pages" gesture (Settings → Gestures →
Reader). Volume-down pages the article forward by ~90% of the viewport,
volume-up pages back, and at a scroll edge it rolls to the next/previous
article. Double-tap volume-up dispatches Back, honoring the configured
back action (close article / open drawer / navigate to parent). Also
pages the article list. Yields to audio so the rocker still controls
volume during playback. Off by default.

On e-ink devices (Boox, etc.) hardware page keys are the natural way to
read hands-free without touching the screen and triggering ghosting.

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
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