From 459ed0083fae1a13ab35c096c47f57f0f39e3ce0 Mon Sep 17 00:00:00 2001 From: Pierre Ossman Date: Fri, 2 Jun 2017 14:37:36 +0200 Subject: [PATCH] Allow key events without symbols They can still be useful if the server makes use of the keycode instead. --- core/rfb.js | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/core/rfb.js b/core/rfb.js index de520628..76f75f95 100644 --- a/core/rfb.js +++ b/core/rfb.js @@ -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); }