[Spice-devel] [KEYVAL PATCH v1] add SpiceMsgcKeyKeyval protocol message definition

Dietmar Maurer dietmar at proxmox.com
Tue Sep 3 01:02:28 PDT 2013


Signed-off-by: Dietmar Maurer <dietmar at proxmox.com>
---
 common/client_marshallers.h |    1 +
 common/messages.h           |    5 +++++
 spice.proto                 |   10 ++++++++++
 3 files changed, 16 insertions(+)

diff --git a/common/client_marshallers.h b/common/client_marshallers.h
index 85051a0..bbd114d 100644
--- a/common/client_marshallers.h
+++ b/common/client_marshallers.h
@@ -48,6 +48,7 @@ typedef struct {
     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_keyval)(SpiceMarshaller *m, SpiceMsgcKeyKeyval *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);
diff --git a/common/messages.h b/common/messages.h
index a8a0eee..5550cae 100644
--- a/common/messages.h
+++ b/common/messages.h
@@ -417,6 +417,11 @@ typedef struct SpiceMsgcKeyModifiers {
     uint32_t modifiers;
 } SpiceMsgcKeyModifiers;
 
+typedef struct SpiceMsgcKeyKeyval {
+    uint32_t keyval;
+    uint32_t flags;
+} SpiceMsgcKeyKeyval;
+
 typedef struct SpiceMsgcMouseMotion {
     int32_t dx;
     int32_t dy;
diff --git a/spice.proto b/spice.proto
index 5eede6b..139abaf 100644
--- a/spice.proto
+++ b/spice.proto
@@ -938,6 +938,11 @@ flags16 mouse_button_mask {
     RIGHT
 };
 
+flags32 keyboard_keyval_flags {
+    DOWN,
+    UP,
+} @prefix(SPICE_KEYBOARD_KEYVAL_FLAG_);
+
 channel InputsChannel : BaseChannel {
  client:
     message {
@@ -955,6 +960,11 @@ channel InputsChannel : BaseChannel {
     Data key_scancode;
 
     message {
+	uint32 keyval;
+ 	keyboard_keyval_flags flags;
+    } @ctype(SpiceMsgcKeyKeyval) key_keyval;
+
+    message {
 	int32 dx;
 	int32 dy;
 	mouse_button_mask buttons_state;
-- 
1.7.10.4



More information about the Spice-devel mailing list