API Reference › Input › Input.mouse_down
method

Input.mouse_down

Input.mouse_down(button) -> bool

Returns whether a mouse button is held this frame — button 0 left, 1 right, 2 middle/other.

Example

program Demo {
  entry {
    Input.set_mouse(0, 0, 1, 0)
    Input.poll()
    if Input.mouse_down(0) { print(1) }
  }
}
← All symbols