Struct sdl2::keyboard::KeyboardUtil

source ·
pub struct KeyboardUtil { /* private fields */ }
Expand description

Keyboard utility functions. Access with Sdl::keyboard().

let sdl_context = sdl2::init().unwrap();

let focused = sdl_context.keyboard().focused_window_id().is_some();

Implementations

Gets the id of the window which currently has keyboard focus.

Auto Trait Implementations

Blanket Implementations

Gets the TypeId of self. Read more
Immutably borrows from an owned value. Read more
Mutably borrows from an owned value. Read more

Returns the argument unchanged.

Calls U::from(self).

That is, this conversion is whatever the implementation of From<T> for U chooses to do.

The type returned in the event of a conversion error.
Performs the conversion.
The type returned in the event of a conversion error.
Performs the conversion.