Discuss Scratch

Noob_boi_2000
Scratcher
11 posts

right mouse click

I do have a question, since Flash was discontinued in 2020, would it still be impossible to detect a right mouse click with whatever is being used now (perhaps with a modded sensing block similar to the “key ENTER pressed”)? (Please correct me if I am wrong, I am fairly new to some of these subjects and am just wondering)
Thanks

Last edited by Noob_boi_2000 (Sept. 30, 2024 19:14:13)

BigNate469
Scratcher
1000+ posts

right mouse click

Noob_boi_2000 wrote:

I do have a question, since Flash was discontinued in 2020, would it still be impossible to detect a right mouse click with whatever is being used now (perhaps with a modded sensing block similar to the “key ENTER pressed”)? (Please correct me if I am wrong, I am fairly new to some of these subjects and am just wondering)
Thanks

Yes. See https://developer.mozilla.org/en-US/docs/Web/API/MouseEvent/button for how.
DangerPuppy10
Scratcher
1000+ posts

right mouse click

bump cuz dupe
Noob_boi_2000
Scratcher
11 posts

right mouse click

BigNate469 wrote:

Noob_boi_2000 wrote:

I do have a question, since Flash was discontinued in 2020, would it still be impossible to detect a right mouse click with whatever is being used now (perhaps with a modded sensing block similar to the “key ENTER pressed”)? (Please correct me if I am wrong, I am fairly new to some of these subjects and am just wondering)
Thanks

Yes. See https://developer.mozilla.org/en-US/docs/Web/API/MouseEvent/button for how.
I'm assuming the post is saying it is too unreliable to try and track whether it is the left or the right side of the mouse being pressed? Am I correct on this or did I miss something? Also, I said this last time, but what program is being used to run scratch, (as far as I know, Flash was discontinued in 2020)?

Thanks again, Noob_boi_2000
AHypnoman
Scratcher
1000+ posts

right mouse click

Noob_boi_2000 wrote:

BigNate469 wrote:

Noob_boi_2000 wrote:

I do have a question, since Flash was discontinued in 2020, would it still be impossible to detect a right mouse click with whatever is being used now (perhaps with a modded sensing block similar to the “key ENTER pressed”)? (Please correct me if I am wrong, I am fairly new to some of these subjects and am just wondering)
Thanks

Yes. See https://developer.mozilla.org/en-US/docs/Web/API/MouseEvent/button for how.
I'm assuming the post is saying it is too unreliable to try and track whether it is the left or the right side of the mouse being pressed? Am I correct on this or did I miss something? Also, I said this last time, but what program is being used to run scratch, (as far as I know, Flash was discontinued in 2020)?

Thanks again, Noob_boi_2000
If that is what the post is claiming, it's wrong. You can always distinguish between which button is pressed.
bubgamer072
Scratcher
96 posts

right mouse click

bump + support
AHypnoman
Scratcher
1000+ posts

right mouse click

bubgamer072 wrote:

bump + support
Please state why you support - the forums are not for polling.
mingo-gag
Scratcher
1000+ posts

right mouse click

I support it mainly because I feel that the right mouse click will be important for some scratch projects and is useful in some cases
BigNate469
Scratcher
1000+ posts

right mouse click

Noob_boi_2000 wrote:

BigNate469 wrote:

Noob_boi_2000 wrote:

I do have a question, since Flash was discontinued in 2020, would it still be impossible to detect a right mouse click with whatever is being used now (perhaps with a modded sensing block similar to the “key ENTER pressed”)? (Please correct me if I am wrong, I am fairly new to some of these subjects and am just wondering)
Thanks

Yes. See https://developer.mozilla.org/en-US/docs/Web/API/MouseEvent/button for how.
I'm assuming the post is saying it is too unreliable to try and track whether it is the left or the right side of the mouse being pressed? Am I correct on this or did I miss something? Also, I said this last time, but what program is being used to run scratch, (as far as I know, Flash was discontinued in 2020)?

Thanks again, Noob_boi_2000
Sorry for any confusion I caused there- I may have misread part of the post I replied to.

What I meant was that yes, it is possible to detect a right mouse click using JavaScript, which is what Scratch 3.0 (along with most websites) is programmed in.
Scyth3d
Scratcher
500+ posts

right mouse click

Bro I’ve wanted this so many times. Like if you right click on something you get more info abt it. Seriously support
34LiuKevin2
Scratcher
100+ posts

right mouse click

What about 3.0
Ka25555
Scratcher
57 posts

right mouse click

BigNate469 wrote:

Noob_boi_2000 wrote:

I do have a question, since Flash was discontinued in 2020, would it still be impossible to detect a right mouse click with whatever is being used now (perhaps with a modded sensing block similar to the “key ENTER pressed”)? (Please correct me if I am wrong, I am fairly new to some of these subjects and am just wondering)
Thanks

Yes. See https://developer.mozilla.org/en-US/docs/Web/API/MouseEvent/button for how.
Please don't link to other webpages.
scratchcode1_2_3
Scratcher
1000+ posts

right mouse click

Ka25555 wrote:

BigNate469 wrote:

Noob_boi_2000 wrote:

I do have a question, since Flash was discontinued in 2020, would it still be impossible to detect a right mouse click with whatever is being used now (perhaps with a modded sensing block similar to the “key ENTER pressed”)? (Please correct me if I am wrong, I am fairly new to some of these subjects and am just wondering)
Thanks

Yes. See https://developer.mozilla.org/en-US/docs/Web/API/MouseEvent/button for how.
Please don't link to other webpages.
Why not?
lapisi
Scratcher
1000+ posts

right mouse click

Ka25555 wrote:

(#434)

BigNate469 wrote:

Noob_boi_2000 wrote:

I do have a question, since Flash was discontinued in 2020, would it still be impossible to detect a right mouse click with whatever is being used now (perhaps with a modded sensing block similar to the “key ENTER pressed”)? (Please correct me if I am wrong, I am fairly new to some of these subjects and am just wondering)
Thanks

Yes. See https://developer.mozilla.org/en-US/docs/Web/API/MouseEvent/button for how.
Please don't link to other webpages.
there's no rule against that
Nerd_Waddle_Dee
Scratcher
24 posts

right mouse click

Support

Why?
>Alt Fire. Now, it can be recreated with mouse scroll wheel (I already have), but it feels really clunky and won't be as smooth as one simple click.
>Right Clicking accidentally will not freeze your controls accidentally anymore.
>In general, one more button will be extremely beneficial to games, especially one so close to the left click!

Counterpoints (My own baseless speculations since I basically know frick all about how this website works or is managed)
>They can't code it in. (Honestly the least likely because I've seen like 5 post about Javascript and detecting right click lol)
>Security Issues.
>Keeping this place limited so people will move on to other platforms since this site is supposed to be used as a tutorial/starting point.
Dark_Camera_Man
Scratcher
1 post

right mouse click

<mouse [ right] pressed?>

<mouse [ left] pressed?>
HighlaneGamingStudio
Scratcher
100+ posts

right mouse click

scratchcode1_2_3 wrote:

Ka25555 wrote:

Please don't link to other webpages.
Why not?
That's a common misunderstanding of a part of the Terms of Use (aka Terms of Service or TOS):
You agree not to post links to any content outside of the Scratch website, if to do so would violate any part of the Terms of Use.
Some people read that as “You agree not to post links to any content outside of the Scratch website, doing so violates the Terms of Use” when it really means “You agree not to post links to any content outside of the Scratch website that violates the Terms of Use.” The link in question goes to the MDN Web Docs, which, as far as I can tell, don't violate the Terms of Use.

As for the suggestion, Turbowarp already has an extension for this, and web browsers can only execute Javascript (other languages need special software to run, like Adobe Flash), so it's certainly supported, and I support this suggestion myself. This is a basic interactivity tool that most other platforms can use.

Last edited by HighlaneGamingStudio (July 17, 2025 22:05:57)

magicgamer10
Scratcher
34 posts

right mouse click

stickfiregames wrote:

Support for

when this sprite right clicked :: events hat
<right mouse down? :: sensing>

A lot of people seem to think this isn't possible, even though Scratch is perfectly capable of detecting right click in the editor.

Wait, what? Please tell us how! Edit: I'm number 438 woohoo I'm in the first 500

Last edited by magicgamer10 (Aug. 29, 2025 16:27:52)

BigNate469
Scratcher
1000+ posts

right mouse click

magicgamer10 wrote:

stickfiregames wrote:

Support for

when this sprite right clicked :: events hat
<right mouse down? :: sensing>

A lot of people seem to think this isn't possible, even though Scratch is perfectly capable of detecting right click in the editor.

Wait, what? Please tell us how! Edit: I'm number 438 woohoo I'm in the first 500
JavaScript, which Scratch 3.0 is programmed in, has built-in functionality to detect right clicks.
magicgamer10
Scratcher
34 posts

right mouse click

BigNate469 wrote:

magicgamer10 wrote:

stickfiregames wrote:

Support for

when this sprite right clicked :: events hat
<right mouse down? :: sensing>

A lot of people seem to think this isn't possible, even though Scratch is perfectly capable of detecting right click in the editor.

Wait, what? Please tell us how! Edit: I'm number 438 woohoo I'm in the first 500
JavaScript, which Scratch 3.0 is programmed in, has built-in functionality to detect right clicks.
I see. So, you need to add in the right click detection - there's no vannila Scratch blocks that can do the job. Edit: for those millennials reading this, “vannila” means the original, unmodified version of a video game or website.

Last edited by magicgamer10 (Aug. 30, 2025 16:04:59)

Powered by DjangoBB