This commit is contained in:
GitHub Merge Button 2012-03-14 09:13:54 -07:00
commit 3601c6249a
3 changed files with 16 additions and 0 deletions

View File

@ -1819,6 +1819,16 @@ that.sendKey = function(code, down) {
ws.send(arr); ws.send(arr);
}; };
// Sending UP keys for all control keys, used because of the keypress and hold effect issues VNC.
that.resetKeyboard = function(code, down) {
that.sendKey(0xffe9, 0); // alt ( left )
that.sendKey(0xffea, 0); // alt ( right )
that.sendKey(0xffe3, 0); // ctrl( left )
that.sendKey(0xffe4, 0); // ctrl ( right )
that.sendKey(0xffe2, 0); // shift ( right )
that.sendKey(0xffe1, 0); // shift ( right )
};
that.clipboardPasteFrom = function(text) { that.clipboardPasteFrom = function(text) {
if (rfb_state !== "normal") { return; } if (rfb_state !== "normal") { return; }
//Util.Debug(">> clipboardPasteFrom: " + text.substr(0,40) + "..."); //Util.Debug(">> clipboardPasteFrom: " + text.substr(0,40) + "...");

View File

@ -193,6 +193,9 @@
<script> <script>
window.onload = UI.load; window.onload = UI.load;
window.onblur = function() {
rfb.resetKeyboard();
};
</script> </script>
</body> </body>
</html> </html>

View File

@ -60,6 +60,9 @@
rfb.sendCtrlAltDel(); rfb.sendCtrlAltDel();
return false; return false;
} }
window.onblur = function() {
rfb.resetKeyboard();
}
function updateState(rfb, state, oldstate, msg) { function updateState(rfb, state, oldstate, msg) {
var s, sb, cad, level; var s, sb, cad, level;
s = $D('noVNC_status'); s = $D('noVNC_status');