[−][src]Module quicksilver::input
Read events / input state
The main struct for this module is Input
, which is provided by the run
method to your
app. Input
allows you to read events from the user, which can range from window resizes
to key presses
.
There is also an optional feature (enabled by default) to cache input for user convenience.
This allows you to write quick expressions like if input.key_down(Key::W)
rather than having
to write code to handle the event when it comes in.
Structs
FocusChangedEvent | |
GamepadAxisEvent | |
GamepadButtonEvent | |
GamepadConnectedEvent | |
GamepadDisconnectedEvent | |
GamepadId | A unique ID for a gamepad that persists after the device is unplugged |
GamepadState | The button and axis values of a gamepad |
Input | The source of events and input device state |
KeyboardEvent | |
ModifiersChangedEvent | A change in the event modifiers like shift, control, alt, or 'logo' |
PointerEnteredEvent | |
PointerId | A unique ID for multiple mouse pointers |
PointerInputEvent | |
PointerLeftEvent | |
PointerMovedEvent | |
PointerState | The buttons and location of a given pointer |
ReceivedCharacterEvent | |
ResizedEvent | See |
ScaleFactorChangedEvent |
Enums
Event | An indicator something has changed or input has been dispatched |
GamepadAxis | The stick axes of a gamepad |
GamepadButton | A button on a standard (d-pad, 2-stick, 4-button, 4-trigger) gamepad |
Key | A key location on a keyboard |
MouseButton | A button on a standard 3-button mouse |
ScrollDelta | A measure of how much was scrolled in an event |