Improve KeyBind format

This commit is contained in:
Jeremy Soller 2024-02-08 15:15:50 -07:00
parent a72a9af0e7
commit e91938ee2b
No known key found for this signature in database
GPG key ID: D02FD439211AF56F

View file

@ -36,7 +36,11 @@ impl fmt::Display for KeyBind {
for modifier in self.modifiers.iter() {
write!(f, "{:?} + ", modifier)?;
}
write!(f, "{:?}", self.key)
match &self.key {
Key::Character(c) => write!(f, "{}", c.to_uppercase()),
Key::Named(named) => write!(f, "{:?}", named),
other => write!(f, "{:?}", other),
}
}
}