Il 22/04/2013 17:20, Gerd Hoffmann ha scritto:
>> > Yes, if PS/2 keyboard emulation emulated the autorepeat rate/delay, then
>> > the code we have in QMP would just work.  However it would need to be
>> > done for all devices (ignoring repeated keydown events from the upper
>> > layers, and creating its own repeated event).  So it makes sense to have
>> > it in common code and have keyboard devices just tell common code the
>> > desired rate/delay.
> Yep, that'll work too.

Ok, in that sense Amos's patch is not too bad.  The problems are that it
hardcodes 100/100 as the repeat/delay, and that the autorepeat is only
done for the send-key command.  If the first was replaced with at least
two #defines it would be acceptable IMO.

>>> >> IIRC the (ps/2) kbd controller can be programmed with rate+delay.
>> > 
>> > Yes, but we ignore the command.  For the PS/2 keyboard, I think what we
>> > send now to the guest is based on the rate/delay that is emulated in
>> > software by the GUI layers (for Unix it should just be X11 for all of
>> > SDL/VNC/Spice).
> Exactly.  Thats why keys getting stuck on migration isn't a big issue in
> practice.

Hmm, but if you press "a" and migrate, the receiver will see "key down
a" and no "key up a".  Software autorepeat will then generate an endless
stream of a's...

It isn't a big issue because it's just very unlikely to happen, or
perhaps because no one plays games on VDI during migration.

Paolo

Reply via email to