Discuss Scratch

HarryCreator2416
Scratcher
100+ posts

Last Key Pressed

I made a “concept” of the block.
The “concept”

Concept of what it looks like:
last key pressed :: sensing boolean

Other related blocks:
show last key pressed :: sensing stack

when multiple keys are pressed at once :: sensing hat

Uhh….
when @turnLeft @turnRight @loopArrow :: events hat cat

 :: #ff0000 hat cat
Wait, this has nothing to do with my posts.
I can't tell, i'm a signature.
Even I can't see my own posts. WAIT
NOoOOOoOOOoooOOOOooOOoooOOOO
Hiitbox
Scratcher
76 posts

Last Key Pressed

This isn't a suggestions page, please suggest things in Suggestions. Also, dupe, as others have suggested this.
All three of these are possible, but ST doesn't have these, probably because the only people who use this will be making complex projects.
to makelast key pressed, literally make a list keeps all keys pressed in it and keep it 2 items long. Last key pressed is in the that , and multiple keys is just checking if both of the keys in the list are being pressed.

Wings of Fire Forever

Artist | Programmer | Gamer | YouTuber


Don't judge by my low post count!

Highlight and press Ctrl + Shift + Down to see more!

Want to give tips on anything I do? Check out my profile or YouTube!

Languages: Scratch, HTML, JavaScript, C++, C#, Python, Java
Games: Minecraft (Java, has Bedrock), Apex Legends
Art: I use Krita for my art and I draw Wings of Fire and animals (closest I get to people are anthro animals).
YouTube: @aqwek_

Call me aqwek_ if you'd like, this is an old account.

You just lost the game.
HarryCreator2416
Scratcher
100+ posts

Last Key Pressed

Hiitbox wrote:

This isn't a suggestions page, please suggest things in Suggestions. Also, dupe, as others have suggested this.
All three of these are possible, but ST doesn't have these, probably because the only people who use this will be making complex projects.
to makelast key pressed, literally make a list keeps all keys pressed in it and keep it 2 items long. Last key pressed is in the that , and multiple keys is just checking if both of the keys in the list are being pressed.
I keep doing these in the wrong forums. Also, there is an easy workaround.
when green flag clicked
forever
check key [a] :: custom // there are much more
end

define check key (key)
if <key (key :: custom) pressed?> then
set [last key pressed v] to (key :: custom)
end

Or you can view it in the original post, in the concept.

Uhh….
when @turnLeft @turnRight @loopArrow :: events hat cat

 :: #ff0000 hat cat
Wait, this has nothing to do with my posts.
I can't tell, i'm a signature.
Even I can't see my own posts. WAIT
NOoOOOoOOOoooOOOOooOOoooOOOO

Powered by DjangoBB