Skip to content

Emitting CRLF through ANSI escape sequences #15589

Answered by j4james
mataha asked this question in Q&A
Discussion options

You must be logged in to vote

Is there a way to make the terminal emit CRLF through ANSI escape sequences?

No. Modern terminals tend to avoid escape sequences that can be used to generate key presses because they are something of a security risk. For example, imagine you were trying to view a readme file in the console, and that file had an embedded escape sequence that injected the keystrokes for a command that would delete all of your files. You would not be happy.

Also, it's worth mentioning that the DA sequence won't always return \x1b[?1;0c. It's used to identify the terminal's capabilities, and we've progressed a lot since that document was written. Newer versions of the console will return something quite dif…

Replies: 1 comment 4 replies

Comment options

You must be logged in to vote
4 replies
@lhecker
Comment options

@j4james
Comment options

j4james Jun 22, 2023
Collaborator

@mataha
Comment options

@j4james
Comment options

j4james Jun 24, 2023
Collaborator

Answer selected by mataha
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
Issue-Feature Complex enough to require an in depth planning process and actual budgeted, scheduled work. Needs-Triage It's a new issue that the core contributor team needs to triage at the next triage meeting Needs-Tag-Fix Doesn't match tag requirements
3 participants
Converted from issue

This discussion was converted from issue #15588 on June 22, 2023 00:41.