Skip to content

feat(connect): Windows capture/input backend for Crabfleet Connect - #107

Merged
steipete merged 3 commits into
mainfrom
claude/track-r
Jul 18, 2026
Merged

feat(connect): Windows capture/input backend for Crabfleet Connect#107
steipete merged 3 commits into
mainfrom
claude/track-r

Conversation

@steipete

Copy link
Copy Markdown
Contributor

Summary

Completes the Crabfleet Connect cross-platform pair — adds a Windows capture/input backend to the shared Go host core (Linux landed in #101). Foundation, same honesty bar as Linux: compiles and cross-builds; real-hardware capture/input is not validated (no Windows box available).

  • internal/connect/windows.go (behind //go:build windows): pure-Go via syscall.NewLazyDLL against user32/gdi32 — no new dependency. GDI BitBlt primary-display capture (synchronized read, top-down DIB → RGBA, full-frame dirty rect). SendInput for absolute pointer, buttons, vertical/horizontal wheel, and keyboard.
  • Keymap: named keys via VK codes, printable text via Unicode injection, Ctrl/Alt/Win shortcuts through the active Windows layout; AltGr, legacy X11 keysyms, and surrogate pairs handled. The keysym→VK table is in a non-tagged file so it's unit-tested on any OS.
  • platform_windows.go selects the backend on Windows; synthetic fallback elsewhere. cmd/crabfleet-connect and READMEs updated.
  • No wire-protocol change; the existing Capturer/InputSink contracts are unchanged, so the Windows host speaks the same RFB the macOS/web clients already decode.

Deferred (documented)

DXGI Desktop Duplication, multi-monitor, per-monitor DPI, service packaging, and real-hardware validation.

Proof

  • go build/go vet/go test ./...: 170 pass (incl. OS-independent keymap tests)
  • Cross-compile: windows/amd64 and windows/arm64 → valid PE32+
  • pnpm test 969/969 (no TS touched); autoreview clean

@steipete
steipete merged commit 1d75e71 into main Jul 18, 2026
2 checks passed
@steipete
steipete deleted the claude/track-r branch July 18, 2026 15:33
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