key pattern matching macro

This commit is contained in:
🪞👃🪞 2024-09-05 23:01:16 +03:00
parent e0c8a427f1
commit 92d747ba2a
7 changed files with 168 additions and 93 deletions

View file

@ -10,8 +10,8 @@ pub struct Plugin {
pub ports: JackPorts,
}
impl Handle<Tui> for Plugin {
fn handle (&mut self, e: &Tui) -> Perhaps<bool> {
handle_keymap(self, event, KEYMAP_PLUGIN)
fn handle (&mut self, from: &Tui) -> Perhaps<bool> {
handle_keymap(self, &from.event(), KEYMAP_PLUGIN).map(|x|Some(x))
}
}
process!(Plugin = Plugin::process);