OBSERVAÇÃO: Isso é o que eu entendo, então pode ser um pouco difícil!
Os caracteres ^ [ normalmente significam a própria chave Escape. Isso é um controle ( ^ ) + um colchete aberto ( [).
excerto de caracteres de escape - caractere de escape ASCII
The ASCII "escape" character (octal: 3, hexadecimal: \x1B, or ^[, or, in decimal, 27) is used in many output devices to start a series of characters called a control sequence or escape sequence. Typically, the escape character was sent first in such a sequence to alert the device that the following characters were to be interpreted as a control sequence rather than as plain characters, then one or more characters would follow to specify some detailed action, after which the device would go back to interpreting characters normally. For example, the sequence of ^[, followed by the printable characters [2;10H, would cause a DEC VT102 terminal to move its cursor to the 10th cell of the 2nd line of the screen. This was later developed to ANSI escape codes covered by the ANSI X3.64 standard. The escape character also starts each command sequence in the Hewlett Packard Printer Command Language.
Em sistemas nos quais você está usando UTF-8, esta seqüência de escape é na verdade 2 caracteres, então agora é ^ [ seguido por um adicional [.
excerto de Código de escape ANSI - Elementos de Sequência
There is a single-character CSI (155/0x9B/0233) as well. The ESC+[ two-character sequence is more often used than the single-character alternative, for details see C0 and C1 control codes. Only the two-character sequence is recognized by devices that support just ASCII (7-bit bytes) or devices that support 8-bit bytes but use the 0x80–0x9F control character range for other purposes. On terminals that use UTF-8 encoding, both forms take 2 bytes (CSI in UTF-8 is 0xC2, 0x9B)[discuss] but the ESC+[ sequence is clearer.
Conhecendo as duas informações acima, isso tornaria sua seqüência de escape Esc + [ + D que parece ser uma grande surpresa , o caractere de retrocesso.
trecho de seqüências de escape ANSI
Esc[ValueD Cursor Backward: Moves the cursor back by the specified
number of columns without changing lines. If the cursor is
already in the leftmost column, ANSI.SYS ignores this
sequence.