Struct rich_sdl2_rust::event::keyboard::KeyboardEvent
source · pub struct KeyboardEvent {
pub timestamp: u32,
pub window_id: u32,
pub is_pressed: bool,
pub is_repeated: bool,
pub symbol: KeySymbol,
}Expand description
An event on interacting to the keyboard.
Fields§
§timestamp: u32When this event occurred.
window_id: u32The id of the window focused.
is_pressed: boolWhether the key of symbol is pressed.
is_repeated: boolWhether the key of symbol is repeated.
symbol: KeySymbolThe pressed/released symbol.
Trait Implementations§
source§impl Clone for KeyboardEvent
impl Clone for KeyboardEvent
source§fn clone(&self) -> KeyboardEvent
fn clone(&self) -> KeyboardEvent
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 Debug for KeyboardEvent
impl Debug for KeyboardEvent
source§impl From<SDL_KeyboardEvent> for KeyboardEvent
impl From<SDL_KeyboardEvent> for KeyboardEvent
source§impl PartialEq for KeyboardEvent
impl PartialEq for KeyboardEvent
source§fn eq(&self, other: &KeyboardEvent) -> bool
fn eq(&self, other: &KeyboardEvent) -> bool
This method tests for
self and other values to be equal, and is used
by ==.impl Eq for KeyboardEvent
impl StructuralPartialEq for KeyboardEvent
Auto Trait Implementations§
impl RefUnwindSafe for KeyboardEvent
impl Send for KeyboardEvent
impl Sync for KeyboardEvent
impl Unpin for KeyboardEvent
impl UnwindSafe for KeyboardEvent
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