Mouse Input

Mouse input is accepted on all platforms (on mobile devices it is accepted as a single screen touch - if you need to use multi-touch, you should be using the device specific functions) and has a few constants that are used to specify the buttons being pressed. These constants are shown in the following table:

 

Constant Description
mb_left The left mouse button
mb_middle The middle mouse button (this may not be valid for all target platforms)
mb_right The right mouse button
mb_side1* Mouse side button 1
mb_side2* Mouse side button 2
mb_any Any of the mouse buttons
mb_none No mouse button


* NOTE: The mb_side1 and mb_side2 buttons are only available on Windows, macOS, Ubuntu and HTML5.

The following functions exist for the standard mouse button controls:

 

Note that there are also a set of window functions related to using the mouse on desktop targets: