Discuss Scratch
- Discussion Forums
 - » Help with Scripts
 - » "Enter" Key
        
         
- legohero8
 - 
                            
						
						
                            Scratcher
                        
						
						 
9 posts
"Enter" Key
I have a question. How do you say “When (enter) key pressed,”?
I know that there's blocks like this:
Do you just use the “When (any) key pressed,” block and just hope the player pushes enter? Or do you say “When (any) key pressed,” and then say that if it's any of the arrow keys, numbers, or letters just make it not work?
You have to push enter (or just click the check) for these blocks:
Please help me. It would help a lot to know that, I would use it on many of my projects.
                        
                        
                    I know that there's blocks like this:
when [ v] key pressedOr the other key press block:
<key [ v] pressed?>But neither of those have an option to do the enter key.
Do you just use the “When (any) key pressed,” block and just hope the player pushes enter? Or do you say “When (any) key pressed,” and then say that if it's any of the arrow keys, numbers, or letters just make it not work?
You have to push enter (or just click the check) for these blocks:
ask [] and waitThat block uses the enter key.
Please help me. It would help a lot to know that, I would use it on many of my projects.
- mmnagelia
 - 
                            
						
						
                            Scratcher
                        
						
						 
100+ posts
"Enter" Key
I have a question. How do you say “When (enter) key pressed,”?You can't detect just the enter key. In Scratch 2.0, there were a way using hack blocks, but now in Scratch 3.0, hacked blocks do not work anymore.
I know that there's blocks like this:when [ v] key pressedOr the other key press block:<key [ v] pressed?>But neither of those have an option to do the enter key.
Do you just use the “When (any) key pressed,” block and just hope the player pushes enter? Or do you say “When (any) key pressed,” and then say that if it's any of the arrow keys, numbers, or letters just make it not work?
You have to push enter (or just click the check) for these blocks:ask [] and waitThat block uses the enter key.
Please help me. It would help a lot to know that, I would use it on many of my projects.
- Xx_InfiniteGame_xX
 - 
                            
						
						
                            Scratcher
                        
						
						 
35 posts
"Enter" Key
Hello!
You can detect the enter key by grabbing this blocks :
Fill the first space with “enter” and nothing on second space. Then, put the join operator into the key pressed Boolean. Try to click on it and if you're pressing the enter key, it should returns true!
Hope this helps!
                        
                        
                    You can detect the enter key by grabbing this blocks :
<key [ v] pressed?>
(join () ())
Fill the first space with “enter” and nothing on second space. Then, put the join operator into the key pressed Boolean. Try to click on it and if you're pressing the enter key, it should returns true!
Hope this helps!

- bsteichman
 - 
                            
						
						
                            Scratcher
                        
						
						 
500+ posts
"Enter" Key
use the join block inside 
                        
                            <key (join [ent] [er]) pressed>
Last edited by bsteichman (April 21, 2021 00:58:10)
- ProgrammingGamer11
 - 
                            
						
						
                            Scratcher
                        
						
						 
30 posts
"Enter" Key
for some odd reason scratchblocks are not working for me, but i tried to say spmething
                        
                            Last edited by ProgrammingGamer11 (April 21, 2021 01:06:42)
- Yusei-Fudo
 - 
                            
						
						
                            Scratcher
                        
						
						 
1000+ posts
"Enter" Key
I have a question. How do you say “When (enter) key pressed,”?You can't detect just the enter key. In Scratch 2.0, there were a way using hack blocks, but now in Scratch 3.0, hacked blocks do not work anymore.
I know that there's blocks like this:when [ v] key pressedOr the other key press block:<key [ v] pressed?>But neither of those have an option to do the enter key.
Do you just use the “When (any) key pressed,” block and just hope the player pushes enter? Or do you say “When (any) key pressed,” and then say that if it's any of the arrow keys, numbers, or letters just make it not work?
You have to push enter (or just click the check) for these blocks:ask [] and waitThat block uses the enter key.
Please help me. It would help a lot to know that, I would use it on many of my projects.
Yes however, we don't need to hack. There is a work-around.
<key (join [enter] []) pressed?>
You just need to be able to input “enter” in the area where you select which key is pressed. In fact, by using doing this, you can even detect these keys for example: !@#$%^&*(). Along with the other symbols.
Last edited by Yusei-Fudo (April 21, 2021 02:50:03)
- PcUserPro
 - 
                            
						
						
                            Scratcher
                        
						
						 
500+ posts
"Enter" Key
use the join block insideSHOULD NOT WORK<key (join [ent] [er]) pressed>
- PcUserPro
 - 
                            
						
						
                            Scratcher
                        
						
						 
500+ posts
"Enter" Key
I have a question. How do you say “When (enter) key pressed,”?scratch don't have block:
I know that there's blocks like this:when [ v] key pressedOr the other key press block:<key [ v] pressed?>But neither of those have an option to do the enter key.
Do you just use the “When (any) key pressed,” block and just hope the player pushes enter? Or do you say “When (any) key pressed,” and then say that if it's any of the arrow keys, numbers, or letters just make it not work?
You have to push enter (or just click the check) for these blocks:ask [] and waitThat block uses the enter key.
Please help me. It would help a lot to know that, I would use it on many of my projects.
when [enter v] key pressed
YOU CAN USE:
ask [] and wait
if <(answer) = []> then
broadcast [ENTER v]
end
OTHER SPRITE CODE:
when I receive [ENTER v]
here your blocks
If people clicking enter -
then
<(answer) = []>(Enter - answer confirm)
or you can use:
confirm button
CONFIRM BUTTON CODE:
When this sprite clicked
broadcast [ENTER v]
OTHER SPRITE CODE:
when I receive [ENTER v]
here your blocks
- mmnagelia
 - 
                            
						
						
                            Scratcher
                        
						
						 
100+ posts
"Enter" Key
Yep, tested that and that works perfectly! Guess we learn something new every day.I have a question. How do you say “When (enter) key pressed,”?You can't detect just the enter key. In Scratch 2.0, there were a way using hack blocks, but now in Scratch 3.0, hacked blocks do not work anymore.
I know that there's blocks like this:when [ v] key pressedOr the other key press block:<key [ v] pressed?>But neither of those have an option to do the enter key.
Do you just use the “When (any) key pressed,” block and just hope the player pushes enter? Or do you say “When (any) key pressed,” and then say that if it's any of the arrow keys, numbers, or letters just make it not work?
You have to push enter (or just click the check) for these blocks:ask [] and waitThat block uses the enter key.
Please help me. It would help a lot to know that, I would use it on many of my projects.
Yes however, we don't need to hack. There is a work-around.<key (join [enter] []) pressed?>
You just need to be able to input “enter” in the area where you select which key is pressed. In fact, by using doing this, you can even detect these keys for example: !@#$%^&*(). Along with the other symbols.
- legohero8
 - 
                            
						
						
                            Scratcher
                        
						
						 
9 posts
"Enter" Key
My word… so many posts from just 24 hours…
Thanks so much guys! That will help a lot!
                        
                        
                    Thanks so much guys! That will help a lot!
- legohero8
 - 
                            
						
						
                            Scratcher
                        
						
						 
9 posts
"Enter" Key
I have a question. How do you say “When (enter) key pressed,”?You can't detect just the enter key. In Scratch 2.0, there were a way using hack blocks, but now in Scratch 3.0, hacked blocks do not work anymore.
I know that there's blocks like this:when [ v] key pressedOr the other key press block:<key [ v] pressed?>But neither of those have an option to do the enter key.
Do you just use the “When (any) key pressed,” block and just hope the player pushes enter? Or do you say “When (any) key pressed,” and then say that if it's any of the arrow keys, numbers, or letters just make it not work?
You have to push enter (or just click the check) for these blocks:ask [] and waitThat block uses the enter key.
Please help me. It would help a lot to know that, I would use it on many of my projects.
Yes however, we don't need to hack. There is a work-around.<key (join [enter] []) pressed?>
You just need to be able to input “enter” in the area where you select which key is pressed. In fact, by using doing this, you can even detect these keys for example: !@#$%^&*(). Along with the other symbols.
Thanks so much! This works! I will give credit, this has helped a lot!

- thenasashuttle
 - 
                            
						
						
                            Scratcher
                        
						
						 
45 posts
"Enter" Key
I have a question. How do you say “When (enter) key pressed,”?
I know that there's blocks like this:when [ v] key pressedOr the other key press block:<key [ v] pressed?>But neither of those have an option to do the enter key.
Do you just use the “When (any) key pressed,” block and just hope the player pushes enter? Or do you say “When (any) key pressed,” and then say that if it's any of the arrow keys, numbers, or letters just make it not work?
You have to push enter (or just click the check) for these blocks:ask [] and waitThat block uses the enter key.
Please help me. It would help a lot to know that, I would use it on many of my projects.
when green flag clicked
forever
if <key [ (join [ ] [enter])] pressed?> then
say [That's the trick!]
end
end
- The_Imaginarium
 - 
                            
						
						
                            Scratcher
                        
						
						 
1000+ posts
"Enter" Key
WE NEEDPlease don't post on old topics.<key [enter pressed?>
when [ Enter] key pressed
- Cyberfishofant2
 - 
                            
						
						
                            Scratcher
                        
						
						 
8 posts
"Enter" Key
i just found out this also works with modified keys like _ and ><\
                        
                        
                    - Spentine
 - 
                            
						
						
                            Scratcher
                        
						
						 
1000+ posts
"Enter" Key
I use hacked blocks to get the enter key workingI have a question. How do you say “When (enter) key pressed,”?You can't detect just the enter key. In Scratch 2.0, there were a way using hack blocks, but now in Scratch 3.0, hacked blocks do not work anymore.
I know that there's blocks like this:when [ v] key pressedOr the other key press block:<key [ v] pressed?>But neither of those have an option to do the enter key.
Do you just use the “When (any) key pressed,” block and just hope the player pushes enter? Or do you say “When (any) key pressed,” and then say that if it's any of the arrow keys, numbers, or letters just make it not work?
You have to push enter (or just click the check) for these blocks:ask [] and waitThat block uses the enter key.
Please help me. It would help a lot to know that, I would use it on many of my projects.
Yes however, we don't need to hack. There is a work-around.<key (join [enter] []) pressed?>
You just need to be able to input “enter” in the area where you select which key is pressed. In fact, by using doing this, you can even detect these keys for example: !@#$%^&*(). Along with the other symbols.
Thanks so much! This works! I will give credit, this has helped a lot!
do you need any
Last edited by Spentine (Jan. 6, 2022 18:04:23)
- JasenC4Plays
 - 
                            
						
						
                            Scratcher
                        
						
						 
2 posts
"Enter" Key
I saw someone who had a sensing block with Key (enter) pressed? No Key (join (enter) (     ) ) pressed?
                        
                        
                    - Harakou
 - 
                            
						
						
                            Scratcher
                        
						
						 
1000+ posts
"Enter" Key
I saw someone who had a sensing block with Key (enter) pressed? No Key (join (enter) ( ) ) pressed?Hi! This topic is rather old - when you ask for help on an old thread, people often will only respond to the original post because they don't notice yours. if you need help, you're much better off creating a new thread. Be sure to explain the problem you're having! If you have a question about a post that was made here, you can always include a link to it in your new topic. Thanks!
- Discussion Forums
 - » Help with Scripts
 - 
            » "Enter" Key 
         















