[Spice-devel] SPICE_INTERFACE_KEYBOARD - scancodes vs. utf8

Gerd Hoffmann kraxel at redhat.com
Tue Aug 6 08:03:39 PDT 2013


  Hi,

>> # spiceterm -c /bin/bash
>> 
>> That way you can run any terminal based command over spice.
>> 
>> We already have that for VNC.
> 
> Having utf8 input was discussed a few weeks ago, it is needed for
> html and android clients for ex.

Note that this is a completely different problem.

When running a virtual machine you need the scancodes, so you can feed
the guest with the correct virtual keystrokes.  Translating those
keystrokes into characters is the job of the guest operating system.
There is no meaningful way to pass a utf-8 character stream into a
virtual machine.

So a spice client must somehow figure how to translate the input it gets
into scancodes.  And IMO this should best be done on the client side so
the client can use all information it has to do it.  For gtk this is
easy as the key events carry not only the character but the keycode too.
 For android/html5 clients this is alot trickier ...

But, when the server side wants a utf8 stream this is a completely
different issue.  Maybe the easiest is to send the utf8 stream over a
SpiceCharDeviceInterface (if present).

cheers,
  Gerd


More information about the Spice-devel mailing list