Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Feature request: Control cursor position in Serial Monitor #1897

Closed
toranlo opened this issue Feb 20, 2023 · 1 comment
Closed

Feature request: Control cursor position in Serial Monitor #1897

toranlo opened this issue Feb 20, 2023 · 1 comment
Assignees
Labels
conclusion: duplicate Has already been submitted topic: code Related to content of the project itself topic: serial monitor Related to the Serial Monitor type: enhancement Proposed improvement

Comments

@toranlo
Copy link

toranlo commented Feb 20, 2023

Hi,
Currently in Serial Port (Arduino IDE 2.0.3) it is only possible to print text lines with LineFeed (“\n”) and auto scroll. It would be very useful to be able to control the position of the cursor to print continuously in the same lines (overwriting) without making scroll. For example in a measurement sketch to print the results in several lines (the same lines without scroll) like in a LCD display.
This cursor control position can be done using the well-known VT100 escape sequences. I suggest a minimal implementation and an enhance one.

  1. Minimal implementation (Carriage Return and Cursor Up one line)
    It is enough for most of sketches. “\x1b” represents the Esc character.
    “\n” or “\r\n” Line feed and Carriage Return (like is currently implemented).
    “\r” Carriage Return without Linefeed
    “\x1b[A” Moves the cursor one line up

  2. Enhance implementation (Full cursor control)
    The previous minimal implementation plus the following escape sequences (N represents a decimal number):
    “\x1b[NA” Moves the cursor N lines UP
    “\x1b[NB” Moves the cursor N lines DOWN
    “\x1b[NC” Moves the cursor forward by N columns
    “\x1b[ND” Moves the cursor backwards by N columns

Thank you very much

@per1234 per1234 transferred this issue from arduino/Arduino Feb 20, 2023
@per1234 per1234 self-assigned this Feb 20, 2023
@per1234 per1234 added type: enhancement Proposed improvement topic: code Related to content of the project itself topic: serial monitor Related to the Serial Monitor labels Feb 20, 2023
@per1234
Copy link
Contributor

per1234 commented Feb 20, 2023

Hi @toranlo. Thanks for taking the time to submit an issue.

I see we already had prior requests for this or similar features, which were declined:

There is a different take on adding such support here: #406

It is best to have only a single issue per subject so we can consolidate all relevant discussion to one place, so I'll go ahead and close this in favor of the other.

If you end up with additional information to share, feel free to comment in the other thread.

@per1234 per1234 closed this as not planned Won't fix, can't repro, duplicate, stale Feb 20, 2023
@per1234 per1234 added the conclusion: duplicate Has already been submitted label Feb 20, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
conclusion: duplicate Has already been submitted topic: code Related to content of the project itself topic: serial monitor Related to the Serial Monitor type: enhancement Proposed improvement
Projects
None yet
Development

No branches or pull requests

2 participants