- What browsers show this problem?
- Please share an example project (if possible).
- Describes the steps to reproduce this issue.
Have two blocks and press both keys
- What does Snap! currently do?
Execute only one script
- What should Snap! do instead?
execute both scripts
Do you mean you press two keys with two fingers at the same moment? I think probably Snap! doesn't get both of them, but maybe it could with a different API. I agree that it'd be cool.
This is a hardware issue, we're only getting the first key from the OS. Same in Scratch, btw.
State of any key can be tested but hat block is started only for last key press by OS autorepeat.
IMHO It's by design. Method "SpriteMorph.allHatBlocksForKey" should be based on state of StageMorph.keysPressed not key press event. Or better yet "when key pressed" may be fired only once for simplicity. Complex interaction can be based on sensing.
Or have a real event queue, and queue up key-down and key-up events to let kids program their own n-key rollover.
<key ... pressed?> is multi-key rollover capable for plain keys. N-limited only by OS/hardware.
I experiance the same problem but it's only with the spacebar and it's more than 2 or 3 keys, but if I don't use the spacebar, it works fine
can bu used to test multiple keys in your systems.
This is a fix for keys to be press at the same time
I know, but isn't it weird, that you can not use two times, but works?
It's exactly how OS and browser works. Try multiple keys in browser bar or shell window.
Snap gives You added value by storing key state.