added delays so commands don't overlap

This commit is contained in:
Nickiel12 2021-12-31 10:44:50 -08:00
parent 47d47f0819
commit 686d7b8237

View file

@ -48,6 +48,7 @@ impl Hotkeys {
hotkey]) hotkey])
.spawn() .spawn()
.expect("next_slide process call failed"); .expect("next_slide process call failed");
std::thread::sleep(std::time::Duration::from_millis(400));
} else { } else {
println!("pretend linux is sending obs send: {}", hotkey) println!("pretend linux is sending obs send: {}", hotkey)
}; };
@ -60,6 +61,7 @@ impl Hotkeys {
self.hotkeys["general"]["clicker_forward"].as_str().unwrap()]) self.hotkeys["general"]["clicker_forward"].as_str().unwrap()])
.spawn() .spawn()
.expect("next_slide process call failed"); .expect("next_slide process call failed");
std::thread::sleep(std::time::Duration::from_millis(200));
} else { } else {
println!("pretend linux is sending prosenter next: {}", self.hotkeys["general"]["clicker_forward"].as_str().unwrap()) println!("pretend linux is sending prosenter next: {}", self.hotkeys["general"]["clicker_forward"].as_str().unwrap())
}; };
@ -72,6 +74,7 @@ impl Hotkeys {
self.hotkeys["general"]["clicker_backward"].as_str().unwrap()]) self.hotkeys["general"]["clicker_backward"].as_str().unwrap()])
.spawn() .spawn()
.expect("next_slide process call failed"); .expect("next_slide process call failed");
std::thread::sleep(std::time::Duration::from_millis(200));
} else { } else {
println!("pretend linux is sending prosenter next: {}", self.hotkeys["general"]["clicker_backward"].as_str().unwrap()) println!("pretend linux is sending prosenter next: {}", self.hotkeys["general"]["clicker_backward"].as_str().unwrap())
}; };