Add smoothdrag for smooth mouse-drag panning capture#82
Merged
Conversation
drag: writes its press, all interpolated motion events, and release at one instant, so apps that re-render on motion coalesce the burst and a recording captures a 2-3 frame jump instead of the smooth pan seen interactively. smoothdrag:c1:r1:c2:r2[:stepMs] expands into a press, one motion event per cell spaced stepMs apart (default 40ms ~= 25fps), and a release, so the app redraws each intermediate position. The player now honors a per-action Delay on Write actions (used for the stepped motions) instead of always applying the global keystroke delay. Fixes #81. Co-Authored-By: Claude Opus 4.8 (1M context) <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.
Fixes #81.
drag:emits its press, all interpolated motion events, and release at one instant, so apps that re-render on motion (e.g. a sixel preview that pans by re-cropping) coalesce the burst and a recording captures a 2-3 frame jump instead of the smooth pan seen interactively.smoothdrag:c1:r1:c2:r2[:stepMs]expands into a press, one motion event per cell spacedstepMsapart (default 40ms ~= 25fps), and a release, so the app redraws each intermediate position. The player now honors a per-actionDelayon Write actions (used for the stepped motions) instead of always applying the global keystroke delay.Covered by unit tests; full keystroke suite + vet green.