onUnknownSequence property
Diagnostic hook for escape sequences the parser does not recognise.
This fires for sequences the terminal deliberately ignores — an
unknown ESC dispatch, an unrecognised CSI final byte, an
unrecognised OSC Ps, or a DCS payload that matches no known
request. Ignoring unrecognised input is correct terminal behaviour and
this callback does not change that; it only lets you observe it.
raw contains the sequence as received, including the leading ESC,
formatted for readability (control bytes rendered as ^0x.., ESC
spelled out, etc.) rather than as literal control characters.
This is a diagnostic tool meant for answering "why isn't my escape sequence working?" during development. It is not intended to be left enabled in production: building the diagnostic text has a real cost, paid only when this callback is set.
Implementation
void Function(String raw)? onUnknownSequence;