qwefgh90 / ng-terminal

NgTerminal is a terminal component on Angular. the Ivy distribution's been released from v5.0.0.
https://qwefgh90.github.io/ng-terminal/
Other
125 stars 27 forks source link

trouble with delete and arrow keys. #51

Closed kpayson closed 3 years ago

kpayson commented 3 years ago

I'm having trouble with delete in arrow keys in my hookup between ng-terminal and nody-pty. I have things hooked up as a dumb terminal every character is being send (over socket) to pty and I take the data response from pty and writ it to the terminal.

When I enter 'ls' delete=127, I am ending up with ls in my terminal. For the case or 127 what should I be sending, to putty, getting back from putty, and then writing to the terminal? Is it a 127 always?

In the examples when there is a backspace=8, I instead send '\b \b' into putty? Is this correct? 8 -> 8 32 8 ? and what will putty return?

On my mac when I type 'ls' I end up with 'lss' in my terminal . What is wrong?

kpayson commented 3 years ago

I think the problem was that at some point while playing around or following some bad example, I put the terminal into insert mode with _this.child.write('\x9B4h');