Discuss Scratch
- Discussion Forums
- » Suggestions
- » A block to detect right clicks
- -TheNameless-
-
100+ posts
A block to detect right clicks
Currently, in Scratch, there is a <mouse down> block that can detect when any mouse button is pressed. For most projects, this is enough, since they only need to detect the left mouse button anyway.
However, for some projects, having multiple mouse buttons would be a very addition.
There used to be a workaround for this, but it doesn't work anymore and that workaround made it difficult to detect right clicks across the whole screen (instead of only on a single sprite) anyway.
My suggestion is a new block:
There are three options for the dropdown: any, left, and right. Any would function the same way as the existing <mouse down> block, and the left and right options would cause the block to only detect mouse clicks with the chosen mouse button.
This block could completely replace <mouse down> by simply replacing all existing usages of <mouse down> with < mouse button down?>.
A possible downside:
However, for some projects, having multiple mouse buttons would be a very addition.
There used to be a workaround for this, but it doesn't work anymore and that workaround made it difficult to detect right clicks across the whole screen (instead of only on a single sprite) anyway.
My suggestion is a new block:
There are three options for the dropdown: any, left, and right. Any would function the same way as the existing <mouse down> block, and the left and right options would cause the block to only detect mouse clicks with the chosen mouse button.
This block could completely replace <mouse down> by simply replacing all existing usages of <mouse down> with < mouse button down?>.
A possible downside:
- Right-clicking currently opens the browser context menu, which might be important for some people. A solution that would allow both this new block and the existing browser context menu to coexist would be to only detect right clicks while the project is running, and while the project is not running to allow the context menu to function.
- Zydrolic
-
1000+ posts
A block to detect right clicks
(#1)It could just be prevented on the stage, which would probably a bit less confusing.
Right-clicking currently opens the browser context menu, which might be important for some people. A solution that would allow both this new block and the existing browser context menu to coexist would be to only detect right clicks while the project is running, and while the project is not running to allow the context menu to function.
- MagentaDude1359
-
100+ posts
A block to detect right clicks
support, this would be useful for minecraft games and menus
Last edited by MagentaDude1359 (July 17, 2024 19:38:39)
- Discussion Forums
- » Suggestions
-
» A block to detect right clicks