{"record":{"id":"97b0c9e81eea10cf","repo":"sxyazi/yazi","slug":"invalid-mouse-event-s","errorCode":null,"errorMessage":"Invalid mouse event: {s}","messagePattern":"Invalid mouse event: (.+?)","errorType":"validation","errorClass":null,"httpStatus":null,"severity":"error","filePath":"yazi-config/src/mgr/mouse.rs","lineNumber":29,"sourceCode":"\t\tconst SCROLL = 0b00010;\n\t\tconst TOUCH  = 0b00100;\n\t\tconst MOVE   = 0b01000;\n\t\tconst DRAG   = 0b10000;\n\t}\n}\n\nimpl TryFrom<Vec<String>> for MouseEvents {\n\ttype Error = anyhow::Error;\n\n\tfn try_from(value: Vec<String>) -> Result<Self, Self::Error> {\n\t\tvalue.into_iter().try_fold(Self::empty(), |aac, s| {\n\t\t\tOk(match s.as_str() {\n\t\t\t\t\"click\" => aac | Self::CLICK,\n\t\t\t\t\"scroll\" => aac | Self::SCROLL,\n\t\t\t\t\"touch\" => aac | Self::TOUCH,\n\t\t\t\t\"move\" => aac | Self::MOVE,\n\t\t\t\t\"drag\" => aac | Self::DRAG,\n\t\t\t\t_ => bail!(\"Invalid mouse event: {s}\"),\n\t\t\t})\n\t\t})\n\t}\n}\n\nimpl From<MouseEvents> for Vec<String> {\n\tfn from(value: MouseEvents) -> Self {\n\t\tlet events = [\n\t\t\t(MouseEvents::CLICK, \"click\"),\n\t\t\t(MouseEvents::SCROLL, \"scroll\"),\n\t\t\t(MouseEvents::TOUCH, \"touch\"),\n\t\t\t(MouseEvents::MOVE, \"move\"),\n\t\t\t(MouseEvents::DRAG, \"drag\"),\n\t\t];\n\t\tevents.into_iter().filter(|v| value.contains(v.0)).map(|v| v.1.to_owned()).collect()\n\t}\n}\n","sourceCodeStart":11,"sourceCodeEnd":47,"githubUrl":"https://github.com/sxyazi/yazi/blob/5f901b886b14de1f17460b6e52e9de5d67f8aba9/yazi-config/src/mgr/mouse.rs#L11-L47","documentation":"Config parsing guard in `TryFrom<Vec<String>> for MouseEvents`: while folding the list of mouse event names from yazi.toml, one string matched none of the accepted events (`click`, `scroll`, `touch`, `move`, `drag`). The faulting input is that unrecognized string.","triggerScenarios":"Thrown at yazi-config/src/mgr/mouse.rs:29 when the library encounters an invalid state.","commonSituations":"See trigger scenarios.","solutions":["Use only `click`, `scroll`, `touch`, `move`, or `drag` in `mouse.events`.","Remove the typo'd event name from the configuration."],"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"}