2019-08-30 17:45:27 +00:00
|
|
|
use std::thread::sleep;
|
|
|
|
use std::time::Duration;
|
|
|
|
use std::sync::mpsc;
|
2019-08-30 19:24:03 +00:00
|
|
|
use crate::keyboard::KeyboardInterceptor;
|
|
|
|
use crate::keyboard::KeyboardSender;
|
|
|
|
use crate::matcher::Matcher;
|
2019-08-30 16:32:10 +00:00
|
|
|
|
2019-08-30 17:45:27 +00:00
|
|
|
mod keyboard;
|
2019-08-30 19:24:03 +00:00
|
|
|
mod matcher;
|
2019-08-30 12:33:40 +00:00
|
|
|
|
|
|
|
fn main() {
|
|
|
|
println!("Hello, world from Rust!");
|
|
|
|
|
2019-08-30 17:45:27 +00:00
|
|
|
let (sender, receiver) = mpsc::channel();
|
2019-08-30 16:32:10 +00:00
|
|
|
|
2019-08-30 19:24:03 +00:00
|
|
|
let (interceptor, sender) = keyboard::get_backend(sender);
|
|
|
|
interceptor.initialize();
|
|
|
|
interceptor.start();
|
2019-08-30 16:32:10 +00:00
|
|
|
|
2019-08-30 19:24:03 +00:00
|
|
|
let matcher = Matcher{receiver};
|
|
|
|
matcher.watch();
|
2019-08-30 12:33:40 +00:00
|
|
|
}
|