Windows is the platform where noVNC holds the modifier back: the first
Ctrl keydown tells the guest nothing, arms AltGr detection and starts a
100 ms timer, and Ctrl reaches the guest when that timer fires. Taking
the shortcut on the capture phase hides the V from noVNC, so the timer
is what delivers — after the paste released a modifier the guest had not
yet been told about. Everything typed between the two goes in as chords.
The release is now sent a second time, once the pacing has covered that
window. It happens once rather than per character, and it leaves Shift
alone, because that one is held deliberately for capitals.
Two tests had drifted past the code they are named for. Both dropped the
session on the first sleep, which since the prelude lands before
anything is pressed, so they held whatever the typing loop did: removing
the session check from the loop left them green. They drop it after a
character now, and a third covers the closing release, which no test
reached at all.
The fake learns the Windows path it could not express, and decodes
function keysyms: Enter is 0xff0d, and treating it as a Unicode offset
produced a negative code point, so the first test to paste a newline
would have thrown instead of failing an assertion.
The typing pace is injectable, so tests no longer run at the speed of a
real keyboard and stop crowding their neighbours out on timeouts.
Assisted-by: LLM
Signed-off-by: IvanHunters <xorokhotnikov@gmail.com>