-
Notifications
You must be signed in to change notification settings - Fork 199
Changing terminal emulator
Janus Troelsen edited this page Jan 9, 2015
·
7 revisions
jor1k supports two terminal emulators. One, MackeTerm
in js/plugins/terminal-macke.js
is the default. The other, TermJSTerm
in js/plugins/terminal-macke.js
uses term.js.
Check out the repository in js/plugins
. Next, apply the following patch:
diff --git a/src/term.js b/src/term.js
index f26617d..c061e36 100644
--- a/src/term.js
+++ b/src/term.js
@@ -464,9 +464,9 @@ Terminal.prototype.initGlobal = function() {
}
Terminal._boundDocs.push(document);
- Terminal.bindPaste(document);
+ //Terminal.bindPaste(document);
- Terminal.bindKeys(document);
+ //Terminal.bindKeys(document);
Terminal.bindCopy(document);
Also, add -r ./js/plugins/terminal-termjs.js:TermJSTerm
to the command line in compile
.
Now, you can use the TermJSTerm
from your HTML page by creating an empty div where the terminal should be. You have to require the TermJSTerm
module using e.g. var TermJSTerm = require("TermJSTerm")
. You can construct an instance using var term = new TermJSTerm(document.getElementById("idOfMyDivElement"))
. Pass the instance to the Jor1kGUI
constructor in place of the MackeTerm
instance.