Skip to main content

start

Function start 

Source
pub fn start(
    chords: &[Chord],
    chord_capture: Arc<ChordCaptureSlot>,
) -> Result<Receiver<Key>, CaptureError>
Expand description

Start capturing keystrokes from every keyboard under /dev/input.

chords is the list of trigger chords the daemon has bound. Capture uses them to suppress the would-be Key::Reset that pressing one of those chords would otherwise emit — without this, pressing e.g. Super+Ctrl+Shift+Alt+S would wipe the buffer before the sentence-fix gets a chance to read it.

Returns a channel of Key events. One detached OS thread per keyboard device feeds the channel for the life of the process; dropping the Receiver makes those threads exit.

§Errors

See CaptureError.