mirror of
https://github.com/rustdesk/rustdesk.git
synced 2024-12-25 13:07:52 +08:00
18 lines
474 B
Rust
18 lines
474 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::Shift).ok();
|
|
enigo.key_down(Key::Layout('.')).ok();
|
|
enigo.key_up(Key::Layout('.'));
|
|
enigo.key_up(Key::Shift);
|
|
enigo.key_down(Key::Shift).ok();
|
|
enigo.key_down(Key::Layout('-')).ok();
|
|
enigo.key_up(Key::Layout('-'));
|
|
enigo.key_up(Key::Shift);
|
|
}
|