[][src]Struct keytokey::handlers::LongTap

pub struct LongTap<M1, M2> { /* fields omitted */ }

Handler that does one thing on a short tab, and another on a long tab with a configurable threshold

Action happens on release

Note that this is a simple implementation that just considers the time from the last key-event without considering whether that was actually the press of the LongTap key

Implementations

impl<M1: Action, M2: Action> LongTap<M1, M2>[src]

pub fn new(
    trigger: impl AcceptsKeycode,
    action_short: M1,
    action_long: M2,
    threshold_ms: u16
) -> LongTap<M1, M2>
[src]

Trait Implementations

impl<T: USBKeyOut, M1: Action, M2: Action> ProcessKeys<T> for LongTap<M1, M2>[src]

Auto Trait Implementations

impl<M1, M2> Send for LongTap<M1, M2> where
    M1: Send,
    M2: Send

impl<M1, M2> Sync for LongTap<M1, M2> where
    M1: Sync,
    M2: Sync

impl<M1, M2> Unpin for LongTap<M1, M2> where
    M1: Unpin,
    M2: Unpin

Blanket Implementations

impl<T> Any for T where
    T: 'static + ?Sized
[src]

impl<T> Borrow<T> for T where
    T: ?Sized
[src]

impl<T> BorrowMut<T> for T where
    T: ?Sized
[src]

impl<T> From<T> for T[src]

impl<T, U> Into<U> for T where
    U: From<T>, 
[src]

impl<T> Same<T> for T

type Output = T

Should always be Self

impl<T, U> TryFrom<U> for T where
    U: Into<T>, 
[src]

type Error = Infallible

The type returned in the event of a conversion error.

impl<T, U> TryInto<U> for T where
    U: TryFrom<T>, 
[src]

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.