mirror of
https://github.com/cozystack/cozystack.git
synced 2026-11-22 04:33:36 +09:00
xterm turns Ctrl with a letter into a control byte and cancels the keydown, so on Windows and Linux Ctrl+V never reached the browser's paste and the guest received SYN (0x16) instead. Cmd+V and Shift+Insert were unaffected, which is why testing on a Mac missed it: reproduced on a real terminal, where the shortcut put a single 0x16 byte on the wire and nothing else. The key handler now returns the event to the browser, at the cost of the terminal's quoted-insert on that chord — the same trade the VNC console already makes for the same shortcut. The test stub keeps the handler now instead of dropping it, so the chord is reachable from a test at all. Three smaller repairs in the same paths: A frame arriving after cleanup was written into a disposed terminal, because the message handler never consulted the stream's own state. onerror synthesised a 1006 and the real onclose behind it was swallowed by the already-closed latch, so a close carrying 1008 Forbidden reached the user as connection error. The error is recorded and the close reports what the server actually said. navigator.clipboard is SecureContext-only and absent over plain http, which the console's own URL builder supports; copying threw there instead of falling back to the selection the user can copy by hand. Assisted-by: LLM Signed-off-by: IvanHunters <xorokhotnikov@gmail.com>