Discuss Scratch

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:
whenkeypressed
Or the other key press block:
keypressed?
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:
askandwait
That 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

legohero8 wrote:

I have a question. How do you say “When (enter) key pressed,”?
I know that there's blocks like this:
whenkeypressed
Or the other key press block:
keypressed?
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:
askandwait
That 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.
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.
Xx_InfiniteGame_xX
Scratcher
35 posts

"Enter" Key

Hello!

You can detect the enter key by grabbing this blocks :

keypressed?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
keyjoinenterpressed

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

mmnagelia wrote:

legohero8 wrote:

I have a question. How do you say “When (enter) key pressed,”?
I know that there's blocks like this:
whenkeypressed
Or the other key press block:
keypressed?
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:
askandwait
That 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.
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.

Yes however, we don't need to hack. There is a work-around.

keyjoinenterpressed?

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

bsteichman wrote:

use the join block inside
keyjoinenterpressed
SHOULD NOT WORK
PcUserPro
Scratcher
500+ posts

"Enter" Key

legohero8 wrote:

I have a question. How do you say “When (enter) key pressed,”?
I know that there's blocks like this:
whenkeypressed
Or the other key press block:
keypressed?
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:
askandwait
That 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.
scratch don't have block:
whenenterkeypressed



YOU CAN USE:
askandwaitifanswer=thenbroadcastENTER

OTHER SPRITE CODE:
whenIreceiveENTERhereyourblocks

If people clicking enter -
then
answer=
(Enter - answer confirm)

or you can use:
confirm button


CONFIRM BUTTON CODE:

WhenthisspriteclickedbroadcastENTER

OTHER SPRITE CODE:
whenIreceiveENTERhereyourblocks
mmnagelia
Scratcher
100+ posts

"Enter" Key

Yusei-Fudo wrote:

mmnagelia wrote:

legohero8 wrote:

I have a question. How do you say “When (enter) key pressed,”?
I know that there's blocks like this:
whenkeypressed
Or the other key press block:
keypressed?
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:
askandwait
That 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.
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.

Yes however, we don't need to hack. There is a work-around.

keyjoinenterpressed?

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.
Yep, tested that and that works perfectly! Guess we learn something new every day.
legohero8
Scratcher
9 posts

"Enter" Key

My word… so many posts from just 24 hours…
Thanks so much guys! That will help a lot!
legohero8
Scratcher
9 posts

"Enter" Key

Yusei-Fudo wrote:

mmnagelia wrote:

legohero8 wrote:

I have a question. How do you say “When (enter) key pressed,”?
I know that there's blocks like this:
whenkeypressed
Or the other key press block:
keypressed?
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:
askandwait
That 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.
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.

Yes however, we don't need to hack. There is a work-around.

keyjoinenterpressed?

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

legohero8 wrote:

I have a question. How do you say “When (enter) key pressed,”?
I know that there's blocks like this:
whenkeypressed
Or the other key press block:
keypressed?
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:
askandwait
That 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.


whenclickedforeverifkey (join [ enter)]pressed?thensayThat's the trick!
Loveya23
Scratcher
3 posts

"Enter" Key

WE NEED
keyenter pressed?>when Enterkeypressed
The_Imaginarium
Scratcher
1000+ posts

"Enter" Key

Loveya23 wrote:

WE NEED
keyenter pressed?>when Enterkeypressed
Please don't post on old topics.
Cyberfishofant2
Scratcher
8 posts

"Enter" Key

i just found out this also works with modified keys like _ and ><\
Spentine
Scratcher
1000+ posts

"Enter" Key

legohero8 wrote:

Yusei-Fudo wrote:

mmnagelia wrote:

legohero8 wrote:

I have a question. How do you say “When (enter) key pressed,”?
I know that there's blocks like this:
whenkeypressed
Or the other key press block:
keypressed?
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:
askandwait
That 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.
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.

Yes however, we don't need to hack. There is a work-around.

keyjoinenterpressed?

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!
I use hacked blocks to get the enter key working

do you need any

Last edited by Spentine (Jan. 6, 2022 18:04:23)

mootjedepro
Scratcher
25 posts

"Enter" Key

keyjoinenterpressed?
JasenC4Plays
Scratcher
2 posts

"Enter" Key

I saw someone who had a sensing block with Key (enter) pressed? No Key (join (enter) ( ) ) pressed?
JasenC4Plays
Scratcher
2 posts

"Enter" Key

How do you do that?
Harakou
Scratcher
1000+ posts

"Enter" Key

JasenC4Plays wrote:

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!

Powered by DjangoBB