pub enum Key {
Named(NamedKey),
Character(String),
Dead(Option<String>),
Unidentified,
}Expand description
Platform-neutral key representation.
Mapping from winit logical/physical keys is performed in ailloli_ui_winit.
§Examples
use ailloli_ui_core::event::{Key, NamedKey};
let key = Key::Named(NamedKey::Enter);
assert!(matches!(key, Key::Named(NamedKey::Enter)));Variants§
Named(NamedKey)
Named special key.
Character(String)
Printable Unicode string (usually one character).
Dead(Option<String>)
Dead key accent, if any.
Unidentified
Key could not be identified.
Trait Implementations§
impl Eq for Key
impl StructuralPartialEq for Key
Auto Trait Implementations§
impl Freeze for Key
impl RefUnwindSafe for Key
impl Send for Key
impl Sync for Key
impl Unpin for Key
impl UnwindSafe for Key
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