Skip to main content

bindmap

Macro bindmap 

Source
macro_rules! bindmap {
    ( $( $( $k:expr ),+ => $v:expr ),* $(,)? ) => { ... };
}
Expand description

ยงExample

#[derive(Debug, Clone, PartialEq)]
pub enum FsAction {
   Filters
}

use matchmaker::{binds::{BindMap, bindmap, key}, action::Action};
let default_config: BindMap<FsAction> = bindmap!(
   key!(alt-enter) => Action::Print("".into()),
   key!(alt-f), key!(ctrl-shift-f) => FsAction::Filters, // custom actions can be specified directly
);