add enigo, type hello world!
This commit is contained in:
parent
7983bdab0b
commit
0b85666e82
2 changed files with 6 additions and 0 deletions
|
@ -5,6 +5,7 @@ edition = "2021"
|
||||||
|
|
||||||
[dependencies]
|
[dependencies]
|
||||||
anyhow = "1.0.86"
|
anyhow = "1.0.86"
|
||||||
|
enigo = { version = "0.2.1", features = ["serde"] }
|
||||||
hex = "0.4.3"
|
hex = "0.4.3"
|
||||||
midir = "0.10.0"
|
midir = "0.10.0"
|
||||||
nom = "7.1.3"
|
nom = "7.1.3"
|
||||||
|
|
|
@ -1,9 +1,14 @@
|
||||||
use std::io::stdin;
|
use std::io::stdin;
|
||||||
|
|
||||||
use anyhow::{anyhow, Result};
|
use anyhow::{anyhow, Result};
|
||||||
|
use enigo::{Direction, Enigo, Key, Keyboard, Settings};
|
||||||
use midir::{MidiInput, MidiInputPort};
|
use midir::{MidiInput, MidiInputPort};
|
||||||
|
|
||||||
fn main() {
|
fn main() {
|
||||||
|
let mut enigo = Enigo::new(&Settings::default()).unwrap();
|
||||||
|
enigo.text("echo \"hello world\"");
|
||||||
|
enigo.key(Key::Return, Direction::Press);
|
||||||
|
|
||||||
match run() {
|
match run() {
|
||||||
Ok(_) => {}
|
Ok(_) => {}
|
||||||
Err(err) => {
|
Err(err) => {
|
||||||
|
|
Loading…
Reference in a new issue