Struct enigo_copy::Enigo
source · pub struct Enigo { /* private fields */ }
Expand description
The main struct for handling the event emitting
Implementations§
Trait Implementations§
source§impl KeyboardControllable for Enigo
impl KeyboardControllable for Enigo
source§fn key_sequence(&mut self, sequence: &str)
fn key_sequence(&mut self, sequence: &str)
Enter the text. You can use unicode here like: ❤️. This works
regardless of the current keyboardlayout. You cannot use this function
for entering shortcuts or something similar. For shortcuts, use the
KeyboardControllable::key_click
method instead. Read moresource§fn key_click(&mut self, key: Key)
fn key_click(&mut self, key: Key)
Press and release the key. It is the same as calling the
KeyboardControllable::key_down
and
KeyboardControllable::key_up
functions consecutivelysource§fn key_sequence_parse(&mut self, sequence: &str)where
Self: Sized,
fn key_sequence_parse(&mut self, sequence: &str)where Self: Sized,
Type the string parsed with DSL. Read more
source§fn key_sequence_parse_try(&mut self, sequence: &str) -> Result<(), ParseError>where
Self: Sized,
fn key_sequence_parse_try(&mut self, sequence: &str) -> Result<(), ParseError>where Self: Sized,
Same as
KeyboardControllable::key_sequence_parse
except returns any
errors Read moresource§impl MouseControllable for Enigo
impl MouseControllable for Enigo
source§fn mouse_move_to(&mut self, x: i32, y: i32)
fn mouse_move_to(&mut self, x: i32, y: i32)
Move the mouse cursor to the specified x and y coordinates. Read more
source§fn mouse_move_relative(&mut self, x: i32, y: i32)
fn mouse_move_relative(&mut self, x: i32, y: i32)
Move the mouse cursor the specified amount in the x and y
direction. A positive x value moves the mouse cursor
x
pixels to the
right. A negative value for x
moves the mouse cursor to the left.
A positive value of y moves the mouse cursor down, a negative one
moves the mouse cursor up. Read moresource§fn mouse_down(&mut self, button: MouseButton)
fn mouse_down(&mut self, button: MouseButton)
Push down the mouse button specified by the parameter
button
of type MouseButton
and hold it until it is released by
MouseControllable::mouse_up
.
Calls to MouseControllable::mouse_move_to
or
MouseControllable::mouse_move_relative
will
work like expected and will e.g. drag widgets or highlight text. Read moresource§fn mouse_up(&mut self, button: MouseButton)
fn mouse_up(&mut self, button: MouseButton)
Release a pushed down mouse button Read more
source§fn mouse_click(&mut self, button: MouseButton)
fn mouse_click(&mut self, button: MouseButton)
Click a mouse button Read more
source§fn mouse_scroll_x(&mut self, length: i32)
fn mouse_scroll_x(&mut self, length: i32)
Scroll the mouse (wheel) left or right Read more
source§fn mouse_scroll_y(&mut self, length: i32)
fn mouse_scroll_y(&mut self, length: i32)
Scroll the mouse (wheel) up or down Read more