Discuss Scratch
- Discussion Forums
- » Suggestions
- » Support for more keys and right click
- UltroGmr
-
56 posts
Support for more keys and right click
There are some scenarios where I wish Scratch had a “on sprite right clicked” block, and support for the shift, enter, tab, and backspace keys on blocks that detect key presses.
This would be very useful for making games like Minecraft where you could right click to place/interact and left click to break. It would also be useful for implementing many other controls in many different types of games. A lot of real games use the shift key and right clicking, so I don't really understand why this hasn't been implemented in Scratch yet? Backspace could also be used as a control to delete things in sandbox projects.
I would also like to see support for using the scroll wheel on your mouse.
This would be very useful for making games like Minecraft where you could right click to place/interact and left click to break. It would also be useful for implementing many other controls in many different types of games. A lot of real games use the shift key and right clicking, so I don't really understand why this hasn't been implemented in Scratch yet? Backspace could also be used as a control to delete things in sandbox projects.
I would also like to see support for using the scroll wheel on your mouse.
<scroll wheel down?>
<key [shift] pressed?>
<right click down?>
when this sprite right clicked
when player scrolls up
when player scrolls down
when [enter] key pressed
<player scrolling up?>
<player scrolling down?>
Last edited by UltroGmr (Oct. 18, 2020 19:11:58)
- latin_gamerX
-
500+ posts
Support for more keys and right click
the scroll wheel is only on some devices so projects that depend on it wouldn't work for most devices and scrolling would be unnecessary
Thank you guys!!! much appreciated, Also, you should try Taco Bell @latin_gamerX
- sportfan999
-
1000+ posts
Support for more keys and right click
Scroll wheel workaround:
when [up arrow v] key pressedEnter key pressed workaround:
...
when [down arrow v] key pressed
...
when green flag clickedJust saying….
forever
if <key (join [enter][]) pressed?> then
...
Last edited by sportfan999 (Oct. 18, 2020 19:41:54)
look who's back!
- ProgramJpeg
-
4 posts
Support for more keys and right click
when green flag clicked
if <key (join [key] []) pressed?> then
...
end
works for all keys
Last edited by ProgramJpeg (July 23, 2021 18:52:57)
- ScolderCreations
-
1000+ posts
Support for more keys and right click
I think someone has made these suggestions before.
![](https://u.cubeupload.com/ScolderCreations/HpMvM3.gif)
- SonicFanX123_321
-
1000+ posts
Support for more keys and right click
fun fact! you actually can recreate scrolling using this script:
the reason this works is the hat blocks react to scroll wheels and arrow keys (up/down), while the predicate block doesn't (i think i remember seeing this on the Scratch Wiki or something) so by doing that, you now have a scroll wheel
for other keys, support! it'd be really useful for making an OS! i'm pretty sure you can't use backspace right now, but using this script:
scratch on![](//cdn.scratch.mit.edu/scratchr2/static/__9c5e4a8de50f4ce487e67140f57c59fc__/djangobb_forum/img/smilies/smile.png)
edit: bad news: my last script broke! shift detection is no longer possible :c that being said, scratch on![](//cdn.scratch.mit.edu/scratchr2/static/__9c5e4a8de50f4ce487e67140f57c59fc__/djangobb_forum/img/smilies/cool.png)
when [up arrow v] key pressed // scroll up
if <not <key [up arrow v] pressed?>> then
... ::grey
end
when [down arrow v] key pressed // scroll down
if <not <key [down arrow v] pressed?>> then
... ::grey
end
the reason this works is the hat blocks react to scroll wheels and arrow keys (up/down), while the predicate block doesn't (i think i remember seeing this on the Scratch Wiki or something) so by doing that, you now have a scroll wheel
for other keys, support! it'd be really useful for making an OS! i'm pretty sure you can't use backspace right now, but using this script:
<key (join [] [shift]) pressed?>i'm pretty sure that allows shift detection.
scratch on
![](http://cdn.scratch.mit.edu/scratchr2/static/__9c5e4a8de50f4ce487e67140f57c59fc__/djangobb_forum/img/smilies/smile.png)
edit: bad news: my last script broke! shift detection is no longer possible :c that being said, scratch on
![](http://cdn.scratch.mit.edu/scratchr2/static/__9c5e4a8de50f4ce487e67140f57c59fc__/djangobb_forum/img/smilies/cool.png)
Last edited by SonicFanX123_321 (July 24, 2021 08:53:16)
- Discussion Forums
- » Suggestions
-
» Support for more keys and right click