Expand description
Cross-platform mouse, keyboard (and gamepads soon) module.
Modules§
- utils
- Functions for advanced input processing.
Structs§
Enums§
- KeyCode
- These keycode values are based off of X11’s
keysymdef.h
. Missing keycodes from that list are given the prefix 0x01. - Mouse
Button - Touch
Phase
Functions§
- clear_
input_ queue - Clears input queue
- get_
char_ pressed - Return the last pressed char. Each “get_char_pressed” call will consume a character from the input queue.
- get_
dropped_ files - Gets the files which have been dropped on the window.
- get_
keys_ down - get_
keys_ pressed - get_
keys_ released - get_
last_ key_ pressed - Return the last pressed key.
- is_
key_ down - Detect if the key is being pressed
- is_
key_ pressed - Detect if the key has been pressed once
- is_
key_ released - Detect if the key has been released this frame
- is_
mouse_ button_ down - Detect if the button is being pressed
- is_
mouse_ button_ pressed - Detect if the button has been pressed once
- is_
mouse_ button_ released - Detect if the button has been released this frame
- is_
quit_ requested - Detect if quit has been requested
- is_
simulating_ mouse_ with_ touch - This is set to true by default, meaning touches will raise mouse events in addition to raising touch events. If set to false, touches won’t affect mouse events.
- mouse_
delta_ position - Returns the difference between the current mouse position and the mouse position on the previous frame.
- mouse_
position - Return mouse position in pixels.
- mouse_
position_ local - Return mouse position in range [-1; 1].
- mouse_
wheel - prevent_
quit - Prevents quit
- set_
cursor_ grab - Constrain mouse to window
- show_
mouse - Set mouse cursor visibility
- simulate_
mouse_ with_ touch - This is set to true by default, meaning touches will raise mouse events in addition to raising touch events. If set to false, touches won’t affect mouse events.
- touches
- Return touches with positions in pixels.
- touches_
local - Return touches with positions in range [-1; 1].