mirror of
https://github.com/rustdesk/rustdesk.git
synced 2024-12-30 00:37:54 +08:00
13 lines
304 B
Rust
13 lines
304 B
Rust
use enigo::{Enigo, Key, KeyboardControllable};
|
|
use std::thread;
|
|
use std::time::Duration;
|
|
|
|
fn main() {
|
|
thread::sleep(Duration::from_secs(2));
|
|
let mut enigo = Enigo::new();
|
|
|
|
enigo.key_down(Key::Layout('a')).ok();
|
|
thread::sleep(Duration::from_secs(1));
|
|
enigo.key_up(Key::Layout('a'));
|
|
}
|