|Parameter Name||Default Value||Meaning|
|which||0||which button (0 through 6) to check|
The main mouse button is button 0, and this is also the default. So in typical cases, no argument to mouse.button is needed.
This example continuously displays the value of all mouse buttons. Run this, then click various buttons on your mouse to test. (Note that most mice have only three buttons, so the rest will always return 0.)
while not key.pressed("escape") text.row = 10 print "mouse.button: " + mouse.button for b in range(1,6) print "mouse.button(" + b + "): " + mouse.button(b) end for end while key.clear // (clear escape key from key buffer)