[Spice-devel] [PATCH spice-html5 v2] spice_auto: Add button to send Ctrl-Alt-Delete
Tomáš Bohdálek
tom.bohdalek at gmail.com
Thu Sep 14 09:34:56 UTC 2017
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
More information about the Spice-devel
mailing list