feat: Refactor all keybinding tips into a dynamically changing menu that can be invoked via '?' [#32]

This commit is contained in:
2025-08-12 16:27:34 -06:00
parent 1f4870d082
commit 00ab0f27f7
64 changed files with 1627 additions and 903 deletions
+17 -17
View File
@@ -31,23 +31,23 @@ pub enum Key {
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, "<C-{c}>"),
Key::Up => write!(f, "<>"),
Key::Down => write!(f, "<>"),
Key::Left => write!(f, "<>"),
Key::Right => write!(f, "<>"),
Key::PgDown => write!(f, "<C-d>"),
Key::PgUp => write!(f, "<C-u>"),
Key::Enter => write!(f, "<enter>"),
Key::Esc => write!(f, "<esc>"),
Key::Backspace => write!(f, "<backspace>"),
Key::Home => write!(f, "<home>"),
Key::End => write!(f, "<end>"),
Key::Tab => write!(f, "<tab>"),
Key::BackTab => write!(f, "<shift-tab>"),
Key::Delete => write!(f, "<del>"),
_ => write!(f, "<{self:?}>"),
Key::Char(c) => write!(f, "{c}"),
Key::Ctrl(c) => write!(f, "ctrl-{c}"),
Key::Up => write!(f, ""),
Key::Down => write!(f, ""),
Key::Left => write!(f, ""),
Key::Right => write!(f, ""),
Key::PgDown => write!(f, "pgDown"),
Key::PgUp => write!(f, "pgUp"),
Key::Enter => write!(f, "enter"),
Key::Esc => write!(f, "esc"),
Key::Backspace => write!(f, "backspace"),
Key::Home => write!(f, "home"),
Key::End => write!(f, "end"),
Key::Tab => write!(f, "tab"),
Key::BackTab => write!(f, "shift-tab"),
Key::Delete => write!(f, "del"),
_ => write!(f, "{self:?}"),
}
}
}