fixup! feat: support case insensitive special keys in keymappings

This commit is contained in:
Mika Vilpas 2024-05-25 18:40:58 +03:00
parent a5d9893fd5
commit a6d13836e7

View file

@ -112,10 +112,12 @@ impl FromStr for Key {
"f12" => key.code = KeyCode::F(12), "f12" => key.code = KeyCode::F(12),
"esc" => key.code = KeyCode::Esc, "esc" => key.code = KeyCode::Esc,
c if it.peek().is_none() => { _ => match x {
key.code = KeyCode::Char(c.chars().next().unwrap()); c if it.peek().is_none() => {
} key.code = KeyCode::Char(c.chars().next().unwrap());
k => bail!("unknown key: {k}"), }
k => bail!("unknown key: {k}"),
},
} }
} }