Enum rdev::EventType[][src]

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 OSs, the current EventType choices are a mix and 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)

Mouse Button

ButtonRelease(Button)
MouseMove

Values in pixels. EventType::MouseMove{x: 0, y: 0} corresponds to the top left corner, with x increasing downward and y increasing rightward

Fields of MouseMove

x: f64y: f64
Wheel

delta_y represents vertical scroll and delta_x represents horizontal scroll. Positive values correspond to scrolling up or right and negative values correspond to scrolling down or left Note: Linux does not support horizontal scroll. When simulating scroll on Linux, only the sign of delta_y is considered, and not the magnitude to determine wheelup or wheeldown.

Fields of Wheel

delta_x: i64delta_y: i64

Trait Implementations

impl Clone for EventType[src]

impl Copy for EventType[src]

impl Debug for EventType[src]

impl PartialEq<EventType> for EventType[src]

impl StructuralPartialEq 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> ToOwned for T where
    T: Clone
[src]

type Owned = T

The resulting type after obtaining ownership.

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.