[][src]Enum rdev::EventType

pub enum EventType {
    KeyPress(Key),
    KeyRelease(Key),
    ButtonPress(Button),
    ButtonRelease(Button),
    MouseMove {
        x: f64,
        y: f64,
    },
    Wheel {
        delta_x: i64,
        delta_y: i64,
    },
}

In order to manage different OS, the current EventType choices is a mix&match to account for all possible events.

Variants

KeyPress(Key)

The keys correspond to a standard qwerty layout, they don't correspond To the actual letter a user would use, that requires some layout logic to be added.

KeyRelease(Key)
ButtonPress(Button)

Some mouse will have more than 3 buttons, these are not defined, and different OS will give different Unknown code.

ButtonRelease(Button)
MouseMove

Values in pixels

Fields of MouseMove

x: f64y: f64
Wheel

Note: On Linux, there is no actual delta the actual values are ignored for delta_x and we only look at the sign of delta_y to simulate wheelup or wheeldown.

Fields of Wheel

delta_x: i64delta_y: i64

Trait Implementations

impl Debug for EventType[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.