CoolTerm ... Pls support ESC CursorHome :)

If you have specific questions or problems with any of my Freeware applications, post them here.
junglewiz
Posts: 1
Joined: Tue Dec 01, 2020 3:55 pm

CoolTerm ... Pls support ESC CursorHome :)

Post by junglewiz »

Hi Roger,
My search for a great serial port monitor program has landed me to CoolTerm ... and yes I have tried many many many other terminal programs.
All these serial programs meeting most of my NEEDED criteria but not all. It would seem that if CoolTerm could support 1 (yes one!) terminal ESC command I would have found my serial port monitor program of choice ... and I would gladly donate in appreciation.

The HW I connect to ... streams out needed realtime information to monitor the HW status (ie once I send a serial command the HW forever sends out the repeating stream)
It starts the stream with:

Esc[;H Move cursor to upper left corner cursorhome

This ANSI VT100 Esc sequence tries to position the display to 0,0 for a new "raster" scan of the monitored data from the HW.
The fact that CoolTerm will support multiple serial ports ... coupled with support for this ONE escape command would be the ANSWER

Thanks for your con$ideration :)
Junglewiz
User avatar
roger
Site Admin
Posts: 431
Joined: Fri Apr 24, 2009 12:41 am
Contact:

Re: CoolTerm ... Pls support ESC CursorHome :)

Post by roger »

Hi,

The TextArea control CoolTerm uses doesn't support moving the cursor to specific coordinates and over writing characters. However, would it suffice it CoolTerm cleared the screen whenever it receives Esc[;H? This would effectively move the cursor to the top left corner. I think this is something that could be done.

Roger
jmuhammad
Posts: 14
Joined: Wed Aug 17, 2022 10:21 pm

Re: CoolTerm ... Pls support ESC CursorHome :)

Post by jmuhammad »

Greetings all,
My first post. I just discovered CoolTerm and so far I like it! The short reply is that I would love it if CoolTerm could clear the screen upon receiving specific characters.

Before this I was using TeraTerm for a month and I did like that I could have Arduino send a couple of VT100 codes that could move cursor or clear screen. Here is what I had defined:

lchar gChr_CLS[] = {0x1b, '[', '2', 'J', 0};
lchar gChr_CTRLHOME[] = {0x1b, '[', '1', ';', '1', 'H', 0};

Basically, clear screen was ESC_[_2_J_0
Basically goto 1,1 was ESC_[_1_;_1_H_0

This is because clear screen doesn't in and of itself mean the cursor would be homed.

Thanks for considering. Can the clear screen and/or goto 1,1 be implemented soon?

JMuhammad
jmuhammad
Posts: 14
Joined: Wed Aug 17, 2022 10:21 pm

Re: CoolTerm ... Pls support ESC CursorHome :)

Post by jmuhammad »

Greetings all,

Sorry, I just saw in CoolTerm>>Options>>Terminal that ASCII 12 can be used to clear screen.
I implemented it and it works nicely!

Just an aside, my terminal tool woes are mostly gone now thanks to CoolTerm. TeraTerm did not actually close the port upon disconnect so was fighting when time came to upload new code or switch monitoring (e.g. Arduino's monitor). I'll do search to see if "always on top" has been requested.
User avatar
roger
Site Admin
Posts: 431
Joined: Fri Apr 24, 2009 12:41 am
Contact:

Re: CoolTerm ... Pls support ESC CursorHome :)

Post by roger »

jmuhammad wrote:Greetings all,

Sorry, I just saw in CoolTerm>>Options>>Terminal that ASCII 12 can be used to clear screen.
I implemented it and it works nicely!

Just an aside, my terminal tool woes are mostly gone now thanks to CoolTerm. TeraTerm did not actually close the port upon disconnect so was fighting when time came to upload new code or switch monitoring (e.g. Arduino's monitor). I'll do search to see if "always on top" has been requested.
Thanks for your feedback. You'll be happy to learn that the next release will support a few select escape sequences (such e.g. as ESC[;H to clear the screen). It will also include an option to always keep the terminal window on top.
jmuhammad
Posts: 14
Joined: Wed Aug 17, 2022 10:21 pm

Re: CoolTerm ... Pls support ESC CursorHome :)

Post by jmuhammad »

roger wrote:
jmuhammad wrote:Greetings all,

Sorry, I just saw in CoolTerm>>Options>>Terminal that ASCII 12 can be used to clear screen.
I implemented it and it works nicely!

Just an aside, my terminal tool woes are mostly gone now thanks to CoolTerm. TeraTerm did not actually close the port upon disconnect so was fighting when time came to upload new code or switch monitoring (e.g. Arduino's monitor). I'll do search to see if "always on top" has been requested.
Thanks for your feedback. You'll be happy to learn that the next release will support a few select escape sequences (such e.g. as ESC[;H to clear the screen). It will also include an option to always keep the terminal window on top.
I look forward to it, it'd really help me!
Right now my application waits 5 seconds then sends keyboard emulation CTRL+HOME to CoolTerm. I have large fixed buffer of time to allow my whole report to be sent to CoolTerm before going to top of screen. With a 'hot character' I can just send that at the end of my report -- whether it is 3 lines or 300 lines -- and CoolTerm will go to top exactly when it needs to.
jmuhammad
Posts: 14
Joined: Wed Aug 17, 2022 10:21 pm

Re: CoolTerm ... Pls support ESC CursorHome :)

Post by jmuhammad »

Greetings Roger,
Just updated to v2.0.0.
Nice update, thanks.

How can I configure CT to convert receipt of ESC[1;1H[ (or any character sequence) to CTRL+HOME the display?
User avatar
roger
Site Admin
Posts: 431
Joined: Fri Apr 24, 2009 12:41 am
Contact:

Re: CoolTerm ... Pls support ESC CursorHome :)

Post by roger »

jmuhammad wrote:How can I configure CT to convert receipt of ESC[1;1H[ (or any character sequence) to CTRL+HOME the display?
Go to the "Data Handling" section of the settings and enable the "Clear Display on: ESC[;H" option. Note that CoolTerm specifically looks for ESC[;H (or 1B 5B 3B 48 in hex). ESC[;1H won't work.
jmuhammad
Posts: 14
Joined: Wed Aug 17, 2022 10:21 pm

Re: CoolTerm ... Pls support ESC CursorHome :)

Post by jmuhammad »

roger wrote:
jmuhammad wrote:How can I configure CT to convert receipt of ESC[1;1H[ (or any character sequence) to CTRL+HOME the display?
Go to the "Data Handling" section of the settings and enable the "Clear Display on: ESC[;H" option. Note that CoolTerm specifically looks for ESC[;H (or 1B 5B 3B 48 in hex). ESC[;1H won't work.
I don't want to clear the display --and I already have a separate time and condition to do just that...sending ASCII 12-- I just want to scroll to top of display. Right now I can send CTRL+HOME to CT from AHK GUI but I wait a fixed amount of time before doing so because I have to wait until my EEPROM report has been completely transmitted fr microcontroller (at which point I have a 'wait() until specific keypress' statement) then by scrolling CT all the way to top I can review the report then press {key} to continue.

...or is there a way for CT (macro?) to transmit a character or sequence of characters when it receives a specific character or sequence of characters? Then I can, as I am doing now, activate CT and sendkeys CTRL+HOME (i.e. Send, ^{Home}), except now I would know exactly when to do it (vs using fixed 5 second delay) and the uC can do it through its UART vs me sending from AHK GUI.

Edit: FYI, ESC[1;1H is like a goto(x,y) where "1;1" is goto(x=column 1, y=row 1) but most usages just want to ctrl+home where the top left corner is 1,1 according the ANSI X3.64 standard.
User avatar
roger
Site Admin
Posts: 431
Joined: Fri Apr 24, 2009 12:41 am
Contact:

Re: CoolTerm ... Pls support ESC CursorHome :)

Post by roger »

I'm afraid CoolTerm will not be able to do exactly what you would like it to do. The plain text display is merely a container that displays the contents of the received buffer in human readable form. New data is always appended to the end of the receive buffer, after which the display is updated. This implementation doesn't lend itself to move the cursor around in the display and thereby changing the point where new data is inserted. The only way to get the cursor (and thus the point where new data is added) to the top left corner is to clear the buffer. In that regard it's very different from the display you would find in a proper terminal emulation application.
So, "clear screen" is something I was able to implement given these constraints. However, "goto 1,1" is not something I'm going to be able to do.
Post Reply