Comments (5)
Can you tell me which OS and terminal you are using? It looks like it does not support the raw mode. Windows?
from terminal-kit.
@cronvel my fault, since windows was not supported and I was on that OS, I was using a ssh client to connect to a linux machine I own, but 100% the terminal of the ssh client was not supported, when I tried on my laptop that has linux on it, it worked like a charm.
( the terminal I was using is from: Bitvise SSH if you are interested to add support or to know which terminal was failing )
Many thanks.
from terminal-kit.
@cronvel do you know if is possible with terminal-kit to send the output something different that process stdoutput?
I explain, I'm trying to archive something like this (pseudo-code):
telnet.createServer(function(client) {
var term = ansi(client, { enabled: true })
term.write('Hello');
})
Using the ansi module is possible to send the output to the telnet client (in this case)
from terminal-kit.
Hello @codekraft-studio
Have a look at this constructor, it allows you to configure your stdio.
Something like this should do the job:
var termkit = require( 'terminal-kit' ) ;
telnet.createServer(function(client) {
var term = termkit.createTerminal( {
stdout: client.stdout , // just guessing the 'client' structure here
stdin: client.stdin , // just guessing the 'client' structure here
} ) ;
term.magenta( 'Hello! in magenta!' ) ;
} ) ;
If you need advanced features, your telnet lib should at least support the raw mode.
For your windows terminal, can you run some linux text editor with it?
- If you can't, there is nothing we can do.
- If you can, then your windows terminal simply has bad default modes, but vanilla Node.js cannot set any TTY mode (beside raw mode), you need a native module for that: the solution can be to use the excellent termios module by @Gottox:
I hesitate to include termios in Terminal-kit, but it bothers me to include native module. At the moment, Terminal-kit can be run on any Node.js machine, but if I include native module, it would require a compiler.
from terminal-kit.
If you can, then your windows terminal simply has bad default modes, but vanilla Node.js cannot set any TTY mode (beside raw mode), you need a native module for that: the solution can be to use the excellent termios module by @Gottox:
with the terminal provided by Bitvise I can use editors like nano and vim via ssh, eventually I will try to use termios if I really need, but for now i'm just "playing" with the code so I don't want to complicate my life too much.
Have a look at this constructor, it allows you to configure your stdio.
I didn't see the documentation in deep, sorry I should have checked before!
Later today when I've time I'll try to see if it works like you suggested many thanks!
from terminal-kit.
Related Issues (20)
- Document model - typed? dev branch?
- terminalkit.TextBox is not a constructor HOT 3
- document: InlineInputField only widthPercent breaks input
- Redraw window every "frame" HOT 1
- Word/Line wrap ERROR when x,y,width or height of TextBox are non integers
- Unable to draw the correct image in vscode dark-mode terminal!
- Can't run after packed with pkg HOT 3
- Cannot input after using term.inputField() HOT 4
- Issue: Terminal stuck in while-loop when initating another terminal with stdin/stdout
- Form control event and validation
- form render issue - hide/show control
- Erase Everything - How?
- Possible EventEmitter memory leak
- Multiple Documents in Same Terminal Screen
- support for fonts
- term.table does not work in Azure pipeline HOT 6
- term.table does not work in Azure pipeline HOT 1
- Unable to bundle code with dependencies HOT 5
- inputField Inline support? HOT 1
- Documentation request: cannot chain .inputField
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from terminal-kit.