Add CtrlAltDel send button to status bar.

Some default_controls.js jslinting.

Needs to be some modularity between controls you probably always want
(like sending CtrlAltDel) and how the interface is presented and
controlled.
This commit is contained in:
Joel Martin
2010-06-15 17:47:01 -05:00
parent 15046f0042
commit 63708ff5a8
5 changed files with 107 additions and 23 deletions
+27 -1
View File
@@ -94,12 +94,38 @@ setCanvasID: function(canvasID) {
RFB.canvasID = canvasID;
},
setPassword: function(passwd) {
sendPassword: function(passwd) {
RFB.password = passwd;
RFB.state = "Authentication";
setTimeout(RFB.init_msg, 1);
},
sendCtrlAltDel: function() {
if (RFB.state !== "normal") { return false; }
console.log("Sending Ctrl-Alt-Del");
var arr = [];
arr = arr.concat(RFB.keyEvent(0xFFE3, 1)); // Control
arr = arr.concat(RFB.keyEvent(0xFFE9, 1)); // Alt
arr = arr.concat(RFB.keyEvent(0xFFFF, 1)); // Delete
arr = arr.concat(RFB.keyEvent(0xFFFF, 0)); // Delete
arr = arr.concat(RFB.keyEvent(0xFFE9, 0)); // Alt
arr = arr.concat(RFB.keyEvent(0xFFE3, 0)); // Control
arr = arr.concat(RFB.fbUpdateRequest(1));
RFB.send_array(arr);
},
sendCtrlC: function() {
if (RFB.state !== "normal") { return false; }
console.log("Sending Ctrl-C");
var arr = [];
arr = arr.concat(RFB.keyEvent(0xFFE3, 1)); // Control
arr = arr.concat(RFB.keyEvent(67, 1)); // C
arr = arr.concat(RFB.keyEvent(67, 0)); // C
arr = arr.concat(RFB.keyEvent(0xFFE3, 0)); // Control
arr = arr.concat(RFB.fbUpdateRequest(1));
RFB.send_array(arr);
},
load: function () {
var i;
//console.log(">> load");