Skip to content

Commit

Permalink
Use correct terminology in RFB.sendKey()
Browse files Browse the repository at this point in the history
The keyboard handling is complex enough without using the incorrect
terms for things.
  • Loading branch information
ossman committed Oct 14, 2016
1 parent da346c3 commit 4dc8953
Showing 1 changed file with 6 additions and 6 deletions.
12 changes: 6 additions & 6 deletions core/rfb.js
Original file line number Diff line number Diff line change
Expand Up @@ -318,15 +318,15 @@

// Send a key press. If 'down' is not specified then send a down key
// followed by an up key.
sendKey: function (code, down) {
sendKey: function (keysym, down) {
if (this._rfb_connection_state !== 'connected' || this._view_only) { return false; }
if (typeof down !== 'undefined') {
Util.Info("Sending key code (" + (down ? "down" : "up") + "): " + code);
RFB.messages.keyEvent(this._sock, code, down ? 1 : 0);
Util.Info("Sending keysym (" + (down ? "down" : "up") + "): " + keysym);
RFB.messages.keyEvent(this._sock, keysym, down ? 1 : 0);
} else {
Util.Info("Sending key code (down + up): " + code);
RFB.messages.keyEvent(this._sock, code, 1);
RFB.messages.keyEvent(this._sock, code, 0);
Util.Info("Sending keysym (down + up): " + keysym);
RFB.messages.keyEvent(this._sock, keysym, 1);
RFB.messages.keyEvent(this._sock, keysym, 0);
}
return true;
},
Expand Down

0 comments on commit 4dc8953

Please sign in to comment.