pub enum InputCommand {
TypeKey {
element_id: ElementId,
key: String,
code: String,
key_code: u32,
printable: bool,
ctrl: bool,
shift: bool,
alt: bool,
meta: bool,
},
TypeText {
element_id: ElementId,
text: String,
},
MouseClick {
element_id: Option<ElementId>,
x: Option<i32>,
y: Option<i32>,
button: u8,
},
MouseMove {
element_id: Option<ElementId>,
x: Option<i32>,
y: Option<i32>,
},
MouseDown {
element_id: Option<ElementId>,
x: Option<i32>,
y: Option<i32>,
button: u8,
},
MouseUp {
element_id: Option<ElementId>,
x: Option<i32>,
y: Option<i32>,
button: u8,
},
}Expand description
Input module commands for keyboard and mouse simulation.
Variants§
TypeKey
Type single key with modifiers.
Fields
TypeText
Type text string character by character.
MouseClick
Mouse click.
Fields
Mouse button (0=left, 1=middle, 2=right).
MouseMove
Mouse move.
Fields
MouseDown
Mouse button down.
Fields
Mouse button.
MouseUp
Mouse button up.
Trait Implementations§
Source§impl Clone for InputCommand
impl Clone for InputCommand
Source§fn clone(&self) -> InputCommand
fn clone(&self) -> InputCommand
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 InputCommand
impl Debug for InputCommand
Source§impl<'de> Deserialize<'de> for InputCommand
impl<'de> Deserialize<'de> for InputCommand
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 InputCommand
impl RefUnwindSafe for InputCommand
impl Send for InputCommand
impl Sync for InputCommand
impl Unpin for InputCommand
impl UnwindSafe for InputCommand
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