fix(apple): stop the macOS beep on every keystroke while streaming
ci / rust (push) Has been cancelled

GCKeyboard reads the HID state directly, so the key NSEvents kept traveling the
responder chain unhandled — and an unhandled keyDown makes NSWindow play the
"invalid input" sound on every keystroke. InputCapture now installs a local event
monitor for its lifetime that swallows key events, except ⌘-combos, which still
reach the local app (the HUD's ⌘D disconnect, ⌘Q) in addition to the host.

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
This commit is contained in:
2026-06-10 22:03:56 +02:00
parent 0494e0200a
commit acf44eed5f
2 changed files with 20 additions and 2 deletions
+5 -2
View File
@@ -145,8 +145,11 @@ signing, bundle id `io.unom.punktfunk`. Notes:
nothing sticks down host-side. While the stream has focus the LOCAL cursor is hidden
and frozen mid-view (`CursorCapture` in StreamView.swift — the host renders its own
cursor; the local one diverges from it and a stray click would focus another app);
Cmd+Tab frees it, ⌘D disconnects. Local shortcuts (⌘-anything) still also reach the
host; a capture toggle is a small follow-up. One live capture per process (the GC
Cmd+Tab frees it, ⌘D disconnects. While captured, key NSEvents are swallowed by a
local event monitor (GC reads HID directly; without it every keystroke bubbles up the
responder chain unhandled and NSWindow beeps) — except ⌘-combos, which still reach
the local app (⌘D/⌘Q) in addition to the host; a capture toggle is a small
follow-up. One live capture per process (the GC
mouse/keyboard singletons have a single handler slot — ownership is tracked so a stale
capture's stop() can't clobber a newer one).
9. **iOS**: same package (`BUILD_IOS=1` for the xcframework slice); `StreamView` needs the