Last active
June 21, 2016 15:18
-
-
Save jerch/4393f100562b602ee1cc030cc9fa1f63 to your computer and use it in GitHub Desktop.
xterm.js with fast keyboard input
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
diff --git a/demo/app.js b/demo/app.js | |
index c48f609..c7606ab 100644 | |
--- a/demo/app.js | |
+++ b/demo/app.js | |
@@ -31,6 +31,7 @@ app.ws('/bash', function(ws, req) { | |
}); | |
term.on('data', function(data) { | |
try { | |
+ term.write('\x13'); | |
ws.send(data); | |
} catch (ex) { | |
// The WebSocket is not open, ignore | |
diff --git a/src/xterm.js b/src/xterm.js | |
index 30ec970..3628981 100644 | |
--- a/src/xterm.js | |
+++ b/src/xterm.js | |
@@ -1458,6 +1458,8 @@ | |
* @public | |
*/ | |
Terminal.prototype.write = function(data) { | |
+ this.send('\x11'); | |
+ | |
var l = data.length, i = 0, j, cs, ch; | |
this.refreshStart = this.y; |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment