pub fn register_hotkey(
    sequence: &[Keyboard],
    callback: impl Fn() + Send + Sync + 'static
)
Expand description

Allows for registering an action that will be triggered when sequence of buttons is pressed. callback will be invoked whenever last key of the sequence is pressed.

use mki::*;

fn register() {
  register_hotkey(&[Keyboard::LeftControl, Keyboard::B], || println!("CTRL+B pressed"));
}