Function mki::bind_key

source · []
pub fn bind_key(key: Keyboard, action: Action)
Expand description

Install any key handler that will be invoked on specified key presses.

 use mki::*;

 fn bind_some_key() {
   bind_key(Keyboard::B, Action::handle_kb(|(key)| println!("B Pressed")));
 }