[−][src]Struct orbtk_api::application::KeyboardState
Contains the state information for the keyboard.
This currently tracks which keys are currently pressed.
The key state is stored in a lazy-loaded HashMap.
There are several convenience methods to check common modifiers (ctrl, shift, alt, etc). This is useful if you don't care which shift key is down.
Implementations
impl KeyboardState
[src]
pub fn set_key_state(&mut self, key: Key, pressed: bool)
[src]
Sets whether or not the given key is currently pressed
pub fn is_key_down(&self, key: Key) -> bool
[src]
Returns whether or not the requested key is pressed
pub fn is_shift_down(&self) -> bool
[src]
Returns whether or not any shift key is down.
pub fn is_alt_down(&self) -> bool
[src]
Returns whether or not any alt key is down.
pub fn is_ctrl_down(&self) -> bool
[src]
Returns whether or not any control key is down.
pub fn is_home_down(&self) -> bool
[src]
Returns whether or not any home key is down.
Trait Implementations
impl Clone for KeyboardState
[src]
fn clone(&self) -> KeyboardState
[src]
fn clone_from(&mut self, source: &Self)
1.0.0[src]
impl Debug for KeyboardState
[src]
impl Default for KeyboardState
[src]
fn default() -> KeyboardState
[src]
impl PartialEq<KeyboardState> for KeyboardState
[src]
fn eq(&self, other: &KeyboardState) -> bool
[src]
fn ne(&self, other: &KeyboardState) -> bool
[src]
impl StructuralPartialEq for KeyboardState
[src]
Auto Trait Implementations
impl RefUnwindSafe for KeyboardState
impl Send for KeyboardState
impl Sync for KeyboardState
impl Unpin for KeyboardState
impl UnwindSafe for KeyboardState
Blanket Implementations
impl<T> Any for T where
T: 'static + ?Sized,
[src]
T: 'static + ?Sized,
impl<T> Borrow<T> for T where
T: ?Sized,
[src]
T: ?Sized,
impl<T> BorrowMut<T> for T where
T: ?Sized,
[src]
T: ?Sized,
fn borrow_mut(&mut self) -> &mut T
[src]
impl<E> Component for E where
E: Any,
[src]
E: Any,
impl<T> From<T> for T
[src]
impl<T, U> Into<U> for T where
U: From<T>,
[src]
U: From<T>,
impl<T> SetParameter for T
fn set<T>(&mut self, value: T) -> <T as Parameter<Self>>::Result where
T: Parameter<Self>,
T: Parameter<Self>,
impl<T> ToOwned for T where
T: Clone,
[src]
T: Clone,
type Owned = T
The resulting type after obtaining ownership.
fn to_owned(&self) -> T
[src]
fn clone_into(&self, target: &mut T)
[src]
impl<T, U> TryFrom<U> for T where
U: Into<T>,
[src]
U: Into<T>,
type Error = Infallible
The type returned in the event of a conversion error.
fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>
[src]
impl<T, U> TryInto<U> for T where
U: TryFrom<T>,
[src]
U: TryFrom<T>,