On Tue, Feb 02, 2021 at 12:10:15PM +0100, Gerd Hoffmann wrote: > Hi, > > > > How do you rate-limit intelligently to avoid overflowing the guest > > > keyboard buffers? > > > > Like I said earlier in this thread, this is a big problem with > > keyboard injection. > > It's a solved problem though, the qemu vnc server has throttling > implemented already. There even is an option to configure the delay > (key-delay-ms).
Depends on your view of "solved" really. If I've highlighted a region of text in openoffice that is 100 KB in size, and press "Ctrl-V" in the VNC window for the VM, with a 10 ms delay, i'll be waiting 15 minutes for it to finish injecting keystrokes. Anything longer than 1 second is unacceptable. If you make the delay too short the guest keyboard handler will loose keys. So realistically I think keyboard injection is limted to about 100 characters of text. Regards, Daniel -- |: https://berrange.com -o- https://www.flickr.com/photos/dberrange :| |: https://libvirt.org -o- https://fstop138.berrange.com :| |: https://entangle-photo.org -o- https://www.instagram.com/dberrange :|