Skip to main content

Module focus

Module focus 

Source
Expand description

Focus-event report sequences.

§Category

When focus tracking is enabled, terminals send CSI I on focus gain and CSI O on focus loss. The constants expose those inbound byte sequences, and the writers can replay them in tests or recordings.

§CSI conventions

Both reports use the 7-bit CSI introducer with no parameters: ESC [ I and ESC [ O.

§Mode interaction

Focus reports are controlled by Mode::FOCUS (DEC private mode 1004). Applications enable the mode with crate::ansi::mode::write_set_mode and then parse these reports from input.

Constants§

BLUR
Focus-lost report: exact bytes ESC [ O (b"\x1b[O").
FOCUS
Focus-gained report: exact bytes ESC [ I (b"\x1b[I").

Functions§

write_blur
Write the focus-lost report bytes ESC [ O.
write_focus
Write the focus-gained report bytes ESC [ I.