foot-ctlseqs(7)
foot-ctlseqs - terminal control sequences supported by foot
Description
foot-ctlseqs
NAME
foot-ctlseqs - terminal control sequences supported by foot
DESCRIPTION
This document describes all the control sequences supported by foot.
• Control
characters
• Sequences beginning with ESC
• CSI - Control Sequence Introducer
- SGR
- Indexed and RGB colors (256-color palette and 24-bit
colors)
- Private modes
- Window manipulation
- Other
• OSC - Operating System Command
• DCS - Device Control String
Control characters

Sequences beginning with ESC
Note: this table excludes sequences where ESC is part of a 7-bit equivalent to 8-bit C1 controls.

CSI
All sequences begin with \E[, sometimes abbreviated "CSI". Spaces are used in the sequence strings to make them easier to read, but are not actually part of the string (i.e. \E[ 1 m is really \E[1m).
SGR
All SGR sequences are in the form \E[ N m, where N is a decimal number - the parameter. Multiple parameters can be combined in a single CSI sequence by separating them with semicolons: \E[ 1;2;3 m.

Indexed and RGB colors (256-color palette and 24-bit colors)
Foot supports both the new sub-parameter based variants, and the older parameter based variants for setting foreground and background colors.
Indexed colors:
• \E[
38 : 5 : idx m
• \E[ 38 ; 5 ; idx m
RGB colors:
• \E[
38 : 2 : cs : r : g
: b m
• \E[ 38 : 2 : r : g
: b m
• \E[ 38 ; 2 ; r ; g
; b m
The first variant is the "correct" one (and foot also recognizes, but ignores, the optional tolerance parameters).
The second one is allowed since many programs "forget" the color space ID, cs.
The sub-parameter based variants are preferred, and are what foot’s terminfo(5) entry uses.
Private Modes
There are several Boolean-like "modes" that affect certain aspects of the terminal’s behavior. These modes can be manipulated with the following 4 escape sequences:

The Pm parameter in the above sequences denotes a numerical ID that corresponds to one of the following modes:

Window manipulation
Foot implements a sub-set of XTerm’s (originally dtterm’s) window manipulation sequences. The generic format is:
\E[ Ps ; Ps ; Ps t

Other

OSC
All OSC sequences begin with \E], sometimes abbreviated OSC.

DCS
All DCS sequences begin with \EP (sometimes abbreviated DCS), and are terminated by \E\ (ST).

FOOTNOTE
Foot does not support 8-bit control characters ("C1").