pub fn space_cadet_handler(
    trigger: impl AcceptsKeycode,
    action: KeyCode,
    id: HandlerID,
) -> Box<SpaceCadet<KeyCode, ActionHandler>> {
    Box::new(SpaceCadet::new(trigger, action, ActionHandler { id }))
}
/// A space cadet (pass through on tap,
/// on/off on pressed+other keys)
/// that turns a handler on/off.
///
/// Note that this needs to be before the handler
/// it toggles in the handler order,
/// so you need to use
///
/// keyboard.add_handler(space_cadet_handler(trigger, keyboard.future_handler_id(2)));
/// keyboard.add_handler(Box::new(Layer(...)))
///
A space cadet (pass through on tap,
on/off on pressed+other keys)
that turns a handler on/off.

Note that this needs to be before the handler
it toggles in the handler order,
so you need to use


A space cadet ( pass through on tap on / off on pressed + other keys ) that turns a handler on / off . Note that this needs to be before the handler it toggles in the handler order so you need to use
pub fn space_cadet_handler(
    trigger: impl AcceptsKeycode,
    action: KeyCode,
    id: HandlerID,
) -> Box<SpaceCadet<KeyCode, ActionHandler>> {
    Box::new(SpaceCadet::new(trigger, action, ActionHandler { id }))
}
pub fn space_cadet_handler ( trigger : impl AcceptsKeycode , action : KeyCode , id : HandlerID , ) -> Box < SpaceCadet < KeyCode , ActionHandler > > { Box :: new ( SpaceCadet :: new ( trigger , action , ActionHandler { id } ) ) }
A space cadet (pass through on tap,
on/off on pressed+other keys)
that turns a handler on/off.
A space cadet ( pass through on tap on / off on pressed + other keys ) that turns a handler on / off .
trigger
impl AcceptsKeycode
action
KeyCode
id
HandlerID