pub struct KeyBuf { /* private fields */ }Expand description
A container for Window-based keyboard input events.
NOTE: Keys pressed and released during a single update (is that possible, really?) will show as both released and pressed.
Implementations
sourceimpl KeyBuf
impl KeyBuf
pub fn any_held(&self) -> bool
pub fn any_pressed(&self) -> bool
pub fn any_released(&self) -> bool
pub fn chars(&self) -> impl Iterator<Item = char> + '_
pub fn handle_event(&mut self, event: &Event<'_, ()>) -> bool
pub fn is_held(&self, key: &VirtualKeyCode) -> bool
pub fn is_pressed(&self, key: &VirtualKeyCode) -> bool
pub fn is_released(&self, key: &VirtualKeyCode) -> bool
pub fn held(&self) -> impl Iterator<Item = VirtualKeyCode> + '_
pub fn pressed(&self) -> impl Iterator<Item = VirtualKeyCode> + '_
pub fn released(&self) -> impl Iterator<Item = VirtualKeyCode> + '_
Trait Implementations
Auto Trait Implementations
impl RefUnwindSafe for KeyBuf
impl Send for KeyBuf
impl Sync for KeyBuf
impl Unpin for KeyBuf
impl UnwindSafe for KeyBuf
Blanket Implementations
sourceimpl<T> BorrowMut<T> for T where
T: ?Sized,
impl<T> BorrowMut<T> for T where
T: ?Sized,
const: unstable · sourcefn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more