pub enum Key<C = SmolStr> {
Named(Named),
Character(C),
Unidentified,
}
Expand description
A key on the keyboard.
This is mostly the Key
type found in winit
.
Variants§
Named(Named)
A key with an established name.
Character(C)
A key string that corresponds to the character typed by the user, taking into account the user’s current locale setting, and any system-level keyboard mapping overrides that are in effect.
Unidentified
An unidentified key.
Implementations§
Trait Implementations§
Source§impl<C: Ord> Ord for Key<C>
impl<C: Ord> Ord for Key<C>
Source§impl<C: PartialOrd> PartialOrd for Key<C>
impl<C: PartialOrd> PartialOrd for Key<C>
impl<C: Eq> Eq for Key<C>
impl<C> StructuralPartialEq for Key<C>
Auto Trait Implementations§
impl<C> Freeze for Key<C>where
C: Freeze,
impl<C> RefUnwindSafe for Key<C>where
C: RefUnwindSafe,
impl<C> Send for Key<C>where
C: Send,
impl<C> Sync for Key<C>where
C: Sync,
impl<C> Unpin for Key<C>where
C: Unpin,
impl<C> UnwindSafe for Key<C>where
C: 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