pub struct RawAction {Show 13 fields
pub kind: Option<Kind>,
pub x: Option<f64>,
pub y: Option<f64>,
pub button: Option<Button>,
pub double: Option<bool>,
pub text: Option<String>,
pub key: Option<String>,
pub modifiers: Option<Vec<String>>,
pub direction: Option<Direction>,
pub amount: Option<f64>,
pub ms: Option<f64>,
pub application: Option<String>,
pub uri: Option<String>,
}Expand description
An action as the agent writes it. Which fields apply depends on kind.
Fields§
§kind: Option<Kind>What to do.
x: Option<f64>Pixel column on the screen. Needed by click and move, optional for down, up, and scroll.
y: Option<f64>Pixel row on the screen. Needed by click and move, optional for down, up, and scroll.
Mouse button for click, down, and up. Default left.
double: Option<bool>For click: click twice.
text: Option<String>For type: the text to type. Any Unicode works. A newline presses Enter.
key: Option<String>For key: a key name such as enter, esc, tab, backspace, delete, space, left, right, up, down, home, end, pageup, pagedown, f1 to f12, or a single character.
modifiers: Option<Vec<String>>For key: modifiers held while the key is pressed, from ctrl, alt, shift, and super (also cmd, meta, win, option).
direction: Option<Direction>For scroll: the direction.
amount: Option<f64>For scroll: wheel steps, 1 to 20. Default 3.
ms: Option<f64>For wait: milliseconds, up to 5000. Default 350.
application: Option<String>For focus: name or title of an open window to raise, matched without regard to case. Also names an application to start when no window matches.
uri: Option<String>For focus: a page or file to open in the application. The application is started or reused with it.
Trait Implementations§
Source§impl<'de> Deserialize<'de> for RawAction
impl<'de> Deserialize<'de> for RawAction
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>,
Source§impl JsonSchema for RawAction
impl JsonSchema for RawAction
Source§fn schema_id() -> Cow<'static, str>
fn schema_id() -> Cow<'static, str>
Source§fn json_schema(generator: &mut SchemaGenerator) -> Schema
fn json_schema(generator: &mut SchemaGenerator) -> Schema
Source§fn inline_schema() -> bool
fn inline_schema() -> bool
$ref keyword. Read more