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),
CursorMoved {
delta_x: f64,
delta_y: f64,
},
MouseMoved {
delta_x: f64,
delta_y: f64,
},
ControllerAxisMoved {
which: u32,
axis: ControllerAxis,
value: f64,
},
ControllerButtonPressed {
which: u32,
button: ControllerButton,
},
ControllerButtonReleased {
which: u32,
button: ControllerButton,
},
ControllerConnected {
which: u32,
},
ControllerDisconnected {
which: u32,
},
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
KeyPressedA key was pressed down, sent exactly once per key press.
Fields of KeyPressed
key_code: VirtualKeyCode | |
scancode: u32 |
KeyReleasedA key was released, sent exactly once per key release.
Fields of KeyReleased
key_code: VirtualKeyCode | |
scancode: u32 |
KeyTyped(char)A unicode character was received by the window. Good for typing.
MouseButtonPressed(MouseButton)A mouse button was pressed down, sent exactly once per press.
MouseButtonReleased(MouseButton)A mouse button was released, sent exactly once per release.
ButtonPressed(Button)A button was pressed.
ButtonReleased(Button)A button was released.
CursorMovedThe mouse pointer moved on screen
Fields of CursorMoved
delta_x: f64 | |
delta_y: f64 |
MouseMovedThe mouse device moved. Use this for any use of the mouse that doesn't involve a standard mouse pointer.
Fields of MouseMoved
delta_x: f64 | |
delta_y: f64 |
ControllerAxisMovedA controller Axis was moved.
Fields of ControllerAxisMoved
which: u32 | |
axis: ControllerAxis | |
value: f64 |
ControllerButtonPressedA controller button was pressed.
Fields of ControllerButtonPressed
which: u32 | |
ControllerButtonReleasedA controller button was released.
Fields of ControllerButtonReleased
which: u32 | |
ControllerConnectedNew controller was connected.
Fields of ControllerConnected
which: u32 |
ControllerDisconnectedController was disconnected, it's id might be reused later.
Fields of ControllerDisconnected
which: u32 |
ActionPressed(T)The associated action had one of its keys pressed.
ActionReleased(T)The associated action had one of its keys released.
Trait Implementations
impl<T: Debug> Debug for InputEvent<T>[src]
impl<T: Debug> Debug for InputEvent<T>fn fmt(&self, f: &mut Formatter) -> Result[src]
fn fmt(&self, f: &mut Formatter) -> ResultFormats the value using the given formatter. Read more
impl<T: Clone> Clone for InputEvent<T>[src]
impl<T: Clone> Clone for InputEvent<T>fn clone(&self) -> InputEvent<T>[src]
fn clone(&self) -> InputEvent<T>Returns a copy of the value. Read more
fn clone_from(&mut self, source: &Self)1.0.0[src]
fn clone_from(&mut self, source: &Self)Performs copy-assignment from source. Read more
Auto Trait Implementations
impl<T> Send for InputEvent<T> where
T: Send,
impl<T> Send for InputEvent<T> where
T: Send, impl<T> Sync for InputEvent<T> where
T: Sync,
impl<T> Sync for InputEvent<T> where
T: Sync,