Discuss Scratch
- Discussion Forums
- » Bugs and Glitches
- » Scratch cannot take input from more than 2 or 3 keys at once
- walkerlj0
-
Scratcher
3 posts
Scratch cannot take input from more than 2 or 3 keys at once
My browser / operating system: Windows NT 10.0, Chrome 72.0.3626.121, No Flash version detected
I'm working with Scratch 3, and trying to make a binary translator here; https://scratch.mit.edu/projects/298492306/
What should happen -When I press multiple keys (up, down left, right, or space) the binary digits associated with those keys should change from one to zero, then become a part of the sum for the base-10 number as per the variables it sets off. I would like to use this in conjunction with the Makey-Makey to build an interactive Scratch binary converter with students!
What does happen- When I press keys, I can only hold 2, sometimes 3 down at once and have it registered. for example- If I am pressing the ‘right arrow’ and ‘up arrow’ keys at the same time, the binary digits will change (scratch will sense the input) however if I press another arrow, it is not registered. If I let up on one of the other arrow keys, then I can hold another down and it works
What I have tried-
-Adding logic under the ‘when arrow key ’pressed' block as well as ‘when flag pressed’ blocks
- Putting if, else logic in and outside of a ‘forever’ block
- Creating nested if, else statements for all of the various possible combinations of keys pressed
-Adding different amounts of delay for registering key presses.
At most I've been able to have the program register 4 keys being pressed at once, but usually it only registers 2 at once.
I'm working with Scratch 3, and trying to make a binary translator here; https://scratch.mit.edu/projects/298492306/
What should happen -When I press multiple keys (up, down left, right, or space) the binary digits associated with those keys should change from one to zero, then become a part of the sum for the base-10 number as per the variables it sets off. I would like to use this in conjunction with the Makey-Makey to build an interactive Scratch binary converter with students!
What does happen- When I press keys, I can only hold 2, sometimes 3 down at once and have it registered. for example- If I am pressing the ‘right arrow’ and ‘up arrow’ keys at the same time, the binary digits will change (scratch will sense the input) however if I press another arrow, it is not registered. If I let up on one of the other arrow keys, then I can hold another down and it works
What I have tried-
-Adding logic under the ‘when arrow key ’pressed' block as well as ‘when flag pressed’ blocks
- Putting if, else logic in and outside of a ‘forever’ block
- Creating nested if, else statements for all of the various possible combinations of keys pressed
-Adding different amounts of delay for registering key presses.
At most I've been able to have the program register 4 keys being pressed at once, but usually it only registers 2 at once.
- CatsUnited
-
Scratcher
1000+ posts
Scratch cannot take input from more than 2 or 3 keys at once
this may actually an issue with your keyboard itself rather than scratch. most keyboards can only detect up to a minimum of two keys at once because of how it's all wired up, which is referred to as keyboard rollover. the only way to fix this would be to buy a keyboard with higher or n-key rollover.
edit: maybe not but still something to consider
edit: maybe not but still something to consider
Last edited by CatsUnited (April 1, 2019 14:54:16)
- ProShark26
-
Scratcher
100+ posts
Scratch cannot take input from more than 2 or 3 keys at once
if you trying to make a sprite move, than depending on what the keys do, than you can only use so many at a time.
for example, if the arrow keys were moving the sprite than you only make him move forwards and turn because if you pressed back with forwards and turn, it wouldn't work because you can't move forwards and backwards at the same time, you know?
for example, if the arrow keys were moving the sprite than you only make him move forwards and turn because if you pressed back with forwards and turn, it wouldn't work because you can't move forwards and backwards at the same time, you know?
- walkerlj0
-
Scratcher
3 posts
Scratch cannot take input from more than 2 or 3 keys at once
Thank you @CatsUnited, I had only been testing it with my keyboard- when I used it with the Makey-Makey inputs it worked great! Thank you!
- Discussion Forums
- » Bugs and Glitches
-
» Scratch cannot take input from more than 2 or 3 keys at once


