(Redirected from Right Mouse Detection)
| This article or section documents something not included in the current version of Scratch (3.0). It is only useful from a historical perspective. |
Middle and right mouse detection was possible in Scratch 1.x in presentation mode which allowed Scratch to detect if the middle or right mouse button was being pressed.
Script
when stage clicked // This detects if any mouse button is pressed. if <not<mouse down?>> :: control // The <mouse down?> block will only output that it's true if the left mouse button is clicked. . . . // Scripts to run if the right button is clicked. end
How it Works
The when stage clicked block ran either when the item was clicked with any button on the mouse. The <mouse down?> block, however, only returned true if the left mouse button was down, in contrast to future versions of Scratch where it functions the same as the when stage clicked block. However, this script cannot tell the middle button apart from the right button.
Example Uses
- Adding a hidden menu
- Making operating system projects more realistic