Skip to content

rustysoft/keybind

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

2 Commits
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Keybind

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

Full Documentation can be read here.

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();
}