Frank Kobzik has uploaded a new change for review. Change subject: frontend: add send ctrl-alt-delete to spice-html5 client ......................................................................
frontend: add send ctrl-alt-delete to spice-html5 client Change-Id: I4b13044e742275b32fd9965ceaf9ba09c6976529 Bug-Url: https://bugzilla.redhat.com/1014069 Signed-off-by: Frantisek Kobzik <fkob...@redhat.com> --- M backend/manager/modules/root/src/main/webapp/ovirt-engine-spicehtml5-main.html 1 file changed, 43 insertions(+), 0 deletions(-) git pull ssh://gerrit.ovirt.org:29418/ovirt-engine refs/changes/42/19942/1 diff --git a/backend/manager/modules/root/src/main/webapp/ovirt-engine-spicehtml5-main.html b/backend/manager/modules/root/src/main/webapp/ovirt-engine-spicehtml5-main.html index 9606da6..e6fa359 100644 --- a/backend/manager/modules/root/src/main/webapp/ovirt-engine-spicehtml5-main.html +++ b/backend/manager/modules/root/src/main/webapp/ovirt-engine-spicehtml5-main.html @@ -134,6 +134,30 @@ }catch(e) {alert(e);} } + /* + * This functions emulates the sendCtrlAltDel from inputs.js from + * version 0.1.3. As soon as we upgrade to that version, this function + * should be removed! + */ + function sendCtrlAltDel() { + if (sc && sc.inputs && sc.inputs.state === "ready") { + var key = new SpiceMsgcKeyDown(); + var msg = new SpiceMiniData(); + + update_modifier(true, KEY_LCtrl, sc); + update_modifier(true, KEY_Alt, sc); + + key.code = KEY_KP_Decimal; + 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); + } + } + if (window.addEventListener) { // For standards-compliant web browsers window.addEventListener("message", connectToConsole, false); @@ -142,6 +166,19 @@ } </script> + <style> + .control-panel { + margin-top: 5px; + margin-left: auto; + margin-right: auto; + line-height: 1.1em; + width: 800px; + min-height: 20px; + padding: 5px; + border: solid #222222 1px; + background-color: #333333; + } + </style> </head> <body> @@ -154,6 +191,12 @@ <div id="spice-screen" class="spice-screen"></div> </div> + <div class="control-panel"> + <button type="button" onclick="sendCtrlAltDel()"> + Send Ctrl-Alt-Delete + </button> + </div> + <div id="message-div" class="spice-message" style="display: none"></div> <div id="debug-div" style="display: none"> -- To view, visit http://gerrit.ovirt.org/19942 To unsubscribe, visit http://gerrit.ovirt.org/settings Gerrit-MessageType: newchange Gerrit-Change-Id: I4b13044e742275b32fd9965ceaf9ba09c6976529 Gerrit-PatchSet: 1 Gerrit-Project: ovirt-engine Gerrit-Branch: master Gerrit-Owner: Frank Kobzik <fkob...@redhat.com> _______________________________________________ Engine-patches mailing list Engine-patches@ovirt.org http://lists.ovirt.org/mailman/listinfo/engine-patches