Discuss Scratch

1Draven
Scratcher
100+ posts

about the key () pressed? block

How do I check if three keys or four keys are being held down
GIitchInTheMatrix
Scratcher
1000+ posts

about the key () pressed? block

at the same time, few keyboards will allow it.
Separate, put multiple conditionals within the loop or use hat blocks.
1Draven
Scratcher
100+ posts

about the key () pressed? block

GIitchInTheMatrix wrote:

(#2)
at the same time, few keyboards will allow it.
Separate, put multiple conditionals within the loop or use hat blocks.
so only some computers will allow 3 or 4 keys all being held down?
GIitchInTheMatrix
Scratcher
1000+ posts

about the key () pressed? block

1Draven wrote:

GIitchInTheMatrix wrote:

(#2)
at the same time, few keyboards will allow it.
Separate, put multiple conditionals within the loop or use hat blocks.
so only some computers will allow 3 or 4 keys all being held down?
most are limited to 2, depends on the hardware how many they can handle.
1Draven
Scratcher
100+ posts

about the key () pressed? block

GIitchInTheMatrix wrote:

(#4)

1Draven wrote:

GIitchInTheMatrix wrote:

(#2)
at the same time, few keyboards will allow it.
Separate, put multiple conditionals within the loop or use hat blocks.
so only some computers will allow 3 or 4 keys all being held down?
most are limited to 2, depends on the hardware how many they can handle.
oh so nintendo switch can handle it but Chromebooks can't? (i know that Nintendo switches can handle it because in the Sans fight if you press all four buttons down on his slam attack you will jump as soon as he slams you into any wall and also gamemaker is in JavaScript from what I know)
medians
Scratcher
1000+ posts

about the key () pressed? block

Do you mean any 3 or 4 keys?
09878901234321
Scratcher
500+ posts

about the key () pressed? block

I've never encountered a computer that couldn't handle many keys being pressed. Many computer games simultaneously many have key inputs, with WASD, space, or arrow keys.

I made a project to get all of the keys pressed if that's what you're looking for.
1Draven
Scratcher
100+ posts

about the key () pressed? block

medians wrote:

(#6)
Do you mean any 3 or 4 keys?
i'm going to assume you meant like pressing any four different keys and no I mean like pressing all four arrow keys
1Draven
Scratcher
100+ posts

about the key () pressed? block

09878901234321 wrote:

(#7)
I've never encountered a computer that couldn't handle many keys being pressed. Many computer games simultaneously many have key inputs, with WASD, space, or arrow keys.

I made a project to get all of the keys pressed if that's what you're looking for.
but I'm on a Chromebook and it won't register all the arrow keys being pressed
09878901234321
Scratcher
500+ posts

about the key () pressed? block

Oh, then it must be a hardware issue. Since the project works completely fine for me on my device, and on multiple browsers.

As an example, here is an image showing all the arrows being pressed simultaneously:

Last edited by 09878901234321 (June 5, 2023 20:46:54)

1Draven
Scratcher
100+ posts

about the key () pressed? block

09878901234321 wrote:

(#10)
Oh, then it must be a hardware issue. Since the project works completely fine for me on my device, and on multiple browsers.

As an example, here is an image showing all the arrows being pressed simultaneously:


well i guess * out of luck then

Last edited by 1Draven (June 5, 2023 20:48:30)

medians
Scratcher
1000+ posts

about the key () pressed? block

1Draven wrote:

medians wrote:

(#6)
Do you mean any 3 or 4 keys?
i'm going to assume you meant like pressing any four different keys and no I mean like pressing all four arrow keys
You could use the and operator block then, and copy and paste them:

Or you could use a list with the keys.

Last edited by medians (June 5, 2023 20:50:22)

medians
Scratcher
1000+ posts

about the key () pressed? block

1Draven wrote:

09878901234321 wrote:

(#7)
I've never encountered a computer that couldn't handle many keys being pressed. Many computer games simultaneously many have key inputs, with WASD, space, or arrow keys.

I made a project to get all of the keys pressed if that's what you're looking for.
but I'm on a Chromebook and it won't register all the arrow keys being pressed
Yeah you might need another computer or keyboard then:
09878901234321
Scratcher
500+ posts

about the key () pressed? block

Test the project if you want: https://scratch.mit.edu/projects/835709331/

Last edited by 09878901234321 (June 5, 2023 21:15:35)

Powered by DjangoBB