macro_rules! kb {
($($key:expr => $action:expr),* $(,)?) => { ... };
($(($key:expr, $action:expr)),* $(,)?) => { ... };
}Expand description
Creates an array of keybindings.
Each action will be converted into an ActionKind.
This macro accepts two syntaxes:
<key> => <action>syntax:
let keybindings = kb![
"<q>" => Action::Quit,
"d" => "app:drink-mate"
];(<key>, <action>)syntax:
let keybindings = kb![
("<q>", Action::Quit),
("d", "app:drink-mate")
];