Discuss Scratch
- Discussion Forums
- » Help with Scripts
- » Key pressed not working properly
- ajlim0403
- Scratcher
52 posts
Key pressed not working properly
I am making a keyboard project where if you click a key, it will light up on the project: https://scratch.mit.edu/projects/838004515/
However, if you click buttons like A, it will also light up alt and shift. T does this with tab and shift. When I tried the following code:
However, if you click buttons like A, it will also light up alt and shift. T does this with tab and shift. When I tried the following code:
<key (join [alt] []) pressed?>where the alt is in a variable called “#”. If I click the A key, it will say true for the code above. Please help. All key detection is on the custom block:
define Tick <keyPressed>
Would help me a lot if you can check out my projects! | Pokedex+ | Virus Wars - A Story Game | Biomes - A Platformer | Biomes - Clicker |
- NMario84
- Scratcher
1000+ posts
Key pressed not working properly
It is because buttons like ALT, Ctrl, and Shift do not work on their own in Scratch. The F-Numbers at the top also do not work.
Shift however will only work to give you capital letters, or the symbols above the numbers on your keyboard.
Shift however will only work to give you capital letters, or the symbols above the numbers on your keyboard.
- ajlim0403
- Scratcher
52 posts
Key pressed not working properly
Aw, that sucks. Thanks for the help
Would help me a lot if you can check out my projects! | Pokedex+ | Virus Wars - A Story Game | Biomes - A Platformer | Biomes - Clicker |
- NMario84
- Scratcher
1000+ posts
Key pressed not working properly
Yea it is a shame. A lot of wasted potential for such buttons. But as I understand it, Scratch was made to be a very simple programming language for all ages. Adding more keys would just add to the complexity.
Last edited by NMario84 (April 21, 2023 19:19:28)
- planetguyman
- Scratcher
2 posts
Key pressed not working properly
it doesn't work and it makes a dumb beep noise
- --Irrelevant
- Scratcher
90 posts
Key pressed not working properly
https://scratch.mit.edu/projects/838004515/I am making a keyboard project where if you click a key, it will light up on the project:
However, if you click buttons like A, it will also light up alt and shift. T does this with tab and shift. When I tried the following code:<key (join [alt] []) pressed?>where the alt is in a variable called “#”. If I click the A key, it will say true for the code above. Please help. All key detection is on the custom block:define Tick <keyPressed>
I thought alt doesn't work on Scratch.
I'm Irrelevant! (jk)
What I'm good at:
Creating evil kumquats
Creating more evil kumquats
Creating even more evil kumquats because why not?
GIMME YOUR FOLLOW
My profile…
- Discussion Forums
- » Help with Scripts
- » Key pressed not working properly