pub enum InputAction {
Show 15 variants
MouseMove {
x: i32,
y: i32,
},
MouseClick {
button: MouseButton,
x: i32,
y: i32,
},
MouseDoubleClick {
button: MouseButton,
x: i32,
y: i32,
},
MousePress {
button: MouseButton,
x: i32,
y: i32,
duration_ms: u64,
},
MouseDrag {
button: MouseButton,
start_x: i32,
start_y: i32,
end_x: i32,
end_y: i32,
duration_ms: u64,
},
MouseScroll {
delta_x: i32,
delta_y: i32,
},
KeyPress {
key: Key,
location: Option<KeyLocation>,
},
KeyDown {
key: Key,
location: Option<KeyLocation>,
},
KeyUp {
key: Key,
location: Option<KeyLocation>,
},
KeySequence {
keys: Vec<Key>,
key_delay_ms: Option<u64>,
},
TypeText {
text: String,
char_delay_ms: Option<u64>,
},
Hotkey {
modifiers: Vec<Key>,
key: Key,
location: Option<KeyLocation>,
},
Delay {
milliseconds: u64,
},
Sequence {
actions: Vec<InputAction>,
},
Parallel {
actions: Vec<InputAction>,
},
}Expand description
输入操作枚举
Variants§
MouseMove
MouseClick
MouseDoubleClick
MousePress
MouseDrag
MouseScroll
KeyPress
KeyDown
KeyUp
KeySequence
TypeText
Hotkey
Delay
Sequence
Fields
§
actions: Vec<InputAction>Parallel
Fields
§
actions: Vec<InputAction>Trait Implementations§
Source§impl Clone for InputAction
impl Clone for InputAction
Source§fn clone(&self) -> InputAction
fn clone(&self) -> InputAction
Returns a duplicate of the value. Read more
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreSource§impl Debug for InputAction
impl Debug for InputAction
Source§impl<'de> Deserialize<'de> for InputAction
impl<'de> Deserialize<'de> for InputAction
Source§fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
Deserialize this value from the given Serde deserializer. Read more
Auto Trait Implementations§
impl Freeze for InputAction
impl RefUnwindSafe for InputAction
impl Send for InputAction
impl Sync for InputAction
impl Unpin for InputAction
impl UnwindSafe for InputAction
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more