----- Forwarded Message -----
From: "Amos Benari" <[email protected]>
To: [email protected]
Cc: "Amos Benari" <[email protected]>
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);
+  }
+}
+
 function update_modifier(state, code, sc)
 {
     var msg = new SpiceMiniData();
-- 
1.7.4.2

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

Reply via email to