Skip to content

mouse_position

Return the pointer position in window pixels. The origin is the top-left corner. Available as mouse_position after import_globals() or mv.input.mouse_position.

Takes no arguments.

local x, y = mouse_position()

Related: mouse_button.

See the keyboard guide for more examples and limits.