Don't send Unicode to RFB.sendKey()

The argument must be a Keysym, not a Unicode codepoint.
This commit is contained in:
Pierre Ossman 2016-10-14 08:40:43 +02:00
parent 115eedf69c
commit 0b96eddf56
1 changed files with 2 additions and 1 deletions

View File

@ -14,6 +14,7 @@
/* [module] /* [module]
* import Util from "../core/util"; * import Util from "../core/util";
* import KeyTable from "../core/input/keysym"; * import KeyTable from "../core/input/keysym";
* import keysyms from "./keysymdef";
* import RFB from "../core/rfb"; * import RFB from "../core/rfb";
* import Display from "../core/display"; * import Display from "../core/display";
* import WebUtil from "./webutil"; * import WebUtil from "./webutil";
@ -1411,7 +1412,7 @@ var UI;
UI.rfb.sendKey(KeyTable.XK_BackSpace); UI.rfb.sendKey(KeyTable.XK_BackSpace);
} }
for (i = newLen - inputs; i < newLen; i++) { for (i = newLen - inputs; i < newLen; i++) {
UI.rfb.sendKey(newValue.charCodeAt(i)); UI.rfb.sendKey(keysyms.fromUnicode(newValue.charCodeAt(i)).keysym);
} }
// Control the text content length in the keyboardinput element // Control the text content length in the keyboardinput element