pub enum TextRequest {
Send_ {
text: String,
responder: TextSend_Responder,
},
}
Expand description
A protocol that allows the test to pretend to be a keyboard and inject key presses into the input pipeline.
Only minimally required text synthesis is exposed through the protocol. If you need to expose more functionality, feel free to add methods to this protocol.
Variants§
Send_
Sends text
through the input pipeline, pretending to be a keyboard,
effectively converting the text into key presses as if on a US QWERTY
keyboard, and typing characters up one at a time with a brief pause
between successive key events.
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.
On error-free return, the caller can assume that all keys corresponding
to text
has been typed up on the fake keyboard. On error, the caller
should fail the test.
This API does not support sending multiple key events at the same time.
Feel free to expose the appropriate functionality from the
input-synthesis
library if you need that.
Implementations§
source§impl TextRequest
impl TextRequest
pub fn into_send_(self) -> Option<(String, TextSend_Responder)>
sourcepub fn method_name(&self) -> &'static str
pub fn method_name(&self) -> &'static str
Name of the method defined in FIDL