isMiddleClick

.isMiddleClick()

Return true if the middle mouse button has been released on the current frame, and otherwise returns false.

A click differs from being down by only being recorded for one frame, rather then permanently, whilst the button is pressed.

If you do check for a middle click, ensure your game can be played without it. Even today, not all users have a mouse with a middle mouse button.

.isMiddleClick() { |x, y| ... }

You can optionally attach a block onto 'isMiddleClick' which is executed if the middle mouse button is being clicked.

See also

isMiddleDown - isMiddlePressed - isLeftClick - isRightClick