Module macroquad::input[][src]

Cross-platform mouse, keyboard (and gamepads soon) module.

Structs

Touch

Enums

KeyCode
MouseButton
TouchPhase

Functions

get_char_pressed

Return the last pressed char. Each “get_char_pressed” call will consume a character from the input queue.

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 key is being pressed

is_mouse_button_pressed

Detect if the key has been pressed once

is_mouse_button_released

Detect if the key has been released this frame

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_position

Return mouse position in pixels.

mouse_position_local

Return mouse position in range [-1; 1].

mouse_wheel
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].