Skip to main content

try_parse_binding

Function try_parse_binding 

Source
pub fn try_parse_binding(binding: &str) -> Result<Vec<KeyChord>, ParseKeyError>
Expand description

Parse a whitespace-separated chord sequence, returning ParseKeyError on the first unrecognised token (or if the string has no tokens).

Use this when binding from a user-editable config or a remap UI so a typo like "ctrl+shft+x" is reported instead of silently ignored.