refactor: Renamed 'ctrl-*' keyboard shortcuts to 'C-*' to simplify and shrink the on-screen help

This commit is contained in:
2025-08-08 15:09:39 -06:00
parent dbcfc77ad4
commit 345bb8ce03
2 changed files with 2 additions and 2 deletions
+1 -1
View File
@@ -30,7 +30,7 @@ impl Display for Key {
fn fmt(&self, f: &mut Formatter<'_>) -> fmt::Result {
match *self {
Key::Char(c) => write!(f, "<{c}>"),
Key::Ctrl(c) => write!(f, "<ctrl-{c}>"),
Key::Ctrl(c) => write!(f, "<C-{c}>"),
Key::Up => write!(f, "<↑>"),
Key::Down => write!(f, "<↓>"),
Key::Left => write!(f, "<←>"),
+1 -1
View File
@@ -20,7 +20,7 @@ mod tests {
#[case(Key::BackTab, "shift-tab")]
#[case(Key::Delete, "del")]
#[case(Key::Char('q'), "q")]
#[case(Key::Ctrl('q'), "ctrl-q")]
#[case(Key::Ctrl('q'), "C-q")]
fn test_key_formatter(#[case] key: Key, #[case] expected_str: &str) {
assert_str_eq!(format!("{key}"), format!("<{expected_str}>"));
}