Skip to content

fix(track): follow the caret when typing right after a click (#328) - #336

Merged
Maxaubert merged 4 commits into
mainfrom
fix/328-caret-tracking
Oct 3, 2026
Merged

Maxaubert merged 4 commits into
mainfrom
fix/328-caret-tracking

Conversation

@Maxaubert

@Maxaubert Maxaubert commented Oct 3, 2026 •

Copy link
Copy Markdown
Owner

Closes #328. Version 0.21.3.

The caret was not followed while typing right after a click (Notepad: about 40 characters typed before the view moved). The 1 s click quiet period, meant to keep a click from yanking the view, also swallowed the typing that follows a click.

  • src/view_target.h: new keyAfterButton input. A key pressed after the last mouse button means typing, so the click quiet period ends early: (msSinceButton >= kClickQuietMs || keyAfterButton) && msSinceKey <= kKeyDrivenMs.
  • src/main.cpp: sets keyAfterButton from the last key-down and last button stamps.
  • tests/test_view_target.cpp: two tests (typing after a click follows at once; a click with no key still waits).
  • trackLog=1 diagnostics (hidden key, default 0): logs every caret/focus event with the gate inputs and every tracking enable change. Kept for the still unreproduced Discord jump-to-end report; no cost when off.

Gates: build.bat test pass, build.bat builds Wind.exe. Field: deployed to this machine since 2026-10-03 for hands-on testing; merged on Max's go-ahead. Unsigned (no SignPath enrollment yet).

🤖 Generated with Claude Code

https://claude.ai/code/session_01KPUNAWcwghXdHCApcKKjSG

Maxaubert and others added 4 commits October 2, 2026 22:48
Clicking into Notepad and typing at once lost the first ~8 characters: they fell inside the 1 s
quiet period after a mouse button, so the view stayed on the pointer while the caret was off screen.
The click's own caret move is still consumed; any key pressed after the click now counts as typing.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01KPUNAWcwghXdHCApcKKjSG
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01KPUNAWcwghXdHCApcKKjSG
@Maxaubert
Maxaubert merged commit a9b654c into main Oct 3, 2026
1 check passed
@Maxaubert
Maxaubert deleted the fix/328-caret-tracking branch October 3, 2026 02:25
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.

Caret tracking: typing right after a click is ignored; Discord jumps to the end

1 participant