pub struct System<D: Keys> { /* private fields */ }
Expand description
Aggregate key::System implementation.
Implementations§
Source§impl<const KEYBOARD: usize, const CALLBACK: usize, const STICKY: usize, const TAP_DANCE: usize, const TAP_HOLD: usize, const LAYER_MODIFIERS: usize, const LAYERED: usize, const CHORDED: usize, const CHORDED_AUXILIARY: usize> System<KeyArrays<KEYBOARD, CALLBACK, STICKY, TAP_DANCE, TAP_HOLD, LAYER_MODIFIERS, LAYERED, CHORDED, CHORDED_AUXILIARY>>
impl<const KEYBOARD: usize, const CALLBACK: usize, const STICKY: usize, const TAP_DANCE: usize, const TAP_HOLD: usize, const LAYER_MODIFIERS: usize, const LAYERED: usize, const CHORDED: usize, const CHORDED_AUXILIARY: usize> System<KeyArrays<KEYBOARD, CALLBACK, STICKY, TAP_DANCE, TAP_HOLD, LAYER_MODIFIERS, LAYERED, CHORDED, CHORDED_AUXILIARY>>
Sourcepub const fn array_based(
keyboard: System<[Key; KEYBOARD]>,
callback: System<[Key; CALLBACK]>,
sticky: System<[Key; STICKY]>,
tap_dance: System<Ref, [Key<Ref>; TAP_DANCE]>,
tap_hold: System<Ref, [Key<Ref>; TAP_HOLD]>,
layered: System<Ref, [ModifierKey; LAYER_MODIFIERS], [LayeredKey<Ref>; LAYERED]>,
chorded: System<Ref, [Key<Ref>; CHORDED], [AuxiliaryKey<Ref>; CHORDED_AUXILIARY]>,
) -> Self
pub const fn array_based( keyboard: System<[Key; KEYBOARD]>, callback: System<[Key; CALLBACK]>, sticky: System<[Key; STICKY]>, tap_dance: System<Ref, [Key<Ref>; TAP_DANCE]>, tap_hold: System<Ref, [Key<Ref>; TAP_HOLD]>, layered: System<Ref, [ModifierKey; LAYER_MODIFIERS], [LayeredKey<Ref>; LAYERED]>, chorded: System<Ref, [Key<Ref>; CHORDED], [AuxiliaryKey<Ref>; CHORDED_AUXILIARY]>, ) -> Self
Constructs a new System.
Source§impl System<KeyVecs>
impl System<KeyVecs>
Sourcepub const fn vec_based(
keyboard: System<<KeyVecs as Keys>::Keyboard>,
callback: System<<KeyVecs as Keys>::Callback>,
sticky: System<<KeyVecs as Keys>::Sticky>,
tap_dance: System<Ref, <KeyVecs as Keys>::TapDance>,
tap_hold: System<Ref, <KeyVecs as Keys>::TapHold>,
layered: System<Ref, <KeyVecs as Keys>::LayerModifiers, <KeyVecs as Keys>::Layered>,
chorded: System<Ref, <KeyVecs as Keys>::Chorded, <KeyVecs as Keys>::ChordedAuxiliary>,
) -> Self
pub const fn vec_based( keyboard: System<<KeyVecs as Keys>::Keyboard>, callback: System<<KeyVecs as Keys>::Callback>, sticky: System<<KeyVecs as Keys>::Sticky>, tap_dance: System<Ref, <KeyVecs as Keys>::TapDance>, tap_hold: System<Ref, <KeyVecs as Keys>::TapHold>, layered: System<Ref, <KeyVecs as Keys>::LayerModifiers, <KeyVecs as Keys>::Layered>, chorded: System<Ref, <KeyVecs as Keys>::Chorded, <KeyVecs as Keys>::ChordedAuxiliary>, ) -> Self
Constructs a new System.
Trait Implementations§
Source§impl<K: Debug + Keys> System<Ref> for System<K>
impl<K: Debug + Keys> System<Ref> for System<K>
Source§type Context = Context
type Context = Context
The associated Context is used to provide state that
may affect behaviour when pressing the key.
(e.g. the behaviour of layered::LayeredKey depends on which
layers are active in layered::Context).
Source§type Event = Event
type Event = Event
The associated
Event
is to be handled by the associated Context,
pending key states, and key states.Source§type PendingKeyState = PendingKeyState
type PendingKeyState = PendingKeyState
Associated pending key state.
Source§fn new_pressed_key(
&self,
keymap_index: u16,
context: &Self::Context,
key_ref: Ref,
) -> (PressedKeyResult<Ref, Self::PendingKeyState, Self::KeyState>, KeyEvents<Self::Event>)
fn new_pressed_key( &self, keymap_index: u16, context: &Self::Context, key_ref: Ref, ) -> (PressedKeyResult<Ref, Self::PendingKeyState, Self::KeyState>, KeyEvents<Self::Event>)
Produces a pressed key value, and may
yield some ScheduledEvents.
(e.g. tap_hold::Key schedules a tap_hold::Event::TapHoldTimeout
so that holding the key resolves as a hold).
Source§fn update_pending_state(
&self,
pending_state: &mut Self::PendingKeyState,
keymap_index: u16,
context: &Self::Context,
key_ref: Ref,
event: Event<Self::Event>,
) -> (Option<NewPressedKey<Ref>>, KeyEvents<Self::Event>)
fn update_pending_state( &self, pending_state: &mut Self::PendingKeyState, keymap_index: u16, context: &Self::Context, key_ref: Ref, event: Event<Self::Event>, ) -> (Option<NewPressedKey<Ref>>, KeyEvents<Self::Event>)
Update the given pending key state with the given impl.
impl<D: Copy + Keys> Copy for System<D>
impl<D: Keys> StructuralPartialEq for System<D>
Auto Trait Implementations§
impl<D> Freeze for System<D>
impl<D> RefUnwindSafe for System<D>where
<D as Keys>::Keyboard: RefUnwindSafe,
<D as Keys>::Callback: RefUnwindSafe,
<D as Keys>::Sticky: RefUnwindSafe,
<D as Keys>::TapDance: RefUnwindSafe,
<D as Keys>::TapHold: RefUnwindSafe,
<D as Keys>::LayerModifiers: RefUnwindSafe,
<D as Keys>::Layered: RefUnwindSafe,
<D as Keys>::Chorded: RefUnwindSafe,
<D as Keys>::ChordedAuxiliary: RefUnwindSafe,
D: RefUnwindSafe,
impl<D> Send for System<D>
impl<D> Sync for System<D>
impl<D> Unpin for System<D>
impl<D> UnwindSafe for System<D>where
<D as Keys>::Keyboard: UnwindSafe,
<D as Keys>::Callback: UnwindSafe,
<D as Keys>::Sticky: UnwindSafe,
<D as Keys>::TapDance: UnwindSafe,
<D as Keys>::TapHold: UnwindSafe,
<D as Keys>::LayerModifiers: UnwindSafe,
<D as Keys>::Layered: UnwindSafe,
<D as Keys>::Chorded: UnwindSafe,
<D as Keys>::ChordedAuxiliary: UnwindSafe,
D: UnwindSafe,
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more