Skip to content
/ enigo Public
forked from enigo-rs/enigo

Rust 中的跨平台输入模拟 (Cross platform input simulation in Rust)

License

Notifications You must be signed in to change notification settings

borfi/enigo

 
 

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Build status Docs Dependency status

Rust version Crates.io

enigo

Cross platform input simulation in Rust!

  • Linux (X11) mouse
  • Linux (X11) text
  • Linux (Wayland) mouse
  • Linux (Wayland) text
  • MacOS mouse
  • MacOS text
  • Win mouse
  • Win text
  • Serialize/Deserialize
let mut enigo = Enigo::new(&Settings::default()).unwrap();

enigo.move_mouse(500, 200, Abs).unwrap();
enigo.button(Button::Left, Click).unwrap();
enigo.text("Hello World! here is a lot of text  ❤️").unwrap();

For more look at the examples.

Runtime dependencies

Linux users may have to install libxdo-dev if they are using X11. For example, on Debian-based distros:

apt-get install libxdo-dev

On Arch:

pacman -S xdotool

On Fedora:

dnf install libX11-devel libxdo-devel

On Gentoo:

emerge -a xdotool

Migrating from a previous version

Please have a look at our changelog to find out what you have to do, if you used a previous version.

Permissions

Some platforms have security measures in place to prevent programs from entering keys or controlling the mouse. Have a look at the permissions documentation to see what you need to do to allow it.

About

Rust 中的跨平台输入模拟 (Cross platform input simulation in Rust)

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Languages

  • Rust 98.4%
  • HTML 1.6%