implement "send backslash" button for vnc.html

This commit is contained in:
YAMAMOTO Takashi 2012-11-07 14:51:45 +09:00
parent c24d98138b
commit 20d467cc50
3 changed files with 11 additions and 0 deletions

BIN
images/backslash.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 279 B

View File

@ -143,6 +143,7 @@ addMouseHandlers: function() {
//$D("keyboardinput").onkeydown = function (event) { onKeyDown(event); };
$D("keyboardinput").onblur = UI.keyInputBlur;
$D("sendBackslashButton").onclick = UI.sendBackslash;
$D("sendCtrlAltDelButton").onclick = UI.sendCtrlAltDel;
$D("clipboardButton").onclick = UI.toggleClipboardPanel;
$D("settingsButton").onclick = UI.toggleSettingsPanel;
@ -391,6 +392,11 @@ setPassword: function() {
return false;
},
sendBackslash: function() {
UI.rfb.sendKey(0x5C);
return false;
},
sendCtrlAltDel: function() {
UI.rfb.sendCtrlAltDel();
},
@ -489,11 +495,13 @@ updateVisualState: function() {
UI.setMouseButton(1);
$D('clipboardButton').style.display = "inline";
$D('showKeyboard').style.display = "inline";
$D('sendBackslashButton').style.display = "inline";
$D('sendCtrlAltDelButton').style.display = "inline";
} else {
UI.setMouseButton();
$D('clipboardButton').style.display = "none";
$D('showKeyboard').style.display = "none";
$D('sendBackslashButton').style.display = "none";
$D('sendCtrlAltDelButton').style.display = "none";
}
// State change disables viewport dragging.

View File

@ -70,6 +70,9 @@
<!--noVNC Buttons-->
<div class="noVNC-buttons-right">
<input type="image" src="images/backslash.png"
id="sendBackslashButton" class="noVNC_status_button"
title="Send Backslash" />
<input type="image" src="images/ctrlaltdel.png"
id="sendCtrlAltDelButton" class="noVNC_status_button"
title="Send Ctrl-Alt-Del" />