pub struct PressedKey<S> {
pub keymap_index: u16,
pub key_state: S,
}
Expand description
A struct for associating a crate::key::Key with a crate::key::KeyState.
Fields§
§keymap_index: u16
The index of the pressed key in some keymap.
key_state: S
The pressed key state.
Implementations§
Source§impl<Ctx, Ev, S: KeyState<Context = Ctx, Event = Ev>> PressedKey<S>
impl<Ctx, Ev, S: KeyState<Context = Ctx, Event = Ev>> PressedKey<S>
Sourcepub fn handle_event(&mut self, context: &Ctx, event: Event<Ev>) -> KeyEvents<Ev>
pub fn handle_event(&mut self, context: &Ctx, event: Event<Ev>) -> KeyEvents<Ev>
Convenience passthrough to key_state handle_event.
Sourcepub fn key_output(&self) -> Option<KeyOutput>
pub fn key_output(&self) -> Option<KeyOutput>
Convenience passthrough to key_state key_output.
Trait Implementations§
Source§impl<S: Clone> Clone for PressedKey<S>
impl<S: Clone> Clone for PressedKey<S>
Source§fn clone(&self) -> PressedKey<S>
fn clone(&self) -> PressedKey<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<S: Debug> Debug for PressedKey<S>
impl<S: Debug> Debug for PressedKey<S>
Source§impl<S: PartialEq> PartialEq for PressedKey<S>
impl<S: PartialEq> PartialEq for PressedKey<S>
impl<S: Copy> Copy for PressedKey<S>
impl<S> StructuralPartialEq for PressedKey<S>
Auto Trait Implementations§
impl<S> Freeze for PressedKey<S>where
S: Freeze,
impl<S> RefUnwindSafe for PressedKey<S>where
S: RefUnwindSafe,
impl<S> Send for PressedKey<S>where
S: Send,
impl<S> Sync for PressedKey<S>where
S: Sync,
impl<S> Unpin for PressedKey<S>where
S: Unpin,
impl<S> UnwindSafe for PressedKey<S>where
S: 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