Enum basalt::input::InputHook[][src]

pub enum InputHook {
Show 17 variants Press { global: bool, keys: Vec<Qwery>, mouse_buttons: Vec<MouseButton>, }, Hold { global: bool, keys: Vec<Qwery>, mouse_buttons: Vec<MouseButton>, initial_delay: Duration, interval: Duration, accel: f32, }, Release { global: bool, keys: Vec<Qwery>, mouse_buttons: Vec<MouseButton>, }, Character, MouseEnter, MouseLeave, MouseMove, MouseMotion, MouseScroll, WindowFocused, WindowLostFocus, AnyMouseOrKeyPress { global: bool, }, AnyMousePress { global: bool, }, AnyKeyPress { global: bool, }, AnyMouseOrKeyRelease { global: bool, }, AnyMouseRelease { global: bool, }, AnyKeyRelease { global: bool, },
}

Variants

Press

Fields

global: bool
keys: Vec<Qwery>
mouse_buttons: Vec<MouseButton>

Press is called once when all keys and mouse buttons are active.

Hold

Fields

global: bool
keys: Vec<Qwery>
mouse_buttons: Vec<MouseButton>
initial_delay: Duration
interval: Duration
accel: f32

Hold is called while the key and mouse buttons are called. Nothing will be called until the initial delay period has elapsed. After that it will be called every time interval has elapsed. accel is not implemnted at this time.

Release

Fields

global: bool
keys: Vec<Qwery>
mouse_buttons: Vec<MouseButton>

Release is called when the all keys/buttons have been set to active and then anyone of them has been release. Release is also called when the window loses focus.

Character

Like a normal key press. Qwery is converted into a Character with modifiers in consideration.

MouseEnter

Called when the mouse enters the window.

MouseLeave

Called when the mouse leaves the window.

MouseMove

Called when the mouse moves within the window.

MouseMotion

Called when the mouse motion is recieved. This is not a window event, but rather a device event. Do not use this in combination with MouseMove as the data units may differ. Example use would be for game camera.

MouseScroll

Called when the mouse is over the window.

WindowFocused

Called when the window gains focus.

WindowLostFocus

Called when the window loses focus.

AnyMouseOrKeyPress

Fields

global: bool

Called on any mouse button or key press.

AnyMousePress

Fields

global: bool

Called on any mouse button press.

AnyKeyPress

Fields

global: bool

Called on any key press.

AnyMouseOrKeyRelease

Fields

global: bool

Called on any mouse button or key release. Also called when the window loses focus with all the keys and buttons that were currently held before.

AnyMouseRelease

Fields

global: bool

Called on any mouse button release. Also called when the window loses focus with all the mouse buttons that were currently held before.

AnyKeyRelease

Fields

global: bool

Called on any key release. Also called when the window loses focus with all the keys that were currently held before.

Implementations

Trait Implementations

Returns a copy of the value. Read more

Performs copy-assignment from source. Read more

Formats the value using the given formatter. Read more

This method tests for self and other values to be equal, and is used by ==. Read more

This method tests for !=.

Auto Trait Implementations

Blanket Implementations

Gets the TypeId of self. Read more

Immutably borrows from an owned value. Read more

Mutably borrows from an owned value. Read more

Builds a pointer to this type from a raw pointer.

Returns true if the size is suitable to store a type like this.

Returns the size of an individual element.

Performs the conversion.

Performs the conversion.

The alignment of pointer.

The type for initializers.

Initializes a with the given initializer. Read more

Dereferences the given pointer. Read more

Mutably dereferences the given pointer. Read more

Drops the object pointed to by the given pointer. Read more

The resulting type after obtaining ownership.

Creates owned data from borrowed data, usually by cloning. Read more

🔬 This is a nightly-only experimental API. (toowned_clone_into)

Uses borrowed data to replace owned data, usually by cloning. Read more

The type returned in the event of a conversion error.

Performs the conversion.

The type returned in the event of a conversion error.

Performs the conversion.