2012-11-24 23:41:29 +10:00
|
|
|
|
|
|
|
ANSICON
|
2017-11-19 12:07:28 +10:00
|
|
|
Version 1.80
|
2012-11-24 23:41:29 +10:00
|
|
|
|
|
|
|
This is a complete list of the ANSI escape sequences recognised by ANSICON,
|
2017-11-23 12:06:33 +10:00
|
|
|
roughly ordered by function. The initial escape character is assumed. The
|
|
|
|
display consists of the buffer width and window height; add '+' before the
|
|
|
|
final character to use the buffer height (e.g. "[2J" will erase the window,
|
2017-11-30 11:38:15 +10:00
|
|
|
whilst "[2+J" will erase the buffer). BEL will also be recognised, playing
|
|
|
|
the Windows default beep (but only if it's not already playing).
|
2012-11-24 23:41:29 +10:00
|
|
|
|
|
|
|
|
|
|
|
[m restore default color (and intensity)
|
|
|
|
[0m as above
|
|
|
|
[...m set attributes (any of these numbers, separated by semicolons):
|
|
|
|
0 all attributes off
|
|
|
|
1 bold (foreground is intense)
|
|
|
|
4 underline (background is intense)
|
|
|
|
5 blink (background is intense)
|
|
|
|
7 reverse video
|
|
|
|
8 concealed (foreground becomes background)
|
|
|
|
22 bold off (foreground is not intense)
|
|
|
|
24 underline off (background is not intense)
|
|
|
|
25 blink off (background is not intense)
|
|
|
|
27 normal video
|
|
|
|
28 concealed off
|
|
|
|
30 foreground black
|
|
|
|
31 foreground red
|
|
|
|
32 foreground green
|
|
|
|
33 foreground yellow
|
|
|
|
34 foreground blue
|
|
|
|
35 foreground magenta
|
|
|
|
36 foreground cyan
|
|
|
|
37 foreground white
|
|
|
|
39 default foreground (using current intensity)
|
|
|
|
40 background black
|
|
|
|
41 background red
|
|
|
|
42 background green
|
|
|
|
43 background yellow
|
|
|
|
44 background blue
|
|
|
|
45 background magenta
|
|
|
|
46 background cyan
|
|
|
|
47 background white
|
|
|
|
49 default background (using current intensity)
|
|
|
|
|
|
|
|
[J erase from cursor to the end of display
|
|
|
|
[0J as above
|
|
|
|
[1J erase from the start of diplay to cursor (inclusive)
|
|
|
|
[2J erase display and move cursor to the top-left
|
|
|
|
|
|
|
|
[K erase from cursor to the end of line
|
|
|
|
[0K as above
|
|
|
|
[1K erase from the start of line to cursor (inclusive)
|
|
|
|
[2K erase line
|
|
|
|
|
|
|
|
[X erase one character
|
|
|
|
[#X erase # characters
|
|
|
|
|
|
|
|
[L insert one blank line
|
|
|
|
[#L insert # blank lines
|
|
|
|
|
|
|
|
[M delete one line
|
|
|
|
[#M delete # lines
|
|
|
|
|
|
|
|
[P delete one character
|
|
|
|
[#P delete # characters
|
|
|
|
|
|
|
|
[@ insert one blank character
|
|
|
|
[#@ insert # blank characters
|
|
|
|
|
Recognise more sequences; ignore newline immediately after wrap.
Added support for CHT & CBT (move forward/backward by tabs), DECAWM (don't
wrap at EOL), CRM (display control characters, but still perform newline)
and REP (repeat last character, including BEL, BS, TAB, LF and CR).
It always bugged me that newline would add an unneeded blank line due to
wrap, but not enough to do anything about it. For some reason, adding CRM
got me to thinking about it, so I finally did it.
Stopped \e[K from erasing the first character of the next line.
Restore cursor visibility on unload.
2014-02-26 21:18:45 +10:00
|
|
|
[b repeat the previous character
|
|
|
|
[#b repeat the previous character # times
|
|
|
|
|
2017-12-03 12:50:13 +10:00
|
|
|
D move cursor down one line (scroll if necessary; always uses buffer)
|
|
|
|
E same as LF
|
|
|
|
M move cursor up one line (scroll if necessary; always uses buffer)
|
|
|
|
|
2012-11-24 23:41:29 +10:00
|
|
|
[A move cursor up one line
|
|
|
|
[#A move cursor up # lines
|
|
|
|
[B move cursor down one line
|
|
|
|
[#B move cursor down # lines
|
|
|
|
[C move cursor right one character
|
|
|
|
[#C move cursor right # characters
|
|
|
|
[D move cursor left one character
|
|
|
|
[#D move cursor left # characters
|
Recognise more sequences; ignore newline immediately after wrap.
Added support for CHT & CBT (move forward/backward by tabs), DECAWM (don't
wrap at EOL), CRM (display control characters, but still perform newline)
and REP (repeat last character, including BEL, BS, TAB, LF and CR).
It always bugged me that newline would add an unneeded blank line due to
wrap, but not enough to do anything about it. For some reason, adding CRM
got me to thinking about it, so I finally did it.
Stopped \e[K from erasing the first character of the next line.
Restore cursor visibility on unload.
2014-02-26 21:18:45 +10:00
|
|
|
[I move cursor forward one tab
|
|
|
|
[#I move cursor forward # tabs
|
|
|
|
[Z move cursor back one tab
|
|
|
|
[#Z move cursor back # tabs
|
2012-11-24 23:41:29 +10:00
|
|
|
|
|
|
|
[k move cursor up one line
|
|
|
|
[#k move cursor up # lines
|
|
|
|
[e move cursor down one line
|
|
|
|
[#e move cursor down # lines
|
|
|
|
[a move cursor right one character
|
|
|
|
[#a move cursor right # characters
|
|
|
|
[j move cursor left one character
|
|
|
|
[#j move cursor left # characters
|
|
|
|
|
|
|
|
[E move cursor down one line and to first column
|
|
|
|
[#E move cursor down # lines and to first column
|
|
|
|
[F move cursor up one line and to first column
|
|
|
|
[#F move cursor up # lines and to first column
|
|
|
|
|
|
|
|
[G move cursor to first column
|
|
|
|
[#G move cursor to column #
|
|
|
|
|
|
|
|
[` move cursor to first column
|
|
|
|
[#` move cursor to column #
|
|
|
|
|
|
|
|
[d move cursor to first line
|
|
|
|
[#d move cursor to line #
|
|
|
|
|
|
|
|
[H move cursor to top-left
|
|
|
|
[#H move cursor to line # and first column
|
|
|
|
[#;#H move cursor to line #, column #
|
|
|
|
|
|
|
|
[f move cursor to top-left
|
|
|
|
[#f move cursor to line # and first column
|
|
|
|
[#;#f move cursor to line #, column #
|
|
|
|
|
|
|
|
[s save cursor position
|
2017-12-09 11:11:52 +10:00
|
|
|
7 as above
|
Recognise more sequences; ignore newline immediately after wrap.
Added support for CHT & CBT (move forward/backward by tabs), DECAWM (don't
wrap at EOL), CRM (display control characters, but still perform newline)
and REP (repeat last character, including BEL, BS, TAB, LF and CR).
It always bugged me that newline would add an unneeded blank line due to
wrap, but not enough to do anything about it. For some reason, adding CRM
got me to thinking about it, so I finally did it.
Stopped \e[K from erasing the first character of the next line.
Restore cursor visibility on unload.
2014-02-26 21:18:45 +10:00
|
|
|
[u move cursor to saved position (or top-left, if nothing was saved)
|
2017-12-09 11:11:52 +10:00
|
|
|
8 as above
|
2012-11-24 23:41:29 +10:00
|
|
|
|
2017-12-09 21:01:13 +10:00
|
|
|
(0 select the DEC Special Graphics Character Set
|
|
|
|
(B select ASCII
|
|
|
|
|
Recognise more sequences; ignore newline immediately after wrap.
Added support for CHT & CBT (move forward/backward by tabs), DECAWM (don't
wrap at EOL), CRM (display control characters, but still perform newline)
and REP (repeat last character, including BEL, BS, TAB, LF and CR).
It always bugged me that newline would add an unneeded blank line due to
wrap, but not enough to do anything about it. For some reason, adding CRM
got me to thinking about it, so I finally did it.
Stopped \e[K from erasing the first character of the next line.
Restore cursor visibility on unload.
2014-02-26 21:18:45 +10:00
|
|
|
[3h display control characters (LF is also performed)
|
|
|
|
[3l perform control functions (the only such recognised during above)
|
2017-12-09 11:11:52 +10:00
|
|
|
[?3h set 132 columns
|
|
|
|
[?3l restore original columns
|
Recognise more sequences; ignore newline immediately after wrap.
Added support for CHT & CBT (move forward/backward by tabs), DECAWM (don't
wrap at EOL), CRM (display control characters, but still perform newline)
and REP (repeat last character, including BEL, BS, TAB, LF and CR).
It always bugged me that newline would add an unneeded blank line due to
wrap, but not enough to do anything about it. For some reason, adding CRM
got me to thinking about it, so I finally did it.
Stopped \e[K from erasing the first character of the next line.
Restore cursor visibility on unload.
2014-02-26 21:18:45 +10:00
|
|
|
[?7h wrap lines at screen edge
|
|
|
|
[?7l don't wrap lines at screen edge
|
2012-11-24 23:41:29 +10:00
|
|
|
[?25h show cursor
|
|
|
|
[?25l hide cursor
|
2017-12-09 11:11:52 +10:00
|
|
|
[?95h don't clear screen when changing columns
|
|
|
|
[?95l clear screen when changing columns
|
2012-11-24 23:41:29 +10:00
|
|
|
|
2017-12-09 11:11:52 +10:00
|
|
|
[c sends "\e[?62;1c" to console input (where \e is escape)
|
|
|
|
[0c as above
|
|
|
|
[5n sends "\e[0n" to console input
|
2012-11-24 23:41:29 +10:00
|
|
|
[6n sends "\e[#;#R" (line & column) to console input
|
|
|
|
[21t sends "\e]lTitle\e\" (the console's window title) to console input
|
|
|
|
]0;TitleST
|
2014-02-18 21:34:39 +10:00
|
|
|
]2;TitleST
|
2012-11-24 23:41:29 +10:00
|
|
|
sets the console title to "Title"; ST (string terminator) is either
|
|
|
|
character 7 (BEL) or escape and backslash
|
2017-11-29 11:06:57 +10:00
|
|
|
]4;#;spec,spec...;#...ST
|
|
|
|
set or query the palette:
|
|
|
|
# is the ANSI index (0-7, or 8-15 for bold/underline)
|
|
|
|
spec is:
|
|
|
|
? send the current value to console input
|
|
|
|
* send the current and all subsequent values
|
|
|
|
#RGB set the color (hexadecimal)
|
|
|
|
#RRGGBB set the color (hexadecimal)
|
|
|
|
R,G,B set the color (decimal)
|
|
|
|
]104ST restore the entire palette
|
|
|
|
]104;#...ST
|
|
|
|
restore the color of each index
|
2017-11-19 12:07:28 +10:00
|
|
|
|
|
|
|
[#;#;#...,~
|
|
|
|
play sound (beep):
|
|
|
|
the first value is volume: 0 is silence, anything else is ignored
|
|
|
|
the second value is duration: up to and including 48 is in 1/32 of a
|
|
|
|
second; anything else is milliseconds (maximum of 8000)
|
|
|
|
the remaining values (if any; 14 allowed) are notes or frequencies:
|
|
|
|
Value Note Freq Value Note Freq Value Note Freq
|
|
|
|
0 silence 0 9 G#5/Ab5 830 18 F6 1396
|
|
|
|
1 C5 524 10 A5 880 19 F#6/Gb6 1480
|
|
|
|
2 C#5/Db5 554 11 A#5/Bb5 932 20 G6 1568
|
|
|
|
3 D5 588 12 B5 988 21 G#6/Ab6 1662
|
|
|
|
4 D#5/Eb5 622 13 C6 1046 22 A6 1760
|
|
|
|
5 E5 660 14 C#6/Db6 1108 23 A#6/Bb6 1864
|
|
|
|
6 F5 698 15 D6 1174 24 B6 1976
|
|
|
|
7 F#5/Gb5 740 16 D#6/Eb6 1244 25 C7 2094
|
|
|
|
8 G5 784 17 E6 1318
|
2017-11-30 11:38:15 +10:00
|
|
|
|
|
|
|
P...ST ignored (Device Control String)
|
|
|
|
X...ST ignored (Start Of String)
|
|
|
|
^...ST ignored (Privacy Message)
|
|
|
|
_...ST ignored (Application Program Command)
|
|
|
|
|
|
|
|
Any of space and !"#$%&'()*+,-./, possibly repeated, followed by anything else,
|
|
|
|
will be ignored.
|