Struct fidl_test_inputsynthesis::TextProxy
source · pub struct TextProxy { /* private fields */ }
Implementations§
source§impl TextProxy
impl TextProxy
sourcepub fn take_event_stream(&self) -> TextEventStream
pub fn take_event_stream(&self) -> TextEventStream
Get a Stream of events from the remote end of the Text protocol
Panics
Panics if the event stream was already taken.
sourcepub fn send_(&self, text: &str) -> QueryResponseFut<()>
pub fn send_(&self, text: &str) -> QueryResponseFut<()>
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.
Trait Implementations§
source§impl Proxy for TextProxy
impl Proxy for TextProxy
§type Protocol = TextMarker
type Protocol = TextMarker
Proxy
controls.