On Mon, Oct 7, 2013 at 11:44 AM, <dietmar@xxxxxxxxxxx> wrote: > Signed-off-by: Dietmar Maurer <dietmar@xxxxxxxxxxx> > > Index: new/spice-common/spice-protocol/spice/vd_agent.h > =================================================================== > --- new.orig/spice-common/spice-protocol/spice/vd_agent.h 2013-10-07 10:51:28.000000000 +0200 > +++ new/spice-common/spice-protocol/spice/vd_agent.h 2013-10-07 11:02:39.000000000 +0200 > @@ -73,6 +73,7 @@ > VD_AGENT_FILE_XFER_STATUS, > VD_AGENT_FILE_XFER_DATA, > VD_AGENT_CLIENT_DISCONNECTED, > + VD_AGENT_KEYVAL, > VD_AGENT_END_MESSAGE, > }; > > @@ -147,6 +148,21 @@ > uint8_t display_id; > } VDAgentMouseState; > > +#define VD_AGENT_KEYVAL_FLAG_DOWN (1 << 0) > +#define VD_AGENT_KEYVAL_FLAG_SHIFT (1 << 1) > +#define VD_AGENT_KEYVAL_FLAG_LOCK (1 << 2) > +#define VD_AGENT_KEYVAL_FLAG_CONTROL (1 << 3) > +#define VD_AGENT_KEYVAL_FLAG_MOD1 (1 << 4) > +#define VD_AGENT_KEYVAL_FLAG_MOD2 (1 << 5) > +#define VD_AGENT_KEYVAL_FLAG_MOD3 (1 << 6) > +#define VD_AGENT_KEYVAL_FLAG_MOD4 (1 << 7) > +#define VD_AGENT_KEYVAL_FLAG_MOD5 (1 << 8) I think you should keep the UP flag there you had in your previous proposal (to avoid problems of network latency, generating spurious key repeatition events on application/guest side) Why not have SUPER (win key), HYPER and META? > +typedef struct SPICE_ATTR_PACKED VDAgentKeyval { > + uint32_t keyval; > + uint32_t flags; > +} VDAgentKeyval; > + > typedef struct SPICE_ATTR_PACKED VDAgentReply { > uint32_t type; > uint32_t error; > @@ -209,6 +225,7 @@ > VD_AGENT_CAP_SPARSE_MONITORS_CONFIG, > VD_AGENT_CAP_GUEST_LINEEND_LF, > VD_AGENT_CAP_GUEST_LINEEND_CRLF, > + VD_AGENT_CAP_KEYVAL, > VD_AGENT_END_CAP, > }; > As discussed in summary mail, I think this key event should be on input channel, to avoid key/mouse event synchronization issues on two channels and because it is a substitute (not a complement) to existing KeyDown/KeyUp messages. -- Marc-André Lureau _______________________________________________ Spice-devel mailing list Spice-devel@xxxxxxxxxxxxxxxxxxxxx http://lists.freedesktop.org/mailman/listinfo/spice-devel