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: 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.
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