Function autopilot::key::toggle[][src]

pub fn toggle<T: KeyCodeConvertible>(
    key: T,
    down: bool,
    flags: &[Flag],
    modifier_delay_ms: u64
)

Holds down the given key or keycode if down is true, or releases it if not. Characters are converted to a keycode corresponding to the current keyboard layout. Delay between pressing and releasing the modifier keys can be controlled using the modifier_delay_ms parameter.