diff --git a/crates/ericrfb-frontend/src/pages/console.ts b/crates/ericrfb-frontend/src/pages/console.ts index 07bcbb1..7c5f7e7 100644 --- a/crates/ericrfb-frontend/src/pages/console.ts +++ b/crates/ericrfb-frontend/src/pages/console.ts @@ -199,9 +199,11 @@ function switchToPort(port: number) { const hotkey = portHotkeys[port] if (!hotkey || ws?.readyState !== WebSocket.OPEN) return - // Count pause tokens to calculate total switch duration + // Total duration: proxy round-trip + key sequence execution + settle time const pauseCount = (hotkey.match(/\*/g) || []).length - const duration = Math.max((pauseCount * keyPauseDuration) + 500, 1000) + const proxyLatency = 4000 // WS → proxy → Belkin → Avocent pipeline delay + const settleTime = 1000 // wait for video stream to stabilize after switch + const duration = proxyLatency + (pauseCount * keyPauseDuration) + settleTime // Suspend input and show overlay inputSuspended = true