feat: Refactor all keybinding tips into a dynamically changing menu that can be invoked via '?' [#32]
This commit is contained in:
+17
-17
@@ -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:?}"),
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user