Allow key events without symbols

They can still be useful if the server makes use of the keycode instead.
This commit is contained in:
Pierre Ossman 2017-06-02 14:37:36 +02:00
parent dfa7826d72
commit 459ed0083f
1 changed files with 6 additions and 0 deletions

View File

@ -345,10 +345,16 @@ RFB.prototype = {
scancode = 0;
}
// 0 is NoSymbol
keysym = keysym || 0;
Log.Info("Sending key (" + (down ? "down" : "up") + "): keysym " + keysym + ", scancode " + scancode);
RFB.messages.QEMUExtendedKeyEvent(this._sock, keysym, down, scancode);
} else {
if (!keysym) {
return false;
}
Log.Info("Sending keysym (" + (down ? "down" : "up") + "): " + keysym);
RFB.messages.keyEvent(this._sock, keysym, down ? 1 : 0);
}