[][src]Crate keybind

Keybind

Wrapper around device_query providing a nicer API, allowing you to trigger your logic on specific keybind.

Example

This example is not tested
use keybind::{Keybind, Keycode};

fn main() {
   let mut keybind = Keybind::new(&[Keycode::LControl, Keycode::G]);

   keybind.on_trigger(|| {
       println!("This will be printed when you press CTRL+G");
   });

   keybind.wait();
}

Structs

Keybind

Enums

Keycode

A list of supported keys that we can query from the OS. Outside of mod keys, we only support English keys at the moment.