Please confirm that Simple Cursor Positioning (ESC A B C D) sequences are not supported (while ESC F is) #12677

Closed
opened 2026-01-31 03:21:58 +00:00 by claunia · 6 comments
Owner

Originally created by @zzwx on GitHub (Feb 21, 2021).

Environment

Windows build number: Win32NT 10.0.19041.0 Microsoft Windows NT 10.0.19041.0
Windows Terminal version (if applicable): 1.5.10411.0

Steps to reproduce

  • Print ESC A, ESC B, ESC C, ESC D in Windows Terminal. (CUU, CUD, CUF, CUB)
  • Print them in regular PowerShell or Command Prompt and observe the difference.

For example, TestC. will output Test. without space in Windows Terminal, and Test . in a regular PowerShell / Command Prompt.

Expected behavior

Those sequences should move the cursor within the window dimensions as described at https://docs.microsoft.com/en-us/windows/console/console-virtual-terminal-sequences#simple-cursor-positioning.

Actual behavior

Printing ESC A, ESC B, ESC C, ESC D seems do nothing, however ESC F is supported.

Originally created by @zzwx on GitHub (Feb 21, 2021). # Environment ```none Windows build number: Win32NT 10.0.19041.0 Microsoft Windows NT 10.0.19041.0 Windows Terminal version (if applicable): 1.5.10411.0 ``` # Steps to reproduce * Print `ESC A`, `ESC B`, `ESC C`, `ESC D` in Windows Terminal. (CUU, CUD, CUF, CUB) * Print them in regular PowerShell or Command Prompt and observe the difference. For example, `TestC.` will output `Test.` without space in Windows Terminal, and `Test .` in a regular PowerShell / Command Prompt. # Expected behavior Those sequences should move the cursor within the window dimensions as described at https://docs.microsoft.com/en-us/windows/console/console-virtual-terminal-sequences#simple-cursor-positioning. # Actual behavior Printing `ESC A`, `ESC B`, `ESC C`, `ESC D` seems do nothing, however `ESC F` is supported.
claunia added the Needs-TriageNeeds-Tag-Fix labels 2026-01-31 03:21:58 +00:00
Author
Owner

@j4james commented on GitHub (Feb 21, 2021):

Those cursor movement controls are actually VT52 escape sequences, which should only work when the VT52 mode is enabled (in ANSI mode they are undefined or do something else). The original console implementation incorrectly interpreted them as cursor movement regardless of the mode, but Windows Terminal has since been updated with the correct behaviour. The documentation still needs updating.

@j4james commented on GitHub (Feb 21, 2021): Those cursor movement controls are actually VT52 escape sequences, which should only work when the VT52 mode is enabled (in ANSI mode they are undefined or do something else). The original console implementation incorrectly interpreted them as cursor movement regardless of the mode, but Windows Terminal has since been updated with the correct behaviour. The documentation still needs updating.
Author
Owner

@zzwx commented on GitHub (Feb 21, 2021):

Good to know, thank you! Does the repo actually have a place with a list of supported sequences? I couldn't find them unfortunately (must be blind).

@zzwx commented on GitHub (Feb 21, 2021): Good to know, thank you! Does the repo actually have a place with a list of supported sequences? I couldn't find them unfortunately (must be blind).
Author
Owner

@vefatica commented on GitHub (Feb 21, 2021):

Using the OpenConsole.exe from Windows Terminal Preview Version: 1.6.10412.0 as if it were conhost.exe, ^eD does a cursor down (which does not agree with any documentation I've seen). Is that right?

image

@vefatica commented on GitHub (Feb 21, 2021): Using the OpenConsole.exe from Windows Terminal Preview Version: 1.6.10412.0 as if it were conhost.exe, ^eD does a cursor down (which does not agree with any documentation I've seen). Is that right? ![image](https://user-images.githubusercontent.com/61856645/108641604-0e4bb800-746e-11eb-9998-3ee4a60e2254.png)
Author
Owner

@j4james commented on GitHub (Feb 22, 2021):

Does the repo actually have a place with a list of supported sequences?

There's a PowerShell script at doc/reference/Build-SupportedSequenceIndex.ps1 which attempts to generate a list of the supported sequences by scanning the source code. It's not perfect, but that's probably the best we have.

Using the OpenConsole.exe from Windows Terminal Preview Version: 1.6.10412.0 as if it were conhost.exe, ^eD does a cursor down (which does not agree with any documentation I've seen). Is that right?

That's correct. That's the IND (Index) escape sequence.

@j4james commented on GitHub (Feb 22, 2021): > Does the repo actually have a place with a list of supported sequences? There's a PowerShell script at `doc/reference/Build-SupportedSequenceIndex.ps1` which attempts to generate a list of the supported sequences by scanning the source code. It's not perfect, but that's probably the best we have. > Using the OpenConsole.exe from Windows Terminal Preview Version: 1.6.10412.0 as if it were conhost.exe, ^eD does a cursor down (which does not agree with any documentation I've seen). Is that right? That's correct. That's the [`IND`](https://vt100.net/docs/vt510-rm/IND.html) (Index) escape sequence.
Author
Owner

@DHowett commented on GitHub (Feb 22, 2021):

James is right - these were erroneously supported outside of VT52 mode until #4044 (conhost in windows builds 19603+). We have a list in the Windows Console docs (which you found!) that's somewhat out-of-date, but we're working to bring it up to date and add some finer-grained version callouts.

We also have some stuff in the repo that will generate a list of currently supported sequences, but that doesn't spit out a build artifact anywhere. Unfortunate.

Whoop, @j4james beat me to commenting. 😀

@DHowett commented on GitHub (Feb 22, 2021): James is right - these were erroneously supported outside of VT52 mode until #4044 (conhost in windows builds 19603+). We have a list [in the Windows Console docs](https://docs.microsoft.com/en-us/windows/console/console-virtual-terminal-sequences) (which you found!) that's somewhat out-of-date, but we're working to bring it up to date and add some finer-grained version callouts. We also have some stuff in the repo that will generate a list of _currently_ supported sequences, but that doesn't spit out a build artifact anywhere. Unfortunate. Whoop, @j4james beat me to commenting. 😀
Author
Owner

@vefatica commented on GitHub (Feb 22, 2021):

That's correct. That's the IND (Index) escape sequence.

Thanks. I didn't know about that one. My only reference is the console doc that @DHowett just mentioned.

@vefatica commented on GitHub (Feb 22, 2021): > That's correct. That's the IND (Index) escape sequence. Thanks. I didn't know about that one. My only reference is the console doc that @DHowett just mentioned.
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: starred/terminal#12677