And introduce a new capability SPICE_INPUTS_CAP_KEY_X11_KEYSYM.

The new message includes a x11 keysym, the scancode, and a flag
to indicate if a key is pressed or released (or both).

     message {
       uint32 keysym;
       keyboard_flags flags; 
       uint8 code_len;
       uint8 code[code_len] @end;
     } @ctype(SpiceMsgcKeyX11KeySym) key_x11_keysym;

Signed-off-by: Dietmar Maurer <[email protected]>

Index: new/spice-common/common/client_marshallers.h
===================================================================
--- new.orig/spice-common/common/client_marshallers.h   2013-10-11 
09:26:28.000000000 +0200
+++ new/spice-common/common/client_marshallers.h        2013-10-11 
09:26:33.000000000 +0200
@@ -48,6 +48,7 @@
     void (*msgc_inputs_key_down)(SpiceMarshaller *m, SpiceMsgcKeyDown *msg);
     void (*msgc_inputs_key_up)(SpiceMarshaller *m, SpiceMsgcKeyUp *msg);
     void (*msgc_inputs_key_modifiers)(SpiceMarshaller *m, 
SpiceMsgcKeyModifiers *msg);
+    void (*msgc_inputs_key_x11_keysym)(SpiceMarshaller *m, 
SpiceMsgcKeyX11KeySym *msg);
     void (*msgc_inputs_mouse_motion)(SpiceMarshaller *m, SpiceMsgcMouseMotion 
*msg);
     void (*msgc_inputs_mouse_position)(SpiceMarshaller *m, 
SpiceMsgcMousePosition *msg);
     void (*msgc_inputs_mouse_press)(SpiceMarshaller *m, SpiceMsgcMousePress 
*msg);
Index: new/spice-common/common/messages.h
===================================================================
--- new.orig/spice-common/common/messages.h     2013-10-11 09:26:28.000000000 
+0200
+++ new/spice-common/common/messages.h  2013-10-11 10:52:08.000000000 +0200
@@ -417,6 +417,13 @@
     uint32_t modifiers;
 } SpiceMsgcKeyModifiers;
 
+typedef struct SpiceMsgcKeyX11KeySym {
+    uint32_t keysym;
+    uint32_t flags;
+    uint8_t code_len;
+    uint8_t code[0];
+} SpiceMsgcKeyX11KeySym;
+
 typedef struct SpiceMsgcMouseMotion {
     int32_t dx;
     int32_t dy;
Index: new/spice-common/spice.proto
===================================================================
--- new.orig/spice-common/spice.proto   2013-10-11 09:26:28.000000000 +0200
+++ new/spice-common/spice.proto        2013-10-11 10:53:29.000000000 +0200
@@ -938,6 +938,11 @@
     RIGHT
 };
 
+flags32 keyboard_flags {
+    DOWN,
+    UP,
+} @prefix(SPICE_KEYBOARD_FLAG_);
+
 channel InputsChannel : BaseChannel {
  client:
     message {
@@ -955,6 +960,13 @@
     Data key_scancode;
 
     message {
+       uint32 keysym;
+       keyboard_flags flags;
+       uint8 code_len;
+       uint8 code[code_len] @end;
+   } @ctype(SpiceMsgcKeyX11KeySym) key_x11_keysym;
+
+    message {
        int32 dx;
        int32 dy;
        mouse_button_mask buttons_state;
Index: new/spice-common/spice-protocol/spice/protocol.h
===================================================================
--- new.orig/spice-common/spice-protocol/spice/protocol.h       2013-10-11 
09:26:28.000000000 +0200
+++ new/spice-common/spice-protocol/spice/protocol.h    2013-10-11 
09:26:33.000000000 +0200
@@ -135,6 +135,7 @@
 
 enum {
     SPICE_INPUTS_CAP_KEY_SCANCODE,
+    SPICE_INPUTS_CAP_KEY_X11_KEYSYM,
 };
 
 enum {

_______________________________________________
Spice-devel mailing list
[email protected]
http://lists.freedesktop.org/mailman/listinfo/spice-devel

Reply via email to