mirror of
https://github.com/sol1/rustguac.git
synced 2026-09-10 09:35:45 +00:00
70185ad215
Ctrl+V (and any modifier chord) could leave Ctrl/Alt/Shift stuck "down" on the remote. The Ctrl+V paste path calls navigator.clipboard.readText(), which shifts focus to a clipboard-permission prompt; the subsequent modifier keyup then lands off-page and Guacamole.Keyboard never sees it, so the keyup is never forwarded to the remote. The modifier stays held until pressed again. Adds blur + visibilitychange handlers that call keyboard.reset(), which releases every tracked key (firing onkeyup -> sendKeyEvent(0, ...) for each). This is the canonical Guacamole guard for focus-loss key sticking and also covers alt-tab-with-modifier-held and clicking away to another app. We already reset() on clipboard/file panel close; this extends the same guard to window focus loss.