Skip to main content

ForwardSink

Trait ForwardSink 

Source
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§

Source

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§

Source§

impl ForwardSink for UinputForwarder

Source§

impl ForwardSink for RecordingForwarder

Available on crate features testing only.