Struct fermium::events::SDL_KeyboardEvent
source · #[repr(C)]pub struct SDL_KeyboardEvent {
pub type_: SDL_EventType,
pub timestamp: u32,
pub windowID: u32,
pub state: u8,
pub repeat: u8,
pub padding2: u8,
pub padding3: u8,
pub keysym: SDL_Keysym,
}
Expand description
Keyboard button event structure (event.key.*)
Fields§
§type_: SDL_EventType
Should always be SDL_KEYDOWN
or SDL_KEYUP
.
timestamp: u32
§windowID: u32
The window with keyboard focus, if any.
state: u8
§repeat: u8
Non-zero if this is a key repeat.
padding2: u8
§padding3: u8
§keysym: SDL_Keysym
The key that was pressed or released.
Trait Implementations§
source§impl Clone for SDL_KeyboardEvent
impl Clone for SDL_KeyboardEvent
source§fn clone(&self) -> SDL_KeyboardEvent
fn clone(&self) -> SDL_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 SDL_KeyboardEvent
impl Debug for SDL_KeyboardEvent
source§impl Default for SDL_KeyboardEvent
impl Default for SDL_KeyboardEvent
source§fn default() -> SDL_KeyboardEvent
fn default() -> SDL_KeyboardEvent
Returns the “default value” for a type. Read more
source§impl Hash for SDL_KeyboardEvent
impl Hash for SDL_KeyboardEvent
source§impl Ord for SDL_KeyboardEvent
impl Ord for SDL_KeyboardEvent
source§fn cmp(&self, other: &SDL_KeyboardEvent) -> Ordering
fn cmp(&self, other: &SDL_KeyboardEvent) -> Ordering
1.21.0 · source§fn max(self, other: Self) -> Selfwhere
Self: Sized,
fn max(self, other: Self) -> Selfwhere Self: Sized,
Compares and returns the maximum of two values. Read more
source§impl PartialEq<SDL_KeyboardEvent> for SDL_KeyboardEvent
impl PartialEq<SDL_KeyboardEvent> for SDL_KeyboardEvent
source§fn eq(&self, other: &SDL_KeyboardEvent) -> bool
fn eq(&self, other: &SDL_KeyboardEvent) -> bool
This method tests for
self
and other
values to be equal, and is used
by ==
.source§impl PartialOrd<SDL_KeyboardEvent> for SDL_KeyboardEvent
impl PartialOrd<SDL_KeyboardEvent> for SDL_KeyboardEvent
source§fn partial_cmp(&self, other: &SDL_KeyboardEvent) -> Option<Ordering>
fn partial_cmp(&self, other: &SDL_KeyboardEvent) -> Option<Ordering>
1.0.0 · source§fn le(&self, other: &Rhs) -> bool
fn le(&self, other: &Rhs) -> bool
This method tests less than or equal to (for
self
and other
) and is used by the <=
operator. Read more