pub struct PressedKeyState<K: Key> { /* private fields */ }
Expand description
The state of a pressed tap-hold key.
Implementations§
Source§impl<K: Key> PressedKeyState<K>
impl<K: Key> PressedKeyState<K>
Sourcepub fn map_pressed_key<T: Key>(
self,
f: fn(_: K::PressedKey) -> T::PressedKey,
) -> PressedKeyState<T>
pub fn map_pressed_key<T: Key>( self, f: fn(_: K::PressedKey) -> T::PressedKey, ) -> PressedKeyState<T>
Maps the Key of the PressedKeyState into a new type.
Sourcepub fn into_pressed_key<T: Key>(self) -> PressedKeyState<T>
pub fn into_pressed_key<T: Key>(self) -> PressedKeyState<T>
Maps the Key of the PressedKeyState into a new type.
Sourcepub fn key_output(&self) -> KeyOutputState
pub fn key_output(&self) -> KeyOutputState
Returns the key output state.
Trait Implementations§
Source§impl<K: Debug + Key> Debug for PressedKeyState<K>where
K::PressedKey: Debug,
impl<K: Debug + Key> Debug for PressedKeyState<K>where
K::PressedKey: Debug,
Source§impl<K: TapHoldNestable> From<PressedKeyState<K>> for TapHoldPressedKeyState<K>
impl<K: TapHoldNestable> From<PressedKeyState<K>> for TapHoldPressedKeyState<K>
Source§fn from(pks: PressedKeyState<K>) -> Self
fn from(pks: PressedKeyState<K>) -> Self
Converts to this type from the input type.
Source§impl<K: PartialEq + Key> PartialEq for PressedKeyState<K>where
K::PressedKey: PartialEq,
impl<K: PartialEq + Key> PartialEq for PressedKeyState<K>where
K::PressedKey: PartialEq,
impl<K: Key> StructuralPartialEq for PressedKeyState<K>
Auto Trait Implementations§
impl<K> Freeze for PressedKeyState<K>
impl<K> RefUnwindSafe for PressedKeyState<K>
impl<K> Send for PressedKeyState<K>
impl<K> Sync for PressedKeyState<K>
impl<K> Unpin for PressedKeyState<K>
impl<K> UnwindSafe for PressedKeyState<K>
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