[−][src]Struct buttons::KeyboardInput
An object that has methods for registering keyboard inputs this frame.
It must be dropped before the underlying Keyboard
can be queried.
Methods
impl<'a, Key, Mods> KeyboardInput<'a, Key, Mods> where
Key: Copy + PartialEq,
Mods: Copy + Default,
[src]
Key: Copy + PartialEq,
Mods: Copy + Default,
pub fn press(&mut self, key: Key) -> &mut Self
[src]
Register that a key was pressed down.
pub fn release(&mut self, key: Key) -> &mut Self
[src]
Register that a key was released.
pub fn set_modifiers(&mut self, modifiers: Mods) -> &mut Self
[src]
Register that the current state of the modifier keys has changed.
pub fn handle_event<E: Event<Self>>(&mut self, event: &E) -> &mut Self
[src]
Convenience method for handling events. The type of event, E
, will
vary depending on the windowing library being used.
Trait Implementations
impl<'a> Event<KeyboardInput<'a, VirtualKeyCode, ModifiersState>> for WinitEvent
[src]
fn handle(&self, keyboard: &mut KeyboardInput<VirtualKeyCode, ModifiersState>)
[src]
impl<'a> Event<KeyboardInput<'a, VirtualKeyCode, ModifiersState>> for WindowEvent
[src]
fn handle(&self, keyboard: &mut KeyboardInput<VirtualKeyCode, ModifiersState>)
[src]
Auto Trait Implementations
impl<'a, Key, Mods> RefUnwindSafe for KeyboardInput<'a, Key, Mods> where
Key: RefUnwindSafe,
Mods: RefUnwindSafe,
Key: RefUnwindSafe,
Mods: RefUnwindSafe,
impl<'a, Key, Mods> Send for KeyboardInput<'a, Key, Mods> where
Key: Send,
Mods: Send,
Key: Send,
Mods: Send,
impl<'a, Key, Mods> Sync for KeyboardInput<'a, Key, Mods> where
Key: Sync,
Mods: Sync,
Key: Sync,
Mods: Sync,
impl<'a, Key, Mods> Unpin for KeyboardInput<'a, Key, Mods>
impl<'a, Key, Mods> !UnwindSafe for KeyboardInput<'a, Key, Mods>
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<T> From<T> for T
[src]
impl<T, U> Into<U> for T where
U: From<T>,
[src]
U: From<T>,
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>,