Implement macOS input forwarding #7

Merged
erik merged 6 commits from erik/task-1c7684cb-macos-input-forwarding into main 2026-07-17 11:07:22 -05:00 AGit
Owner

Adds permission-aware Core Graphics capture, fixed-edge handoff, TCP protocol sending, HID and media mappings, local suppression, held-state release, emergency return, menu status integration, and routing tests. Task: task-1c7684cb

Adds permission-aware Core Graphics capture, fixed-edge handoff, TCP protocol sending, HID and media mappings, local suppression, held-state release, emergency return, menu status integration, and routing tests. Task: task-1c7684cb
feat: forward macOS input to Linux
All checks were successful
CI / Rust build, lint, and test (pull_request) Successful in 11s
CI / Swift build, lint, and test (pull_request) Successful in 14s
349fd03898
Task: #task-1c7684cb
Author
Owner

Review summary

The PR adds permission-aware Core Graphics capture, Mac input routing, TCP protocol sending, HID/media mappings, local suppression, held-state cleanup, menu status integration, and emergency return.

Acceptance criteria

  • Supported input is encoded and sent while Linux has control — met — routing tests cover keyboard, pointer, thumb button, motion, and scroll messages; the live app connected to erik-dev:24800 and completed a Linux handoff.
  • Forwarded input is suppressed on macOS — met — event-tap decisions return nil for routed and unsupported keyboard/mouse events while Linux owns control; routing tests verify suppression decisions.
  • The emergency shortcut always restores Mac control — met — Control-Option-Escape remains local, emits release/handoff messages, and restored the live test from Linux to Mac control.
  • Edge crossing and held-input release match the specification — met — the fixed push threshold, cursor parking, source-side synthetic releases, ignored physical releases, release-all, and handoff ordering are implemented and tested.

Blocking issues

  • None.

Warnings

  • None.

Verification

  • Local make check and make pre-pr: passed.
  • Live Mac/receiver connection, right-edge handoff, and emergency return: passed.
  • Forgejo CI run #16: Rust and Swift jobs passed.

Verdict

Approved.

### Review summary The PR adds permission-aware Core Graphics capture, Mac input routing, TCP protocol sending, HID/media mappings, local suppression, held-state cleanup, menu status integration, and emergency return. ### Acceptance criteria - [x] **Supported input is encoded and sent while Linux has control** — met — routing tests cover keyboard, pointer, thumb button, motion, and scroll messages; the live app connected to `erik-dev:24800` and completed a Linux handoff. - [x] **Forwarded input is suppressed on macOS** — met — event-tap decisions return `nil` for routed and unsupported keyboard/mouse events while Linux owns control; routing tests verify suppression decisions. - [x] **The emergency shortcut always restores Mac control** — met — Control-Option-Escape remains local, emits release/handoff messages, and restored the live test from Linux to Mac control. - [x] **Edge crossing and held-input release match the specification** — met — the fixed push threshold, cursor parking, source-side synthetic releases, ignored physical releases, release-all, and handoff ordering are implemented and tested. ### Blocking issues - None. ### Warnings - None. ### Verification - Local `make check` and `make pre-pr`: passed. - Live Mac/receiver connection, right-edge handoff, and emergency return: passed. - Forgejo CI run #16: Rust and Swift jobs passed. ### Verdict Approved.
fix: route receiver traffic over Ethernet
All checks were successful
CI / Rust build, lint, and test (pull_request) Successful in 11s
CI / Swift build, lint, and test (pull_request) Successful in 14s
e96a1f4efa
Task: #task-1c7684cb
fix: freeze Mac cursor during remote control
All checks were successful
CI / Rust build, lint, and test (pull_request) Successful in 11s
CI / Swift build, lint, and test (pull_request) Successful in 14s
029d13c5f0
Task: #task-1c7684cb
fix: hide Mac cursor during remote control
All checks were successful
CI / Rust build, lint, and test (pull_request) Successful in 13s
CI / Swift build, lint, and test (pull_request) Successful in 14s
930ce228cc
Task: #task-1c7684cb
This reverts commit 930ce228cc.
Revert "fix: freeze Mac cursor during remote control"
All checks were successful
CI / Rust build, lint, and test (pull_request) Successful in 11s
CI / Swift build, lint, and test (pull_request) Successful in 13s
5e6a440aeb
This reverts commit 029d13c5f0.
Author
Owner

Review summary

The updated PR retains the working macOS forwarding implementation, adds Ethernet-only receiver routing, and removes ineffective cursor-disassociation/hiding workarounds.

Acceptance criteria

  • Supported input is encoded and sent while Linux has control — met — routing tests and live receiver testing cover the forwarding path.
  • Forwarded input is suppressed on macOS — met — the event tap suppresses routed keyboard and mouse events while Linux owns control.
  • The emergency shortcut always restores Mac control — met — Control-Option-Escape restored Mac control during live testing.
  • Edge crossing and held-input release match the specification — met — threshold, handoff ordering, source release, and ignored physical release behavior are tested.

Blocking issues

  • None.

Warnings

  • The Mac cursor does not remain stationary after handoff. The user accepted deferring this non-blocking behavior to low-priority bug task-79d5a943.

Verification

  • Local make check and make pre-pr: passed.
  • Forgejo CI run #22: Rust and Swift jobs passed.
  • Live Ethernet connection, right-edge handoff, input forwarding, and emergency return: passed.

Verdict

Warnings; merge may proceed with the explicitly accepted cursor bug deferred to task-79d5a943.

### Review summary The updated PR retains the working macOS forwarding implementation, adds Ethernet-only receiver routing, and removes ineffective cursor-disassociation/hiding workarounds. ### Acceptance criteria - [x] **Supported input is encoded and sent while Linux has control** — met — routing tests and live receiver testing cover the forwarding path. - [x] **Forwarded input is suppressed on macOS** — met — the event tap suppresses routed keyboard and mouse events while Linux owns control. - [x] **The emergency shortcut always restores Mac control** — met — Control-Option-Escape restored Mac control during live testing. - [x] **Edge crossing and held-input release match the specification** — met — threshold, handoff ordering, source release, and ignored physical release behavior are tested. ### Blocking issues - None. ### Warnings - The Mac cursor does not remain stationary after handoff. The user accepted deferring this non-blocking behavior to low-priority bug `task-79d5a943`. ### Verification - Local `make check` and `make pre-pr`: passed. - Forgejo CI run #22: Rust and Swift jobs passed. - Live Ethernet connection, right-edge handoff, input forwarding, and emergency return: passed. ### Verdict Warnings; merge may proceed with the explicitly accepted cursor bug deferred to `task-79d5a943`.
erik merged commit c99ccce12b into main 2026-07-17 11:07:22 -05:00
Sign in to join this conversation.
No reviewers
No labels
No milestone
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set.

Reference
erik/kvshare!7
No description provided.