Skip to main content

legacy_lints

Function legacy_lints 

Source
pub fn legacy_lints<A>(keymap: &Keymap<A>) -> Vec<LegacyLint>
Expand description

Reports every bound chord in keymap that will not survive a legacy 7-bit (C0) terminal, derived purely from KeyInput::legacy_form — a structural fact needing no terminal measurement, so this is stable and CI-testable.

This is opt-in: nothing computes it unless you call it, and it is wholly independent of any config-layer warning surface (keymap-config’s BuildOutput::warnings), so a caller gating on warnings.is_empty() is unaffected. Pass out.global() (or any one layer) after a config load, or any Keymap you built by hand.

The result is sorted by chord (canonical form); Keymap::iter is itself unordered, so sorting gives stable, human-readable output. Covers single-chord bindings only — multi-key sequences are a planned follow-up (gated on iteration over SequenceKeymap).