pub struct KeyEvent { /* private fields */ }Expand description
A key-down event whose consumption state is shared with the Host boundary.
Implementations§
Source§impl KeyEvent
impl KeyEvent
pub fn new( key: Key, shift_key: bool, ctrl_key: bool, alt_key: bool, meta_key: bool, ) -> Self
pub fn key(&self) -> Key
pub fn shift_key(&self) -> bool
pub fn ctrl_key(&self) -> bool
pub fn alt_key(&self) -> bool
pub fn meta_key(&self) -> bool
pub fn consume(&self)
pub fn consumed(&self) -> bool
Trait Implementations§
Auto Trait Implementations§
impl !RefUnwindSafe for KeyEvent
impl !Send for KeyEvent
impl !Sync for KeyEvent
impl !UnwindSafe for KeyEvent
impl Freeze for KeyEvent
impl Unpin for KeyEvent
impl UnsafeUnpin for KeyEvent
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