pub trait ForwardSink: Send {
// Required method
fn forward_key(
&mut self,
key: Key,
transition: KeyTransition,
) -> Result<(), Error>;
}Expand description
Sink for forwarding key events through a virtual device.
The engine uses this trait to forward unmatched events (in grab mode) and to emit synthetic key events (for remapping actions).
Required Methods§
Sourcefn forward_key(
&mut self,
key: Key,
transition: KeyTransition,
) -> Result<(), Error>
fn forward_key( &mut self, key: Key, transition: KeyTransition, ) -> Result<(), Error>
Forward a single key event through the virtual device.
§Errors
Returns Error::Uinput if the underlying write to the virtual
device fails.
Implementors§
impl ForwardSink for UinputForwarder
impl ForwardSink for RecordingForwarder
Available on crate features
testing only.