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
Press is called once when all keys and mouse buttons are active.
Hold
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
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
Auto Trait Implementations
impl RefUnwindSafe for InputHook
impl UnwindSafe for InputHook
Blanket Implementations
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.