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: u32
When this event occurred.
window_id: u32
The id of the window focused.
is_pressed: bool
Whether the key of symbol is pressed.
is_repeated: bool
Whether the key of symbol is repeated.
symbol: KeySymbol
The 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§fn from(raw: SDL_KeyboardEvent) -> Self
fn from(raw: SDL_KeyboardEvent) -> Self
Converts to this type from the input type.
source§impl PartialEq<KeyboardEvent> for KeyboardEvent
impl PartialEq<KeyboardEvent> 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 ==
.