pub type ChordedPressedKey<K> = PressedKey<ChordedKey<K>, ChordedPressedKeyState<K>>;
Expand description
Convenience type alias for a key::PressedKey with a layered key.
Aliased Type§
struct ChordedPressedKey<K> {
pub keymap_index: u16,
pub key: ChordedKey<K>,
pub pressed_key_state: ChordedPressedKeyState<K>,
}
Fields§
§keymap_index: u16
The index of the pressed key in some keymap.
key: ChordedKey<K>
The pressed key.
pressed_key_state: ChordedPressedKeyState<K>
The pressed key state.
Implementations
Source§impl<K, S> PressedKey<K, S>
impl<K, S> PressedKey<K, S>
Sourcepub fn map_pressed_key<IK, IS>(
self,
f_k: fn(_: K) -> IK,
f_s: fn(_: S) -> IS,
) -> PressedKey<IK, IS>
pub fn map_pressed_key<IK, IS>( self, f_k: fn(_: K) -> IK, f_s: fn(_: S) -> IS, ) -> PressedKey<IK, IS>
Maps the key and pressed key state of the PressedKey to a new type.
Sourcepub fn into_pressed_key<IK, IS>(self) -> PressedKey<IK, IS>
pub fn into_pressed_key<IK, IS>(self) -> PressedKey<IK, IS>
Transforms the PressedKey to a new type.
Trait Implementations
Source§impl<K: Clone, S: Clone> Clone for PressedKey<K, S>
impl<K: Clone, S: Clone> Clone for PressedKey<K, S>
Source§fn clone(&self) -> PressedKey<K, S>
fn clone(&self) -> PressedKey<K, S>
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: Key, S: PressedKeyState<K, Context = K::Context, Event = K::Event>> PressedKey for PressedKey<K, S>
impl<K: Key, S: PressedKeyState<K, Context = K::Context, Event = K::Event>> PressedKey for PressedKey<K, S>
Source§fn handle_event(
&mut self,
context: Self::Context,
event: Event<Self::Event>,
) -> PressedKeyEvents<Self::Event>
fn handle_event( &mut self, context: Self::Context, event: Event<Self::Event>, ) -> PressedKeyEvents<Self::Event>
Used to update the PressedKey’s state, and possibly yield event(s).
Source§fn key_output(&self) -> KeyOutputState
fn key_output(&self) -> KeyOutputState
Output for the pressed key.