Skip to content

Add a pan-or-zoom contact drag and the barrel press while touching - #5

Merged
FacuM merged 1 commit into
mainfrom
feat/pan-zoom
Oct 25, 2026
Merged

FacuM merged 1 commit into
mainfrom
feat/pan-zoom

Conversation

@FacuM

@FacuM FacuM commented Oct 25, 2026

Copy link
Copy Markdown
Collaborator

Summary

The new pan_zoom contact-drag action classifies the drag once it passes the slop: a mostly vertical drag (within about 27 degrees of vertical) zooms with whole wheel notches, pen up zooms in. Any other drag holds the pan combination (Space by default) and pans from the touch point. The mode stays until the lift.

With Pan or PanZoom as the contact drag, pressing the barrel while the tip is already down ends the stroke and continues as if the tip had touched with the barrel held, instead of forwarding the barrel raw.

Changes

  • ezd-input: new ButtonAction::PanZoom (contact drag only), direction classification in the gesture state machine, and the barrel-press-while-touching handoff for Pan and PanZoom.
  • Android: "Pan or zoom" option in the Hold + drag touching settings in all locales (en, es, fr, pt, it, de); the pan shortcut editor is shown for it.
  • Docs: docs/input.md describes both behaviours.

Scope notes

  • Only the contact drag gets PanZoom; hover drag is unchanged.
  • Other button configurations still forward a barrel press made while touching as before.

Testing

  • cargo fmt and cargo clippy -D warnings clean.
  • cargo test --workspace: 591 passed.
  • Android assembleFullDebug, lintFullDebug and testFullDebugUnitTest pass.
  • Tested on a Samsung tablet with the S Pen against the Windows host in a drawing app: a vertical drag zooms, other drags pan, and a barrel press mid-stroke works.

Closes: none (no linked issue)

The new `pan_zoom` contact-drag action classifies the drag once it passes the slop: a mostly vertical drag (within about 27 degrees of vertical) zooms with whole wheel notches, pen up zooms in. Any other drag holds the pan combination (Space by default) and pans from the touch point. The mode stays until the lift.

With Pan or PanZoom as the contact drag, pressing the barrel while the tip is already down ends the stroke and continues as if the tip had touched with the barrel held, instead of forwarding the barrel raw.

The Android settings offer "Pan or zoom" in every locale, the pan shortcut editor is shown for it, and docs/input.md describes both behaviours.
@FacuM
FacuM merged commit 9f0d227 into main Oct 25, 2026
10 checks passed
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