Class reference
InputEventMouseButton
Inherits InputEventMouse
Represents a mouse button being pressed or released.
Description
Stores information about mouse click events. See Node._input(). Note: On Wear OS devices, rotary input is mapped to MOUSE_BUTTON_WHEEL_UP and MOUSE_BUTTON_WHEEL_DOWN. This can be changed to MOUSE_BUTTON_WHEEL_LEFT and MOUSE_BUTTON_WHEEL_RIGHT with the ProjectSettings.input_devices/pointing/android/rotary_input_scroll_axis setting.
Properties
int button_index = 0
int button_index = 0The mouse button identifier, one of the MouseButton button or button wheel constants.
bool canceled = false
bool canceled = falseIf true, the mouse button event has been canceled.
bool double_click = false
bool double_click = falseIf true, the mouse button's state is a double-click.
float factor = 1.0
float factor = 1.0The amount (or delta) of the event. When used for high-precision scroll events, this indicates the scroll amount (vertical or horizontal). This is only supported on some platforms; the reported sensitivity varies depending on the platform. May be 0 if not supported.
bool pressed = false
bool pressed = falseIf true, the mouse button's state is pressed. If false, the mouse button's state is released.