pub enum ChordedKey<K: ChordedNestable> {
Chorded(Key<K>),
Auxiliary(AuxiliaryKey<K>),
Pass(K),
}
Expand description
An aggregate of key::Key types.
Variants§
Implementations§
Source§impl<K: ChordedNestable> ChordedKey<K>
impl<K: ChordedNestable> ChordedKey<K>
Sourcepub fn as_fat_key(self) -> ChordedKey<LayeredKey<TapHoldKey<BaseKey>>>
pub fn as_fat_key(self) -> ChordedKey<LayeredKey<TapHoldKey<BaseKey>>>
Constructs a ‘fat’ key value from the given chorded key.
Source§impl ChordedKey<LayeredKey<TapHoldKey<BaseKey>>>
impl ChordedKey<LayeredKey<TapHoldKey<BaseKey>>>
Sourcepub const fn keyboard(key: Key) -> Self
pub const fn keyboard(key: Key) -> Self
Constructs a [Key] from the given key::keyboard::Key.
Sourcepub const fn tap_hold(key: Key<BaseKey>) -> Self
pub const fn tap_hold(key: Key<BaseKey>) -> Self
Constructs a [Key] from the given key::tap_hold::Key.
Sourcepub const fn layer_modifier(key: ModifierKey) -> Self
pub const fn layer_modifier(key: ModifierKey) -> Self
Constructs a [Key] from the given key::layered::ModifierKey.
Source§impl<K: LayeredNestable> ChordedKey<LayeredKey<K>>
impl<K: LayeredNestable> ChordedKey<LayeredKey<K>>
Sourcepub const fn layered(key: LayeredKey<K>) -> Self
pub const fn layered(key: LayeredKey<K>) -> Self
Constructs a [Key] from the given key::layered::LayeredKey.
Trait Implementations§
Source§impl<K: Clone + ChordedNestable> Clone for ChordedKey<K>
impl<K: Clone + ChordedNestable> Clone for ChordedKey<K>
Source§fn clone(&self) -> ChordedKey<K>
fn clone(&self) -> ChordedKey<K>
Returns a copy of the value. Read more
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source
. Read moreSource§impl<K: Debug + ChordedNestable> Debug for ChordedKey<K>
impl<K: Debug + ChordedNestable> Debug for ChordedKey<K>
Source§impl<'de, K> Deserialize<'de> for ChordedKey<K>where
K: Deserialize<'de> + ChordedNestable,
impl<'de, K> Deserialize<'de> for ChordedKey<K>where
K: Deserialize<'de> + ChordedNestable,
Source§fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
Deserialize this value from the given Serde deserializer. Read more
Source§impl<K: ChordedNestable> Key for ChordedKey<K>
impl<K: ChordedNestable> Key for ChordedKey<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 PressedKey = PressedKey<ChordedKey<LayeredKey<TapHoldKey<BaseKey>>>, ChordedPressedKeyState<LayeredKey<TapHoldKey<BaseKey>>>>
type PressedKey = PressedKey<ChordedKey<LayeredKey<TapHoldKey<BaseKey>>>, ChordedPressedKeyState<LayeredKey<TapHoldKey<BaseKey>>>>
The associated PressedKeyState implements functionality
for the pressed key.
(e.g. tap_hold::PressedKeyState implements behaviour resolving
the pressed tap hold key as either ‘tap’ or ‘hold’).
Source§fn new_pressed_key(
&self,
context: Self::Context,
keymap_index: u16,
) -> (Self::PressedKey, PressedKeyEvents<Self::Event>)
fn new_pressed_key( &self, context: Self::Context, keymap_index: u16, ) -> (Self::PressedKey, PressedKeyEvents<Self::Event>)
Key::new_pressed_key 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§impl<K: PartialEq + ChordedNestable> PartialEq for ChordedKey<K>
impl<K: PartialEq + ChordedNestable> PartialEq for ChordedKey<K>
impl<K: Copy + ChordedNestable> Copy for ChordedKey<K>
impl<K: ChordedNestable> StructuralPartialEq for ChordedKey<K>
Auto Trait Implementations§
impl<K> Freeze for ChordedKey<K>where
K: Freeze,
impl<K> RefUnwindSafe for ChordedKey<K>where
K: RefUnwindSafe,
impl<K> Send for ChordedKey<K>where
K: Send,
impl<K> Sync for ChordedKey<K>where
K: Sync,
impl<K> Unpin for ChordedKey<K>where
K: Unpin,
impl<K> UnwindSafe for ChordedKey<K>where
K: 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