mirror of
https://github.com/cozystack/cozystack.git
synced 2026-11-25 14:14:14 +09:00
Three defects on the same surface, all of them where this code meets noVNC, the platform and the guest — and all of them invisible to every test here, because the fake had no keyboard. A paste began while the user was still holding the chord. noVNC tells the guest a modifier is down the moment it is pressed and releases it only on keyup, so the pasted text arrived as chords: under Ctrl an m is Return, and on macOS, where noVNC maps Cmd to Alt, the same under Alt. The host's modifiers are now released before the first character. A character the keymap cannot produce was dropped and the rest was typed anyway, newline included, with the notice arriving after the line had run: rm -rf /srv/данные became rm -rf /srv. Nothing is sent now unless the whole paste can be typed. The shortcut was taken on every platform, so the guest lost a key it has its own use for — visual block in vim, its own clipboard on Windows — and on macOS gained nothing, because no browser pastes on Ctrl+V there. Each platform's own chord only. The fake now models the guest's keyboard: which modifiers it believes are down, and what it received with chords marked. That is what makes the first defect expressible as a test rather than something only a person at a keyboard could notice. Also pins three behaviours the suite was not holding: a frame arriving after cleanup, a real close reason behind a synthetic 1006, and the 25 ms pacing the description calls measured. Assisted-by: LLM Signed-off-by: IvanHunters <xorokhotnikov@gmail.com>