[PATCH spice-html5 v2] spice_auto: Add button to send Ctrl-Alt-Delete

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



This already uses the added function sendCtrlAltDel().
---
 inputs.js       | 9 ++++++---
 spice_auto.html | 1 +
 2 files changed, 7 insertions(+), 3 deletions(-)

diff --git a/inputs.js b/inputs.js
index 29f4970..0f77b66 100644
--- a/inputs.js
+++ b/inputs.js
@@ -193,14 +193,17 @@ function sendCtrlAltDel()
         update_modifier(true, KEY_LCtrl, sc);
         update_modifier(true, KEY_Alt, sc);
 
-        key.code = KEY_KP_Decimal;
+        key.code = common_scanmap[46];
         msg.build_msg(SPICE_MSGC_INPUTS_KEY_DOWN, key);
         sc.inputs.send_msg(msg);
         msg.build_msg(SPICE_MSGC_INPUTS_KEY_UP, key);
         sc.inputs.send_msg(msg);
 
-        if(Ctrl_state == false) update_modifier(false, KEY_LCtrl, sc);
-        if(Alt_state == false) update_modifier(false, KEY_Alt, sc);
+        /* We have to send this, otherwise the function will not work on Linux */
+        update_modifier(false, KEY_KP_Decimal, sc);
+
+        update_modifier(false, KEY_Alt, sc);
+        update_modifier(false, KEY_LCtrl, sc);
     }
 }
 
diff --git a/spice_auto.html b/spice_auto.html
index 2f04fc9..5c90cbc 100644
--- a/spice_auto.html
+++ b/spice_auto.html
@@ -204,6 +204,7 @@
 
         <div id="login">
             <span class="logo">SPICE</span>
+            <button id="sendCtrlAltDelButton" onclick="sendCtrlAltDel();">Send Ctrl-Alt-Delete</button>
         </div>
 
         <div id="spice-area">
-- 
2.9.5

_______________________________________________
Spice-devel mailing list
Spice-devel@xxxxxxxxxxxxxxxxxxxxx
https://lists.freedesktop.org/mailman/listinfo/spice-devel




[Index of Archives]     [Linux ARM Kernel]     [Linux ARM]     [Linux Omap]     [Fedora ARM]     [IETF Annouce]     [Security]     [Bugtraq]     [Linux]     [Linux OMAP]     [Linux MIPS]     [ECOS]     [Asterisk Internet PBX]     [Linux API]     [Monitors]