0

I won't get into the major details, but here is the issue

I am connecting to an ANSI/VT100 server, and the server is sending the following:

<esc>[255B<esc>[255C_<esc>[6n

Now, my screen is 80x25 and based on the ansi specs this should put the cursor in the bottom left of the screen, and print out an _

This indeed what it does... but when I responde to the request for cursor location

 <esc>[6n 

the server seems to not like what I am returning.

I have tried returning

<esc>[25;80R   <esc>[25;81R <esc>[25;1R <esc>[25;0R 

as well as 24 for the row as well and the server doesn't seem to like any of them... What the heck should be the proper cursor location response after such codes.

Also it seems like the server is sending an

 <esc>!?HTML? 

as well but I can find no documentation on what this code means, I assume its some sort of inquiry, but I can't find it documented anywhere.

Speckpgh
  • 3,332
  • 1
  • 28
  • 46
  • Are *you* writing the terminal emulator? Otherwise why would you "return" control sequences? And [VT100](http://www.termsys.demon.co.uk/vtansi.htm) universally uses the semi-colon as a field separator. – Some programmer dude Apr 20 '15 at 16:59
  • Not sure what you are asking here, ; is being used as a field seperator in the appropriate codes. – Speckpgh Apr 20 '15 at 17:02
  • Oh sorry, didn't see the separator clearly before the edit. What I'm asking is, are you sending the cursor request (`[6n`), or are you responding to that request? On other words, are you writing an application program that uses the VT100 command sequences to control and query the terminal, or are you writing the actual terminal program? If you're writing a user-application, then why are you writing the `[x;yR` sequence? It's not quite clear what you are trying to do I think. – Some programmer dude Apr 20 '15 at 17:21
  • I am responding to the request... the first batch of esc sequences are what the server is sending, based on how I understand the code these moves the cursor to the last cell on the screen, 25th row 80th column, then the _ is printed in that location, which my code does fine, then the server is querying the cursor location.... I am returning the response, the second code block shows all the responses I have tried. – Speckpgh Apr 20 '15 at 17:24
  • I am writing a terminal program, so I have to handle processing and responding to all the ansi/vt100 codes. – Speckpgh Apr 20 '15 at 19:17

0 Answers0