add "send backslash" button.
it's impossible to send a plain backslash keysym without ALT using MacBookPro with JP keyboard. option+yen produces a backslash but, because noVNC maps option key to ALT, it ends up with sending ALT+backslash to the server.
This commit is contained in:
parent
3516bdf3fa
commit
93bb0f9508
|
|
@ -26,6 +26,8 @@
|
||||||
<table border=0 width="100%"><tr>
|
<table border=0 width="100%"><tr>
|
||||||
<td><div id="noVNC_status">Loading</div></td>
|
<td><div id="noVNC_status">Loading</div></td>
|
||||||
<td width="1%"><div id="noVNC_buttons">
|
<td width="1%"><div id="noVNC_buttons">
|
||||||
|
<input type=button value="Send Backslash"
|
||||||
|
id="sendBackslashButton">
|
||||||
<input type=button value="Send CtrlAltDel"
|
<input type=button value="Send CtrlAltDel"
|
||||||
id="sendCtrlAltDelButton">
|
id="sendCtrlAltDelButton">
|
||||||
</div></td>
|
</div></td>
|
||||||
|
|
@ -66,9 +68,10 @@
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
function updateState(rfb, state, oldstate, msg) {
|
function updateState(rfb, state, oldstate, msg) {
|
||||||
var s, sb, cad, level;
|
var s, sb, bs, cad, level;
|
||||||
s = $D('noVNC_status');
|
s = $D('noVNC_status');
|
||||||
sb = $D('noVNC_status_bar');
|
sb = $D('noVNC_status_bar');
|
||||||
|
bs = $D('sendBackslashButton');
|
||||||
cad = $D('sendCtrlAltDelButton');
|
cad = $D('sendCtrlAltDelButton');
|
||||||
switch (state) {
|
switch (state) {
|
||||||
case 'failed': level = "error"; break;
|
case 'failed': level = "error"; break;
|
||||||
|
|
@ -79,8 +82,13 @@
|
||||||
default: level = "warn"; break;
|
default: level = "warn"; break;
|
||||||
}
|
}
|
||||||
|
|
||||||
if (state === "normal") { cad.disabled = false; }
|
if (state === "normal") {
|
||||||
else { cad.disabled = true; }
|
bs.disabled = false;
|
||||||
|
cad.disabled = false;
|
||||||
|
} else {
|
||||||
|
bs.disabled = true;
|
||||||
|
cad.disabled = true;
|
||||||
|
}
|
||||||
|
|
||||||
if (typeof(msg) !== 'undefined') {
|
if (typeof(msg) !== 'undefined') {
|
||||||
sb.setAttribute("class", "noVNC_status_" + level);
|
sb.setAttribute("class", "noVNC_status_" + level);
|
||||||
|
|
@ -91,6 +99,11 @@
|
||||||
window.onscriptsload = function () {
|
window.onscriptsload = function () {
|
||||||
var host, port, password, path, token;
|
var host, port, password, path, token;
|
||||||
|
|
||||||
|
$D('sendBackslashButton').style.display = "inline";
|
||||||
|
$D('sendBackslashButton').onclick = function() {
|
||||||
|
rfb.sendKey(0x5C);
|
||||||
|
return false;
|
||||||
|
}
|
||||||
$D('sendCtrlAltDelButton').style.display = "inline";
|
$D('sendCtrlAltDelButton').style.display = "inline";
|
||||||
$D('sendCtrlAltDelButton').onclick = sendCtrlAltDel;
|
$D('sendCtrlAltDelButton').onclick = sendCtrlAltDel;
|
||||||
|
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue