Skip to main content

Module ctrl

Module ctrl 

Source
Expand description

Terminal reset, device-attribute, and version requests.

§Category

This module contains terminal-wide control sequences: RIS (ESC c), primary, secondary, and tertiary Device Attributes, and the XTVERSION query.

§CSI conventions

Device-attribute requests are 7-bit CSI sequences. Private prefixes (> and =) distinguish secondary and tertiary forms from primary DA.

§Mode interaction

These requests do not require a mode. RIS is destructive: it asks the terminal to reset state such as modes, colors, tabs, and character sets.

Constants§

REQUEST_PRIMARY_DA
Primary Device Attributes request: exact bytes ESC [ c (b"\x1b[c").
REQUEST_SECONDARY_DA
Secondary Device Attributes request: exact bytes ESC [ > c (b"\x1b[>c").
REQUEST_TERTIARY_DA
Tertiary Device Attributes request: exact bytes ESC [ = c (b"\x1b[=c").
REQUEST_XTVERSION
Terminal name/version request: exact bytes ESC [ > q (b"\x1b[>q").
RIS
Reset to Initial State: exact bytes ESC c (b"\x1bc").

Functions§

write_request_primary_da
Write the primary Device Attributes request ESC [ c.
write_request_secondary_da
Write the secondary Device Attributes request ESC [ > c.
write_request_tertiary_da
Write the tertiary Device Attributes request ESC [ = c.
write_request_xtversion
Write the terminal version request ESC [ > q.
write_ris
Write RIS, the ESC c Reset to Initial State control.