Module ansi_control_codes::control_sequences
source · Expand description
Control Sequences.
A control sequence is a string of bit combinations starting with the control function Control Sequence Introducer
(CSI
), followed by one or more bit combinations representing parameters, if any, and by one or more bit
combinations identifying the control function. The control function CSI
itself is an element of the
C1 set.
Usage
You can use the control sequences inside normal strings, format them with the format!()
macro, or print
them with the print!()
and println!()
macros.
For example, move the cursor to line 5, character 13:
use ansi_control_codes::control_sequences::CUP;
print!("{}", CUP(Some(5), Some(13)));
Overview of the Control Sequences
Without Intermediate Bytes
Row Number | Column 04 | Column 05 | Column 06 |
---|---|---|---|
00 | ICH | DCH | HPA |
01 | CUU | SEE | HPR |
02 | CUD | CPR | REP |
03 | CUF | SU | DA |
04 | CUB | SD | VPA |
05 | CNL | NP | VPR |
06 | CPL | PP | HVP |
07 | CHA | CTC | TBC |
08 | CUP | ECH | SM |
09 | CHT | CVT | MC |
10 | ED | CBT | HPB |
11 | EL | SRS | VPB |
12 | IL | PTX | RM |
13 | DL | SDS | SGR |
14 | EF | SIMD | DSR |
15 | EA | – | DAQ |
With Intermediate Bytes 02/00
Row Number | Column 04 | Column 05 | Column 06 |
---|---|---|---|
00 | SL | PPA | TATE |
01 | SR | PPR | TALE |
02 | GSM | PPB | TAC |
03 | GSS | SPD | TCC |
04 | FNT | DTA | TSR |
05 | TSS | SLH | SCO |
06 | JFY | SLL | SRCS |
07 | SPI | FNK | SCS |
08 | QUAD | SPQR | SLS |
09 | SSU | SEF | – |
10 | PFS | PEC | – |
11 | SHS | SSW | SCP |
12 | SVS | SACS | – |
13 | IGS | SAPV | – |
14 | – | STAB | – |
15 | IDCS | GCC | – |
Note
As intended by the standard, notation of control functions is kept identical to the definitions in the standard. This means that functions in this rust module will not follow the standard snake_case rust naming convention, but instead follow the ECMA standard. This is intended.
Enums
- Valid parameter values to the function
QUAD
. - Valid parameter values to the function
DAQ
. - Valid parameter values to the function
SCO
. - Valid parameter values to the function
SCP
. - Valid parameter values to the function
SCP
. - Valid parameter values to the function
SHS
. - Valid parameter values to the function
TBC
. - Valid parameter values to the function
DA
. - Valid parameter values to the function
DSR
. - Valid parameter values to the function
SEE
. - Valid parameter values to the function
EA
. - Valid parameter values to the function
EF
. - Valid parameter values to the function
EL
. - Valid parameter values to the function
ED
. - Valid parameter values to the function
FNT
. - Valid parameter values to the function
GCC
. - Valid parameter values to the function
SGR
. - Valid parameter values to the function
IDCS
. - Valid parameter values to the function
JFY
. - Valid parameter values to the function
SLS
. - Valid parameter values to the function
SEF
. - Valid parameter values to the function
MC
. - Valid parameter values to the function
SIMD
. - Valid parameter values to the function
PFS
. - Valid parameter values to the function
PTX
. - Valid parameter values to the function
SPD
. - Valid parameter values to the function
SPD
. - Valid parameter values to the function
PEC
. - Valid parameter values to the function
SAPV
. - Valid parameter values to the function
SPQR
. - Valid parameter values to the function
SRS
. - Valid parameter values to the function
SSU
. - Valid parameter values to the function
SEF
. - Valid parameter values to the function
SDS
. - Valid parameter values to the function
CTC
.
Functions
- Cursor Backward Tabulation.
- Cursor Character Absolute.
- Cursor Forward Tabulation.
- Cursor Next Line.
- Cursor Preceding Line.
- Active Position Report.
- Cursor Tabulation Control.
- Cursor Left.
- Cursor Down.
- Cursor Right.
- Cursor Position.
- Cursor Up.
- Cursor Line Tabulation.
- Device Attributes.
- Define Area Qualification.
- Delete Character.
- Delete Line.
- Device Status Report.
- Dimension Text Area.
- Erase in Area.
- Erase Character.
- Erase In Page.
- Erase In Field.
- Erase In Line.
- Function Key.
- Font Selection.
- Graphic Character Combination
- Graphic Size Modification.
- Graphic Size Selection.
- Character Position Absolute.
- Character Position Backward.
- Character Position Forward.
- Character And Line Position.
- Insert Character.
- Identify Device Control String.
- Identify Graphic Subrepertoire.
- Insert Line.
- Justify.
- Media Copy.
- Next Page.
- Presentation Expand or Contract.
- Page Format Selection
- Preceding Page.
- Page Position Absolute.
- Page Position Backward.
- Page Position Forward.
- Parallel Texts.
- Quad.
- Repeat.
- Reset Mode.
- Set Additional Character Representation.
- Select Alternative Presentation Variants.
- Select Character Orientation.
- Select Character Path.
- Set Character Spacing.
- Scroll Down.
- Start Directed String.
- Select Editing Extent.
- Sheet Eject And Feed.
- Select Graphic Rendition.
- Select Character Spacing.
- Select Implicit Movement Direction.
- Scroll Left.
- Set Line Home.
- Set Line Limit.
- Set Line Spacing.
- Set Mode.
- Select Presentation Directions.
- Set Page Home.
- Spacing Increment.
- Set Page Limit.
- Select Print Quality and Rapidity.
- Scroll Right.
- Set Reduced Character Separation.
- Start Reversed String.
- Select Size Unit.
- Set Space Width.
- Selective Tabulation.
- Scroll Up.
- Select Line Spacing.
- Tabulation Aligned Centred.
- Tabulation Aligned Leading Edge.
- Tabulation Aligned Trailing Edge.
- Tabulation Clear.
- Tabulation Centred on Character.
- Tabulation Stop Remove.
- Thin Space Specification.
- Line Position Absolute.
- Line Position Backward.
- Line Position Forward.