{"record":{"id":"c68011a1bed64b06","repo":"DioxusLabs/dioxus","slug":"failed-to-convert-key-to-tao-keyboard-keycod","errorCode":null,"errorMessage":"Failed to convert {key:?} to tao::keyboard::KeyCode, try using tao::keyboard::KeyCode directly","messagePattern":"Failed to convert (.+?) to tao::keyboard::KeyCode, try using tao::keyboard::KeyCode directly","errorType":"panic","errorClass":null,"httpStatus":null,"severity":"error","filePath":"packages/desktop/src/shortcut.rs","lineNumber":300,"sourceCode":"            dioxus_html::KeyCode::F7 => Code::F7,\n            dioxus_html::KeyCode::F8 => Code::F8,\n            dioxus_html::KeyCode::F9 => Code::F9,\n            dioxus_html::KeyCode::F10 => Code::F10,\n            dioxus_html::KeyCode::F11 => Code::F11,\n            dioxus_html::KeyCode::F12 => Code::F12,\n            dioxus_html::KeyCode::NumLock => Code::NumLock,\n            dioxus_html::KeyCode::ScrollLock => Code::ScrollLock,\n            dioxus_html::KeyCode::Semicolon => Code::Semicolon,\n            dioxus_html::KeyCode::EqualSign => Code::Equal,\n            dioxus_html::KeyCode::Comma => Code::Comma,\n            dioxus_html::KeyCode::Period => Code::Period,\n            dioxus_html::KeyCode::ForwardSlash => Code::Slash,\n            dioxus_html::KeyCode::GraveAccent => Code::Backquote,\n            dioxus_html::KeyCode::OpenBracket => Code::BracketLeft,\n            dioxus_html::KeyCode::BackSlash => Code::Backslash,\n            dioxus_html::KeyCode::CloseBracket => Code::BracketRight,\n            dioxus_html::KeyCode::SingleQuote => Code::Quote,\n            key => panic!(\n                \"Failed to convert {key:?} to tao::keyboard::KeyCode, try using tao::keyboard::KeyCode directly\"\n            ),\n        }\n    }\n}\n","sourceCodeStart":282,"sourceCodeEnd":306,"githubUrl":"https://github.com/DioxusLabs/dioxus/blob/24f6a829df0dfa203961a98ea4cae21c2ff27e28/packages/desktop/src/shortcut.rs#L282-L306","documentation":"The shortcut key conversion match fell through: the given dioxus_html::KeyCode has no mapping to a tao::keyboard::Code. The match arms cover a fixed set of keys, so an unmapped or newly added KeyCode variant reaches the fallback panic in into_key_code.","triggerScenarios":"Thrown at packages/desktop/src/shortcut.rs:300 when the library encounters an invalid state.","commonSituations":"See trigger scenarios.","solutions":["This key cannot be converted automatically. Use tao::keyboard::KeyCode directly in the shortcut definition."],"exampleFix":null,"handlingStrategy":"fallback","validationCode":null,"typeGuard":null,"tryCatchPattern":null,"preventionTips":[],"tags":[],"backgroundTag":null,"analyzedSha":"24f6a829df0dfa203961a98ea4cae21c2ff27e28","analyzedAt":"2026-08-23T07:10:14.078Z","contentChangedAt":"2026-08-23T07:10:14.078Z","schemaVersion":2},"datasetVersion":"2026-09-14T05:17:10.506Z"}