Signed-off-by: Dietmar Maurer <dietmar@xxxxxxxxxxx> Index: new/server/inputs_channel.c =================================================================== --- new.orig/server/inputs_channel.c 2013-10-16 12:37:14.000000000 +0200 +++ new/server/inputs_channel.c 2013-10-16 12:37:41.000000000 +0200 @@ -124,6 +124,11 @@ } keyboard = _keyboard; keyboard->st = spice_new0(SpiceKbdState, 1); + + SpiceKbdInterface *sif = SPICE_CONTAINEROF(keyboard->base.sif, SpiceKbdInterface, base); + if (sif && g_inputs_channel && sif->push_utf8) { + red_channel_set_cap(&g_inputs_channel->base, SPICE_INPUTS_CAP_KEY_UTF8); + } return 0; } @@ -224,6 +229,20 @@ sif->push_scan_freg(sin, scan); } +static void kbd_push_utf8(SpiceKbdInstance *sin, uint32_t size, uint8_t *data) +{ + SpiceKbdInterface *sif; + + if (!sin) { + return; + } + sif = SPICE_CONTAINEROF(sin->base.sif, SpiceKbdInterface, base); + + if (sif->push_utf8) { + sif->push_utf8(sin, size, data); + } +} + static uint8_t kbd_get_leds(SpiceKbdInstance *sin) { SpiceKbdInterface *sif; @@ -339,6 +358,10 @@ } break; } + case SPICE_MSGC_INPUTS_KEY_UTF8: { + kbd_push_utf8(keyboard, size, (uint8_t *)buf); + break; + } case SPICE_MSGC_INPUTS_MOUSE_MOTION: { SpiceMsgcMouseMotion *mouse_motion = (SpiceMsgcMouseMotion *)buf; Index: new/server/spice.h =================================================================== --- new.orig/server/spice.h 2013-10-16 12:37:14.000000000 +0200 +++ new/server/spice.h 2013-10-16 12:37:18.000000000 +0200 @@ -272,6 +272,7 @@ void (*push_scan_freg)(SpiceKbdInstance *sin, uint8_t frag); uint8_t (*get_leds)(SpiceKbdInstance *sin); + void (*push_utf8)(SpiceKbdInstance *sin, uint32_t size, uint8_t *data); }; struct SpiceKbdInstance { _______________________________________________ Spice-devel mailing list Spice-devel@xxxxxxxxxxxxxxxxxxxxx http://lists.freedesktop.org/mailman/listinfo/spice-devel