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 NumberColumn 04Column 05Column 06
00ICHDCHHPA
01CUUSEEHPR
02CUDCPRREP
03CUFSUDA
04CUBSDVPA
05CNLNPVPR
06CPLPPHVP
07CHACTCTBC
08CUPECHSM
09CHTCVTMC
10EDCBTHPB
11ELSRSVPB
12ILPTXRM
13DLSDSSGR
14EFSIMDDSR
15EADAQ

With Intermediate Bytes 02/00

Row NumberColumn 04Column 05Column 06
00SLPPATATE
01SRPPRTALE
02GSMPPBTAC
03GSSSPDTCC
04FNTDTATSR
05TSSSLHSCO
06JFYSLLSRCS
07SPIFNKSCS
08QUADSPQRSLS
09SSUSEF
10PFSPEC
11SHSSSWSCP
12SVSSACS
13IGSSAPV
14STAB
15IDCSGCC

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

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.