pub enum KeyEventInjectorRequest {
Inject {
key_event: KeyEvent,
responder: KeyEventInjectorInjectResponder,
},
}
Expand description
Provides the ability to inject KeyEvent
s into the keyboard subsystem.
§Roles
This protocol will typically be:
- Implemented by platform components which process and deliver keyboard events.
- Consumed by components which originiate keyboard events. E.g. an on-screen keyboard, or the Session Framework Input Pipeline.
§Related protocols
This protocol should be using in preference to legacy protocols which provide similar functionality. Specifically, this means this protocol should be preferred over
fuchsia.ui.input.ImeService
which providesInjectInput()
,DispatchKey()
, andDispatchKey3()
fuchsia.ui.input.InputMethodEditor
, which providesInjectInput()
andDispatchKey3()
§Notes
Products should take care to limit access to this protocol, as events injected with this protocol are indistinguishable from those coming from physical devices.
Variants§
Inject
Inject an event into the keyboard subsystem.
§Returns
HANDLED
if the keyboard subsystem delivered the event to a consumer, and the consumer reported that itHANDLED
the eventNOT_HANDLED
if the keyboard subsystem did not deliever the event to any consumers, or no consumer reported that itHANDLED
the event.
Implementations§
Source§impl KeyEventInjectorRequest
impl KeyEventInjectorRequest
pub fn into_inject(self) -> Option<(KeyEvent, KeyEventInjectorInjectResponder)>
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 KeyEventInjectorRequest
impl !RefUnwindSafe for KeyEventInjectorRequest
impl Send for KeyEventInjectorRequest
impl Sync for KeyEventInjectorRequest
impl Unpin for KeyEventInjectorRequest
impl !UnwindSafe for KeyEventInjectorRequest
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