[−][src]Struct keytokey::handlers::LongTap
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]
trigger: impl AcceptsKeycode,
action_short: M1,
action_long: M2,
threshold_ms: u16
) -> LongTap<M1, M2>
Trait Implementations
impl<T: USBKeyOut, M1: Action, M2: Action> ProcessKeys<T> for LongTap<M1, M2>
[src]
fn process_keys(
&mut self,
events: &mut Vec<(Event, EventStatus)>,
output: &mut T
) -> HandlerResult
[src]
&mut self,
events: &mut Vec<(Event, EventStatus)>,
output: &mut T
) -> HandlerResult
fn default_enabled(&self) -> bool
[src]
Auto Trait Implementations
impl<M1, M2> Send for LongTap<M1, M2> where
M1: Send,
M2: Send,
M1: Send,
M2: Send,
impl<M1, M2> Sync for LongTap<M1, M2> where
M1: Sync,
M2: Sync,
M1: Sync,
M2: Sync,
impl<M1, M2> Unpin for LongTap<M1, M2> where
M1: Unpin,
M2: Unpin,
M1: Unpin,
M2: Unpin,
Blanket Implementations
impl<T> Any for T where
T: 'static + ?Sized,
[src]
T: 'static + ?Sized,
impl<T> Borrow<T> for T where
T: ?Sized,
[src]
T: ?Sized,
impl<T> BorrowMut<T> for T where
T: ?Sized,
[src]
T: ?Sized,
fn borrow_mut(&mut self) -> &mut T
[src]
impl<T> From<T> for T
[src]
impl<T, U> Into<U> for T where
U: From<T>,
[src]
U: From<T>,
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]
U: Into<T>,
type Error = Infallible
The type returned in the event of a conversion error.
fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>
[src]
impl<T, U> TryInto<U> for T where
U: TryFrom<T>,
[src]
U: TryFrom<T>,