Enum gg::event::KeyState [] [src]

pub enum KeyState {
    Pressed(f64),
    Held(f64),
    Released(f64),
    NotPressed(f64),
}

An enum allowing us to communicate what state a given Key is at. The f64 in each variant tells you since when the key was last pressed. A value of 0 indicating that it has never been pressed.

Variants

Pressed

The key has been pressed this tick

Held

A key that has been held down for some time

Released

The key has just been released

NotPressed

The Key is currently not pressed

Trait Implementations

Derived Implementations

impl Debug for KeyState

fn fmt(&self, __arg_0: &mut Formatter) -> Result

impl Clone for KeyState

fn clone(&self) -> KeyState

fn clone_from(&mut self, source: &Self)

impl Copy for KeyState