rickparrish/fTelnet

MessyCodes

Closed this issue · 4 comments

Thank you so much for your project!
I am using the latest version of fTelnet and fTelnetProxy . I run fTelnetProxy on my PC, then I open the "index.html" in the directory "fTelnet\fTelnet-master\release".Everything seems ok at first.But when I try to edit something in the telnet screen , I find some problems.
First,when I press UP_ARROW/DOWN_ARROW/LEFT_ARROW/RIGHT_ARROW key,it shows some messy codes in the screen,you can see it in the picture 'problem1.png';
problem1
Second,when I press Backspace key on the keyboard , it doesn't work like it should do,please look at the picture 'problem2.png';
problem2
Third,some messy codes show on the screen like the picture I upload named 'problem3.png'. I find where the problem is. In your source code ,you don't deal with the Control Code "<ESC>7"&"<ESC>8" which represents "save current cursor position" and "restores cursor position after a Save Cursor ".
problem3

fTelnet is meant for use with BBS software, and so supports the sequences that are commonly used by them. I'm guessing the device you're connecting to expects a VT-100 compatible client, which fTelnet is not.

Handling ESC 7 and ESC 8 will require some changes, because the current parser only handles sequences where [ follows ESC, but should be doable.

As for the arrow keys, I'm not sure what's going on there. They send the sequence ESC [ A (or B or C or D), so I'm not sure what would cause the characters for 0x01, 0x02, 0x03 and 0x04 to appear. If you find out what sequence the device wants, I could probably add an option to fTelnet where you can specify which sequence to send.

So excited that you replied!
I tested again and found that the problem about the arrow keys is not a problem.I telneted the device on my own PC and it was the same as fTelnet.Sorry about that.
About the "ESC 7 and ESC 8" and the Backspace problem(maybe they are one problem),can you please help me with it. I've been reading your source code for days,but because of my lack of related knowlege,I'm afraid that it is beyond my ability.I would be very grateful.
By the way,can I get your Facebook or Twitter account so we can communicate easily?

Hello, Rick
I spent more time dealing with ESC7 and ESC8 escape sequences, but I did not find a solution. I checked a lot of information online, but did not find a reference for the treatment or theoretical knowledge.
I need your help:-(

Sorry for not coming back to this sooner. I'm going to assume you found a solution, or switched to using something else, and am going to close this issue. If you are still using it and could use the ESC7 and ESC8 assistance let me know and I'll take a look.