https://github.com/rustysoft/keybind
Trigger logic on specific keybind.
https://github.com/rustysoft/keybind
keybind rust
Last synced: about 2 months ago
JSON representation
Trigger logic on specific keybind.
- Host: GitHub
- URL: https://github.com/rustysoft/keybind
- Owner: rustysoft
- License: mit
- Created: 2019-03-30T23:10:27.000Z (about 7 years ago)
- Default Branch: master
- Last Pushed: 2019-03-30T23:21:35.000Z (about 7 years ago)
- Last Synced: 2025-12-13T18:59:02.700Z (6 months ago)
- Topics: keybind, rust
- Language: Rust
- Homepage:
- Size: 1.95 KB
- Stars: 3
- Watchers: 1
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
Keybind
=======
Wrapper around [device_query](https://github.com/ostrosco/device_query) providing a nicer API, allowing you to trigger
your logic on specific keybind.
Full Documentation can be read [here](https://docs.rs/keybind/*/keybind/).
```rust
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();
}
```