Fix: compile for Linux

This commit is contained in:
Dorian Zedler 2023-02-16 11:01:16 +01:00
parent d77c7351aa
commit 9e564576e6
Signed by: dorian
GPG Key ID: 989DE36109AFA354
2 changed files with 5 additions and 3 deletions

View File

@ -2,13 +2,15 @@
use enigo::{KeyboardControllable};
#[cfg(target_family = "unix")]
pub fn type_text(text: &str) {
pub fn type_text(text: &str) -> Result<(),()> {
enigo::Enigo::default().key_sequence(text);
Ok(())
}
#[cfg(target_family = "unix")]
pub fn click_tab() {
pub fn click_tab() -> Result<(),()> {
enigo::Enigo::default().key_click(enigo::Key::Tab);
Ok(())
}
#[cfg(target_family = "windows")]

View File

@ -81,7 +81,7 @@ fn main() {
let password = "test";
let broker_domain = "broker.emqx.io";
let mut c = comm::Comm::new(&broker_domain, &password, handle_time).unwrap();
let c = comm::Comm::new(&broker_domain, &password, handle_time).unwrap();
//Gui::run(Settings::default());