pub fn one_shot_handler(
    trigger: impl AcceptsKeycode,
    id: HandlerID,
    held_timeout: u16,
    released_timeout: u16,
) -> Box<OneShot<ActionHandler, ActionNone, ActionNone>> {
    Box::new(OneShot::new(
        trigger,
        KeyCode::No,
        ActionHandler { id },
        ActionNone{},
        ActionNone{},
        held_timeout,
        released_timeout,
    ))
}
/// Toggle a handler (layer) based on OneShot behaviour
Toggle a handler (layer) based on OneShot behaviour
Toggle a handler ( layer ) based on OneShot behaviour
pub fn one_shot_handler(
    trigger: impl AcceptsKeycode,
    id: HandlerID,
    held_timeout: u16,
    released_timeout: u16,
) -> Box<OneShot<ActionHandler, ActionNone, ActionNone>> {
    Box::new(OneShot::new(
        trigger,
        KeyCode::No,
        ActionHandler { id },
        ActionNone{},
        ActionNone{},
        held_timeout,
        released_timeout,
    ))
}
pub fn one_shot_handler ( trigger : impl AcceptsKeycode , id : HandlerID , held_timeout : u16 , released_timeout : u16 , ) -> Box < OneShot < ActionHandler , ActionNone , ActionNone > > { Box :: new ( OneShot :: new ( trigger , KeyCode :: No , ActionHandler { id } , ActionNone { } , ActionNone { } , held_timeout , released_timeout , ) ) }
Toggle a handler (layer) based on OneShot behaviour
Toggle a handler ( layer ) based on OneShot behaviour
trigger
impl AcceptsKeycode
id
HandlerID
held_timeout
u16
released_timeout
u16