title: How to send keyboard events to a QEMU guest programmatically?
body: <p>Let's say I have some preexisting iso(for example, alpine linux). And I start it with</p>
  
  <pre><code>qemu-system-x86_64 -enable-kvm -cdrom alpine-virt-3.5.0-x86_64.iso
  </code></pre>
  
  <p>At this point, I'd like to perform some setup(and avoid doing it manually).</p>
  
  <p>One way to do this, I guess, is by using xdotool, but it would be not very convenient because an entire Xorg session will be busy with one QEMU guest.</p>
  
  <p>Maybe there is a better way? Can it be done via QMP or QEMU C API?</p>