blob: e9896449ff2851b8cf1f67f2bede6a0bfb5f07bd (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
|
use crate::config::AppKeyMapping;
use super::Command;
#[derive(Debug)]
pub enum CommandKeybind {
SimpleKeybind(Command),
CompositeKeybind(AppKeyMapping),
}
impl std::fmt::Display for CommandKeybind {
fn fmt(&self, f: &mut std::fmt::Formatter) -> std::fmt::Result {
match self {
CommandKeybind::SimpleKeybind(s) => write!(f, "{}", s),
CommandKeybind::CompositeKeybind(_) => write!(f, "..."),
}
}
}
|