[Spice-devel] [Spice-HTML5][PATCH 1/2] added sendCtrlAltDel method.
Amos Benari
abenari at redhat.com
Sun Mar 3 01:41:14 PST 2013
----- Original Message -----
> From: "Uri Lublin" <uril at redhat.com>
> To: "Amos Benari" <abenari at redhat.com>
> Cc: spice-devel at lists.freedesktop.org
> Sent: Sunday, March 3, 2013 10:42:58 AM
> Subject: Re: [Spice-devel] [Spice-HTML5][PATCH 1/2] added sendCtrlAltDel method.
>
> On 03/03/2013 09:25 AM, Amos Benari wrote:
>
> Hi Amos,
>
> Thanks a lot for your work on adding spice support in TheForeman !
> http://theforeman.org/ (and thanks Ohad too)
>
> As for this patch, please see one comment inline.
>
> > ----- Forwarded Message -----
> > From: "Amos Benari"<abenari at redhat.com>
> > To: spice-devel at lists.freedesktop.org
> > Cc: "Amos Benari"<abenari at redhat.com>
> > Sent: Sunday, March 3, 2013 1:55:47 AM
> > Subject: [PATCH 1/2] added sendCtrlAltDel method.
> >
> > ---
> > inputs.js | 20 ++++++++++++++++++++
> > 1 files changed, 20 insertions(+), 0 deletions(-)
> >
> > diff --git a/inputs.js b/inputs.js
> > index 4d3b28f..5f64749 100644
> > --- a/inputs.js
> > +++ b/inputs.js
> > @@ -175,6 +175,26 @@ function handle_keyup(e)
> > e.preventDefault();
> > }
> >
> > +function sendCtrlAltDel()
> > +{
> > + if (sc&& sc.inputs&& sc.inputs.state === "ready"){
> > + var key = new SpiceMsgcKeyDown();
> > + var msg = new SpiceMiniData();
> > +
> > + key.code = KEY_LCtrl;
> > + msg.build_msg(SPICE_MSGC_INPUTS_KEY_DOWN, key);
> > + sc.inputs.send_msg(msg);
> > +
> > + key.code = KEY_Alt;
> > + msg.build_msg(SPICE_MSGC_INPUTS_KEY_DOWN, key);
> > + sc.inputs.send_msg(msg);
> > +
> > + key.code = KEY_KP_Decimal;
> > + msg.build_msg(SPICE_MSGC_INPUTS_KEY_DOWN, key);
> > + sc.inputs.send_msg(msg);
> > + }
>
> Don't you need to also send KEY_UP messages ?
No, the clients (tested on windows and fedora) respond to the key down event.
The next keyboard event contain modifier flags state(Shift, Ctrl, Alt etc.) in it and the html client will update the modifier state.
Amos.
>
> Thanks,
> Uri.
>
More information about the Spice-devel
mailing list