Repository navigation
Read the wheel and pointer lock in Pointer, and rename Touch.track to Touch.actions - #64
Merged
Merged
Conversation
… Touch.actions The wheel reports its scroll (wheel) and pulses wheelUp/Down/Left/Right buttons once per notch, so stepping actions bind it. movement reports raw motion, and the lock option locks the pointer on a click (not reported as a press) with locked turning false on Escape. Timelines record all three. Touch.track, Touch.Touch, and TrackOptions become Touch.actions, Touch.Actions, and ActionsOptions, like every other device. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Why
These are the three items deferred from #63:
Touch.trackwas the only device not built asX.actions.What
Wheel
wheelis how far the wheel scrolled since the previous snapshot, in CSS px; lines and pages are converted.wheelUp/wheelDown/wheelLeft/wheelRightare bindable buttons. They pulse (pressed and released in one window) once perPointer.wheelStep(100 px). Small trackpad scrolls add up toward a pulse, and the count starts over when the direction turns.preventScroll(defaulttrue) keeps the page from scrolling over the element.Mouse look
movementis the raw motion since the previous snapshot, locked or not.lock: documentlocks the pointer on a click. The module requests the lock in its own listener, because browsers only grant it inside a click, and that click is not reported as a press.lockedturnsfalseon Escape, which also releases any held buttons.Timelines record and replay
wheel,movementandlocked.press/releasetakePhysicalButtons only, because wheel pulses come fromwheel.Touch (breaking):
Touch.track→Touch.actions,Touch.Touch→Touch.Actions,TrackOptions→ActionsOptions. The website demo and the unreleased #62 changeset are updated.Checks
pnpm run check(639 tests)pnpm --dir website typecheckandbuild(snippets compile)movement, unlocking releases held buttons, listener cleanup;documentaccepted as hosts.🤖 Generated with Claude Code