(Redirected from Right Mouse Detection)

Archive.png This article or section documents a feature not included in the current version of Scratch (2.0). It is only useful from a historical perspective.

This tutorial shows how to detect if the right mouse is down in Scratch 1.4.

Note Note: This will only work offline in presentation mode.

Script

The When () Clicked block fires either when the item is clicked with the left mouse button or the right mouse button. The Mouse Down? block, however, only reports true if the left mouse button is down.

Add this script to the Stage:

when Stage clicked :: events hat
if <mouse down?> then
set [mouse v] to [left]
else
set [mouse v] to [right]
end

You now have a script that will detect if the right mouse button is clicked.

Example Uses

See Also