In my project, I have a method that runs when the up arrow is pressed, however, I was wondering if there is a snap block that will press the up arrow for me. For example, I have an if statement, and if it's true, I want the up arrow key on my keyboard to be pressed. Does this block exist?
um I hope this isnt HW
This is not, it is a personal project
ok ill help but I would like a project link
Here is a link to a snap! code
where it says move stage down or up, I want to find a block that will press a key for me
If it's for moving something around, you could instead stick the moving logic into a custom block, which you'll then be able to run anywhere. No need to simulate key presses.
replace the condition variable with whatever you want the condition to be and delete the
say [hopefully this works!] for (2) secs
block.
This topic was automatically closed 30 days after the last reply. New replies are no longer allowed.