Enum amethyst_input::InputEvent [] [src]

pub enum InputEvent<T> {
    KeyPressed {
        key_code: VirtualKeyCode,
        scancode: u32,
    },
    KeyReleased {
        key_code: VirtualKeyCode,
        scancode: u32,
    },
    KeyTyped(char),
    MouseButtonPressed(MouseButton),
    MouseButtonReleased(MouseButton),
    ButtonPressed(Button),
    ButtonReleased(Button),
    MouseMoved {
        delta_x: f64,
        delta_y: f64,
    },
    ActionPressed(T),
    ActionReleased(T),
}

Events generated by the input system

Type parameter T is the type assigned to your Actions for your InputBundle or InputHandler.

Variants

A key was pressed down, sent exactly once per key press.

Fields of KeyPressed

A key was released, sent exactly once per key release.

Fields of KeyReleased

A unicode character was received by the window. Good for typing.

A mouse button was pressed down, sent exactly once per press.

A mouse button was released, sent exactly once per release.

A button was pressed.

A button was released.

The mouse pointer moved on screen

Fields of MouseMoved

The associated action had one of its keys pressed.

The associated action had one of its keys released.

Trait Implementations

impl<T: Debug> Debug for InputEvent<T>
[src]

[src]

Formats the value using the given formatter.

impl<T: Clone> Clone for InputEvent<T>
[src]

[src]

Returns a copy of the value. Read more

1.0.0
[src]

Performs copy-assignment from source. Read more