pub enum KeyboardRequest {
SimulateUsAsciiTextEntry {
payload: KeyboardSimulateUsAsciiTextEntryRequest,
responder: KeyboardSimulateUsAsciiTextEntryResponder,
},
SimulateKeyEvent {
payload: KeyboardSimulateKeyEventRequest,
responder: KeyboardSimulateKeyEventResponder,
},
SimulateKeyPress {
payload: KeyboardSimulateKeyPressRequest,
responder: KeyboardSimulateKeyPressResponder,
},
}Expand description
A tool to inject keyboard events into Input Pipeline.
Please extend as necessary.
Variants§
SimulateUsAsciiTextEntry
Simulates input of the set of keystrokes required to type text,
as if on a US QWERTY keyboard.
US ASCII text get mapped to the corresponding key presses.
For example a gets mapped into a press and
a followup release of the key a on the US QWERTY keyboard. Also,
A gets mapped into a press of the Shift key, followed by a press
and release of a.
For convenience, the \n and \t get converted into Enter and Tab
keys respectively.
Fields
§
responder: KeyboardSimulateUsAsciiTextEntryResponderSimulateKeyEvent
SimulateKeyPress
Simulate one key press includes down and up event.
Implementations§
Source§impl KeyboardRequest
impl KeyboardRequest
pub fn into_simulate_us_ascii_text_entry( self, ) -> Option<(KeyboardSimulateUsAsciiTextEntryRequest, KeyboardSimulateUsAsciiTextEntryResponder)>
pub fn into_simulate_key_event( self, ) -> Option<(KeyboardSimulateKeyEventRequest, KeyboardSimulateKeyEventResponder)>
pub fn into_simulate_key_press( self, ) -> Option<(KeyboardSimulateKeyPressRequest, KeyboardSimulateKeyPressResponder)>
Sourcepub fn method_name(&self) -> &'static str
pub fn method_name(&self) -> &'static str
Name of the method defined in FIDL
Trait Implementations§
Auto Trait Implementations§
impl !RefUnwindSafe for KeyboardRequest
impl !UnwindSafe for KeyboardRequest
impl Freeze for KeyboardRequest
impl Send for KeyboardRequest
impl Sync for KeyboardRequest
impl Unpin for KeyboardRequest
impl UnsafeUnpin for KeyboardRequest
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