Skip to content

Put the modifiers back, so unspooling repeats - #19

Merged
willkotheimer merged 1 commit into
mainfrom
repeat-unspool
Sep 11, 2026
Merged

willkotheimer merged 1 commit into
mainfrom
repeat-unspool

Conversation

@willkotheimer

Copy link
Copy Markdown
Owner

Unspooling worked once and then typed uuuu.

The cause was the previous fix

Releasing the held modifiers before synthesizing Ctrl+V fixed the paste and broke the gesture the feature exists for. Windows was left believing Win and Alt were up while the user was still physically holding them, so the next U arrived as a bare u and was typed into their document.

Waiting several seconds appeared to help, but only because the user let go and pressed again, which re-registered the modifiers. That is not a workaround anyone should accept — the whole point of the design is: hold Win+Alt, tap U as often as you like.

The fix

Every modifier that was down is pressed again after the paste, so the OS state matches the user's hands again.

Restoring Win then threatens a Start menu, because Windows opens it on a Win release with no other key in between — and a restored Win looks exactly like that. An unassigned virtual key sent straight afterwards marks the chord as used.

Measured

Win+Alt held down throughout, U tapped three separate times, against a real window:

start   : []
after U#1 : [? Where do you use GitHub? GitHub.com]
after U#2 : [...MSIX-ALPHA]
after U#3 : [...MSIX-ALPHAMSIX-BRAVO]
foreground after releasing Win+Alt: explorer

Three distinct clips, no stray characters, and the foreground unchanged on release — no Start menu.

369 tests, typecheck, lint, and the zero-network gate pass.

Known, not addressed here

Two tests in session.test.ts sit right at the 5s timeout and fail intermittently. The cause is real and measured: looksLikeSecret takes 147ms per 1 MiB clip, because the key-prefix and connection-keyword needles each walk the whole buffer separately. That is a user-visible hitch on large copies. The fix is a single pass checking every needle at each position — same detection semantics, no narrowing of what counts as a secret — and it belongs in its own change.

🤖 Generated with Claude Code

Releasing the held modifiers before synthesizing Ctrl+V fixed the paste and broke
the gesture the feature exists for. Windows was left believing Win and Alt were
up while the user was still physically holding them, so the next U arrived as a
bare u and was typed into their document: unspool worked once, then printed uuuu.
Waiting several seconds appeared to help only because the user let go and pressed
again, which re-registered the modifiers.

Every modifier that was down is now pressed again after the paste. Hold Win+Alt,
tap U as often as you like, and each tap serves and pastes the next clip.

Restoring Win threatens a Start menu, since Windows opens it on a Win release
with no other key in between and a restored Win looks exactly like that. An
unassigned virtual key sent straight afterwards marks the chord as used.

Measured against a real window with the modifiers held throughout: three taps,
three distinct clips, no stray characters, and the foreground unchanged after
release.

Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
@willkotheimer
willkotheimer merged commit 2bfaf65 into main Sep 11, 2026
2 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