pub struct System<D: Keys> { /* private fields */ }
Expand description
Aggregate key::System implementation.
Implementations§
Source§impl<const AUTOMATION: usize, const CALLBACK: usize, const CHORDED: usize, const CHORDED_AUXILIARY: usize, const KEYBOARD: usize, const LAYERED: usize, const LAYER_MODIFIERS: usize, const STICKY: usize, const TAP_DANCE: usize, const TAP_HOLD: usize> System<KeyArrays<AUTOMATION, CALLBACK, CHORDED, CHORDED_AUXILIARY, KEYBOARD, LAYERED, LAYER_MODIFIERS, STICKY, TAP_DANCE, TAP_HOLD>>
impl<const AUTOMATION: usize, const CALLBACK: usize, const CHORDED: usize, const CHORDED_AUXILIARY: usize, const KEYBOARD: usize, const LAYERED: usize, const LAYER_MODIFIERS: usize, const STICKY: usize, const TAP_DANCE: usize, const TAP_HOLD: usize> System<KeyArrays<AUTOMATION, CALLBACK, CHORDED, CHORDED_AUXILIARY, KEYBOARD, LAYERED, LAYER_MODIFIERS, STICKY, TAP_DANCE, TAP_HOLD>>
Sourcepub const fn array_based(
automation: AutomationSystem<[AutomationKey; AUTOMATION]>,
callback: CallbackSystem<[CallbackKey; CALLBACK]>,
chorded: ChordedSystem<[ChordedKey; CHORDED], [ChordedAuxiliaryKey; CHORDED_AUXILIARY]>,
keyboard: KeyboardSystem<[KeyboardKey; KEYBOARD]>,
layered: LayeredSystem<[LayeredModifierKey; LAYER_MODIFIERS], [LayeredKey; LAYERED]>,
sticky: StickySystem<[StickyKey; STICKY]>,
tap_dance: TapDanceSystem<[TapDanceKey; TAP_DANCE]>,
tap_hold: TapHoldSystem<[TapHoldKey; TAP_HOLD]>,
) -> Self
pub const fn array_based( automation: AutomationSystem<[AutomationKey; AUTOMATION]>, callback: CallbackSystem<[CallbackKey; CALLBACK]>, chorded: ChordedSystem<[ChordedKey; CHORDED], [ChordedAuxiliaryKey; CHORDED_AUXILIARY]>, keyboard: KeyboardSystem<[KeyboardKey; KEYBOARD]>, layered: LayeredSystem<[LayeredModifierKey; LAYER_MODIFIERS], [LayeredKey; LAYERED]>, sticky: StickySystem<[StickyKey; STICKY]>, tap_dance: TapDanceSystem<[TapDanceKey; TAP_DANCE]>, tap_hold: TapHoldSystem<[TapHoldKey; TAP_HOLD]>, ) -> Self
Constructs a new System.
Source§impl System<KeyVecs>
impl System<KeyVecs>
Sourcepub const fn vec_based(
automation: AutomationSystem<Vec<AutomationKey>>,
callback: CallbackSystem<Vec<CallbackKey>>,
chorded: ChordedSystem<Vec<ChordedKey>, Vec<ChordedAuxiliaryKey>>,
keyboard: KeyboardSystem<Vec<KeyboardKey>>,
layered: LayeredSystem<Vec<LayeredModifierKey>, Vec<LayeredKey>>,
sticky: StickySystem<Vec<StickyKey>>,
tap_dance: TapDanceSystem<Vec<TapDanceKey>>,
tap_hold: TapHoldSystem<Vec<TapHoldKey>>,
) -> Self
pub const fn vec_based( automation: AutomationSystem<Vec<AutomationKey>>, callback: CallbackSystem<Vec<CallbackKey>>, chorded: ChordedSystem<Vec<ChordedKey>, Vec<ChordedAuxiliaryKey>>, keyboard: KeyboardSystem<Vec<KeyboardKey>>, layered: LayeredSystem<Vec<LayeredModifierKey>, Vec<LayeredKey>>, sticky: StickySystem<Vec<StickyKey>>, tap_dance: TapDanceSystem<Vec<TapDanceKey>>, tap_hold: TapHoldSystem<Vec<TapHoldKey>>, ) -> 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>where
<D as Keys>::Automation: Freeze,
<D as Keys>::Callback: Freeze,
<D as Keys>::Chorded: Freeze,
<D as Keys>::ChordedAuxiliary: Freeze,
<D as Keys>::Keyboard: Freeze,
<D as Keys>::LayerModifiers: Freeze,
<D as Keys>::Layered: Freeze,
<D as Keys>::Sticky: Freeze,
<D as Keys>::TapDance: Freeze,
<D as Keys>::TapHold: Freeze,
impl<D> RefUnwindSafe for System<D>where
<D as Keys>::Automation: RefUnwindSafe,
<D as Keys>::Callback: RefUnwindSafe,
<D as Keys>::Chorded: RefUnwindSafe,
<D as Keys>::ChordedAuxiliary: RefUnwindSafe,
<D as Keys>::Keyboard: RefUnwindSafe,
<D as Keys>::LayerModifiers: RefUnwindSafe,
<D as Keys>::Layered: RefUnwindSafe,
<D as Keys>::Sticky: RefUnwindSafe,
<D as Keys>::TapDance: RefUnwindSafe,
<D as Keys>::TapHold: RefUnwindSafe,
D: RefUnwindSafe,
impl<D> Send for System<D>where
<D as Keys>::Automation: Send,
<D as Keys>::Callback: Send,
<D as Keys>::Chorded: Send,
<D as Keys>::ChordedAuxiliary: Send,
<D as Keys>::Keyboard: Send,
<D as Keys>::LayerModifiers: Send,
<D as Keys>::Layered: Send,
<D as Keys>::Sticky: Send,
<D as Keys>::TapDance: Send,
<D as Keys>::TapHold: Send,
D: Send,
impl<D> Sync for System<D>where
<D as Keys>::Automation: Sync,
<D as Keys>::Callback: Sync,
<D as Keys>::Chorded: Sync,
<D as Keys>::ChordedAuxiliary: Sync,
<D as Keys>::Keyboard: Sync,
<D as Keys>::LayerModifiers: Sync,
<D as Keys>::Layered: Sync,
<D as Keys>::Sticky: Sync,
<D as Keys>::TapDance: Sync,
<D as Keys>::TapHold: Sync,
D: Sync,
impl<D> Unpin for System<D>where
<D as Keys>::Automation: Unpin,
<D as Keys>::Callback: Unpin,
<D as Keys>::Chorded: Unpin,
<D as Keys>::ChordedAuxiliary: Unpin,
<D as Keys>::Keyboard: Unpin,
<D as Keys>::LayerModifiers: Unpin,
<D as Keys>::Layered: Unpin,
<D as Keys>::Sticky: Unpin,
<D as Keys>::TapDance: Unpin,
<D as Keys>::TapHold: Unpin,
D: Unpin,
impl<D> UnwindSafe for System<D>where
<D as Keys>::Automation: UnwindSafe,
<D as Keys>::Callback: UnwindSafe,
<D as Keys>::Chorded: UnwindSafe,
<D as Keys>::ChordedAuxiliary: UnwindSafe,
<D as Keys>::Keyboard: UnwindSafe,
<D as Keys>::LayerModifiers: UnwindSafe,
<D as Keys>::Layered: UnwindSafe,
<D as Keys>::Sticky: UnwindSafe,
<D as Keys>::TapDance: UnwindSafe,
<D as Keys>::TapHold: 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