ansicon/sequences.txt
Jason Hood e2f9b4e417 Add palette sequences
Recognise the xterm ESC]4 & ESC]104 OSC commands to set/reset colors.
Three color specs are recognised: `#RGB`, `#RRGGBB` and `R,G,B`; in
addition, multiple specs can be given (separated by commas) to
automatically increase the index.  I also allow `*` to query this index
and all subsequent ones.  Reset will restore the colors from when the
DLL was first loaded, not from the Console Properties.
2017-11-29 11:06:57 +10:00

163 lines
4.9 KiB
Plaintext

ANSICON
Version 1.80
This is a complete list of the ANSI escape sequences recognised by ANSICON,
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,
whilst "[2+J" will erase the buffer).
[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
[b repeat the previous character
[#b repeat the previous character # times
[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
[I move cursor forward one tab
[#I move cursor forward # tabs
[Z move cursor back one tab
[#Z move cursor back # tabs
[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
[u move cursor to saved position (or top-left, if nothing was saved)
[3h display control characters (LF is also performed)
[3l perform control functions (the only such recognised during above)
[?7h wrap lines at screen edge
[?7l don't wrap lines at screen edge
[?25h show cursor
[?25l hide cursor
[5n sends "\e[0n" to console input (where \e is escape)
[6n sends "\e[#;#R" (line & column) to console input
[21t sends "\e]lTitle\e\" (the console's window title) to console input
]0;TitleST
]2;TitleST
sets the console title to "Title"; ST (string terminator) is either
character 7 (BEL) or escape and backslash
]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
[#;#;#...,~
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