From 18a7a75e3316b1f4855777af677d989467f2da74 Mon Sep 17 00:00:00 2001 From: Ashley Wulber Date: Fri, 26 Jun 2026 14:17:11 -0400 Subject: [PATCH] fix(key bind): space --- src/widget/menu/key_bind.rs | 2 ++ 1 file changed, 2 insertions(+) diff --git a/src/widget/menu/key_bind.rs b/src/widget/menu/key_bind.rs index b764fde7..2202125f 100644 --- a/src/widget/menu/key_bind.rs +++ b/src/widget/menu/key_bind.rs @@ -146,6 +146,7 @@ impl fmt::Display for KeyBind { write!(f, "{:?} + ", modifier)?; } match &self.key { + Key::Character(c) if c.as_str() == " " => write!(f, "Space"), Key::Character(c) => write!(f, "{}", c.to_uppercase()), Key::Named(named) => write!(f, "{:?}", named), other => write!(f, "{:?}", other), @@ -216,6 +217,7 @@ mod test { }; assert!(bind.matches(Modifiers::CTRL, &Key::Character(" ".into()), None,)); + assert!(format!("{}", bind) == String::from("Ctrl + Space")) } #[test]