pub enum KeyboardRequest {
SimulateUsAsciiTextEntry {
payload: KeyboardSimulateUsAsciiTextEntryRequest,
responder: KeyboardSimulateUsAsciiTextEntryResponder,
},
SimulateKeyEvent {
payload: KeyboardSimulateKeyEventRequest,
responder: KeyboardSimulateKeyEventResponder,
},
}
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: KeyboardSimulateUsAsciiTextEntryResponder
SimulateKeyEvent
Simulate a key event by a keyboard input report.
KeyboardInputReport includes a list of keys that are currently pressing down. The report can represent key down / up by comparing with previous reports received.
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)>
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 Freeze for KeyboardRequest
impl !RefUnwindSafe for KeyboardRequest
impl Send for KeyboardRequest
impl Sync for KeyboardRequest
impl Unpin for KeyboardRequest
impl !UnwindSafe 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