{"record":{"id":"d94ab080dc5b89d1","repo":"sxyazi/yazi","slug":"unknown-key-s","errorCode":null,"errorMessage":"unknown key: {s}","messagePattern":"unknown key: (.+?)","errorType":"validation","errorClass":null,"httpStatus":null,"severity":"error","filePath":"yazi-config/src/keymap/key.rs","lineNumber":115,"sourceCode":"\t\t\t\t\"f10\" => key.code = KeyCode::Fn(10),\n\t\t\t\t\"f11\" => key.code = KeyCode::Fn(11),\n\t\t\t\t\"f12\" => key.code = KeyCode::Fn(12),\n\t\t\t\t\"f13\" => key.code = KeyCode::Fn(13),\n\t\t\t\t\"f14\" => key.code = KeyCode::Fn(14),\n\t\t\t\t\"f15\" => key.code = KeyCode::Fn(15),\n\t\t\t\t\"f16\" => key.code = KeyCode::Fn(16),\n\t\t\t\t\"f17\" => key.code = KeyCode::Fn(17),\n\t\t\t\t\"f18\" => key.code = KeyCode::Fn(18),\n\t\t\t\t\"f19\" => key.code = KeyCode::Fn(19),\n\t\t\t\t\"esc\" => key.code = KeyCode::Escape,\n\n\t\t\t\t_ => match next {\n\t\t\t\t\ts if it.peek().is_none() => {\n\t\t\t\t\t\tlet c = s.chars().next().unwrap();\n\t\t\t\t\t\tkey.shift |= c.is_uppercase();\n\t\t\t\t\t\tkey.code = KeyCode::Char(if key.shift { c.to_ascii_uppercase() } else { c });\n\t\t\t\t\t}\n\t\t\t\t\ts => bail!(\"unknown key: {s}\"),\n\t\t\t\t},\n\t\t\t}\n\t\t}\n\n\t\tif key.code == KeyCode::Null {\n\t\t\tbail!(\"empty key\")\n\t\t}\n\t\tOk(key)\n\t}\n}\n\nimpl Display for Key {\n\tfn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {\n\t\tif let Some(c) = self.plain() {\n\t\t\treturn if c == ' ' { write!(f, \"<Space>\") } else { f.write_char(c) };\n\t\t}\n\n\t\twrite!(f, \"<\")?;","sourceCodeStart":97,"sourceCodeEnd":133,"githubUrl":"https://github.com/sxyazi/yazi/blob/5f901b886b14de1f17460b6e52e9de5d67f8aba9/yazi-config/src/keymap/key.rs#L97-L133","documentation":"Keymap parsing guard in `FromStr for Key`: after matching all named keys (arrows, F-keys, esc, etc.), the remaining token matched no known key name and, being the last token, cannot be interpreted as a modifier prefix. The faulting input is the unrecognized token `s` inside the key string.","triggerScenarios":"Thrown at yazi-config/src/keymap/key.rs:115 when the library encounters an invalid state.","commonSituations":"See trigger scenarios.","solutions":["Check the key name for typos against the supported set (e.g. `tab`, `enter`, `f1`-`f19`, `esc`).","Use `<...>` syntax with valid modifiers (`<S-a>`, `<C-a>`, `<A-a>`).","For plain characters, use the character itself."],"exampleFix":null,"handlingStrategy":"validation","validationCode":null,"typeGuard":null,"tryCatchPattern":null,"preventionTips":[],"tags":[],"backgroundTag":null,"analyzedSha":"5f901b886b14de1f17460b6e52e9de5d67f8aba9","analyzedAt":"2026-09-02T18:38:25.566Z","contentChangedAt":"2026-09-02T18:38:25.566Z","schemaVersion":2},"datasetVersion":"2026-09-14T05:17:10.506Z"}