[go: up one dir, main page]

Struct orbclient::event::KeyEvent [] [src]

pub struct KeyEvent {
    pub character: char,
    pub scancode: u8,
    pub pressed: bool,
}

A key event (such as a pressed key)

Fields

character: char

The charecter of the key

scancode: u8

The scancode of the key

pressed: bool

Was it pressed?

Methods

impl KeyEvent
[src]

fn to_event(&self) -> Event

Convert to an Event

fn from_event(event: Event) -> KeyEvent

Convert from an Event

Trait Implementations

impl Debug for KeyEvent
[src]

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

Formats the value using the given formatter.

impl Clone for KeyEvent
[src]

fn clone(&self) -> KeyEvent

Returns a copy of the value. Read more

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

Performs copy-assignment from source. Read more

impl Copy for KeyEvent
[src]