The actual bug: inputMode:.none silently drops every pointer/key event

VNCConnection.Settings.inputMode looks like it configures keyboard-shortcut
forwarding on macOS, but in RoyalVNCKit's enqueue path it's a master gate:

    // VNCConnection+Queue.swift
    guard settings.inputMode != .none else { return }   // every path

So every PointerEvent and KeyEvent we enqueued was discarded before hitting
the wire. The Mac received zero input even though the framebuffer was live.
Frames streamed because that queue is server→client, not gated by inputMode.

Fix: pass .forwardKeyboardShortcutsEvenIfInUseLocally. On iOS we have no
local keyboard shortcuts to steal from, so the most permissive value is
safe and it unblocks the input queue.

Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
This commit is contained in:
Trey T
2026-04-17 13:42:48 -05:00
parent a21946ba2c
commit 0f1d2fa6f6

View File

@@ -331,7 +331,11 @@ public final class SessionController {
isShared: true,
isScalingEnabled: false,
useDisplayLink: false,
inputMode: .none,
// Any value other than .none, otherwise RoyalVNCKit drops every
// enqueued PointerEvent/KeyEvent. On iOS we don't have local
// keyboard shortcuts to worry about, so pick the most permissive
// forwarding mode.
inputMode: .forwardKeyboardShortcutsEvenIfInUseLocally,
isClipboardRedirectionEnabled: clipboardSyncEnabled,
colorDepth: .depth24Bit,
frameEncodings: preferredEncodings