pub fn key_event_to_canonical_chord_string(
code: KeyCode,
mods: KeyModifiers,
) -> Option<String>Expand description
What: Serialize a raw key event into the canonical chord string used by the keybind parser, for the popup’s capture mode.
Inputs:
code: Crossterm key code from the captured event.mods: Modifier flags from the captured event.
Output:
Some(chord)such as"Ctrl+r"or"Shift+Tab"when the key is representable inkeybinds.conf;Nonefor unsupported codes (media keys, bare modifier presses, etc.), which capture mode should ignore rather than record.