[][src]Struct keycode::KeyboardState

pub struct KeyboardState { /* fields omitted */ }

Keyboard state that helps manage pressed keys, rollover, and generating USB HID reports

Methods

impl<'a> KeyboardState[src]

pub fn new(key_rollover: Option<usize>) -> KeyboardState[src]

Create a new keyboard state

pub fn update_key(&mut self, key: KeyMap, state: KeyState)[src]

Update the keyboard state with a key's new state

pub fn usb_input_report(&mut self) -> &[u8][src]

Generate a USB HID report

Trait Implementations

impl Clone for KeyboardState[src]

impl Debug for KeyboardState[src]

impl Eq for KeyboardState[src]

impl Hash for KeyboardState[src]

impl PartialEq<KeyboardState> for KeyboardState[src]

impl StructuralEq for KeyboardState[src]

impl StructuralPartialEq for KeyboardState[src]

Auto Trait Implementations

Blanket Implementations

impl<T> Any for T where
    T: 'static + ?Sized
[src]

impl<T> Borrow<T> for T where
    T: ?Sized
[src]

impl<T> BorrowMut<T> for T where
    T: ?Sized
[src]

impl<T> From<T> for T[src]

impl<T, U> Into<U> for T where
    U: From<T>, 
[src]

impl<T, U> TryFrom<U> for T where
    U: Into<T>, 
[src]

type Error = Infallible

The type returned in the event of a conversion error.

impl<T, U> TryInto<U> for T where
    U: TryFrom<T>, 
[src]

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.