lapce/lapce · error

unrecognized physical key code {}

Error message

unrecognized physical key code {}

What it means

Error "unrecognized physical key code {}" thrown in lapce/lapce.

Source

Thrown at lapce-app/src/keypress/keymap.rs:232

                "nonconvert" => KeyCode::NonConvert,
                "hiragana" => KeyCode::Hiragana,
                "katakana" => KeyCode::Katakana,
                "f1" => KeyCode::F1,
                "f2" => KeyCode::F2,
                "f3" => KeyCode::F3,
                "f4" => KeyCode::F4,
                "f5" => KeyCode::F5,
                "f6" => KeyCode::F6,
                "f7" => KeyCode::F7,
                "f8" => KeyCode::F8,
                "f9" => KeyCode::F9,
                "f10" => KeyCode::F10,
                "f11" => KeyCode::F11,
                "f12" => KeyCode::F12,
                "mediastop" => KeyCode::MediaStop,
                "open" => KeyCode::Open,
                _ => {
                    return Err(anyhow::anyhow!(
                        "unrecognized physical key code {}",
                        &s[1..s.len() - 2]
                    ));
                }
            };
            KeyMapKey::Physical(PhysicalKey::Code(code))
        } else {
            let key = match s.to_lowercase().as_str() {
                "esc" => Key::Named(NamedKey::Escape),
                "space" => Key::Named(NamedKey::Space),
                "bs" => Key::Named(NamedKey::Backspace),
                "up" => Key::Named(NamedKey::ArrowUp),
                "down" => Key::Named(NamedKey::ArrowDown),
                "left" => Key::Named(NamedKey::ArrowLeft),
                "right" => Key::Named(NamedKey::ArrowRight),
                "del" => Key::Named(NamedKey::Delete),
                "alt" => Key::Named(NamedKey::Alt),
                "altgraph" => Key::Named(NamedKey::AltGraph),

View on GitHub (pinned to c9e4c33948)

When it happens

Trigger: Thrown at lapce-app/src/keypress/keymap.rs:232 when the library encounters an invalid state.

Common situations: See trigger scenarios.


AI-assisted analysis of lapce/lapce@c9e4c33948 (2026-08-16). Data as JSON: /api/errors/5459b98e297e0204. Report an issue: GitHub.