lan-mouse/input-emulation
Jon Kinney 5f74233f57 feat(clipboard): vendor primitives + protocol from #327
Phase 1 of the per-pair clipboard sync feature: lift the primitives
from feschber/lan-mouse#327 verbatim and wrap them in a wire format
that pre-bakes the originator fingerprint needed for N-peer loop
prevention later in the rollout.

- arboard dependency on input-capture and input-emulation
- input-capture::ClipboardMonitor (500ms poll, 200ms debounce)
- input-emulation::ClipboardEmulation (blocking-task wrapper)
- input_event::ClipboardEvent + Event::Clipboard variant; Event drops
  Copy so the new String payload compiles
- lan-mouse-proto::ProtoEvent::Clipboard { from_fingerprint, content }
  encoded via variable-length encode_clipboard_event /
  decode_clipboard_event helpers (fixed-buffer codec panics for
  this variant). MAX_CLIPBOARD_SIZE caps total wire payload at 4 KiB
- InputEmulation intercepts Event::Clipboard in consume() and routes
  it to the cross-platform ClipboardEmulation sink, so per-backend
  emulations stay platform-mechanics-only
- Round-trip + over-size + truncated-decode unit tests for the new
  codec

No service wiring yet — ClipboardMonitor isn't instantiated and no
peer can transmit a ProtoEvent::Clipboard. Behavior change: zero.
Phase 2 wires capture, IPC, and per-pair Service routing.

Co-Authored-By: dnakov <3777433+dnakov@users.noreply.github.com>
Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
2026-05-07 10:46:26 -05:00
..
src feat(clipboard): vendor primitives + protocol from #327 2026-05-07 10:46:26 -05:00
Cargo.toml feat(clipboard): vendor primitives + protocol from #327 2026-05-07 10:46:26 -05:00