This is a read-only archive of the old Scratch 1.x Forums.
Try searching the current Scratch discussion forums.

#1 2011-09-24 12:12:15

Zparx
Scratcher
Registered: 2011-03-23
Posts: 500+

If <nothing> pressed condition

I think that Scratch should create a block that checks to see if anything is pressed on the keyboard, and if not, execute a command. I have some neat ideas for it. For instance:
If <nothing pressed>
     execute command

That one is my first idea and most looked into. It would be alot simpler that having to put something like:
If <not left or right arrow keys pressed?>
     execute command

Aside from eliminating the small annoyance of using those blocks, I think it could also expand the capabilities of user's creation using the software. Some other ideas are as follows:
If <nothing a -z pressed>
     execute command

that condition would only check the letter keys, and there could be one for numbers and space-bar and arrow keys such as:
If <not pressing space-bar or arrow keys>
     execute command

and:
If <nothing 0-9 pressed>
     execute command

The space-bar and arrow keys block would be a bit limited in terms of how many key strokes it covers, but it would still eliminate the If/or/and block cluster in projects.

-Also, if these blocks WERE to be created, do you think Scratch should just eliminate the If/and/or blocks? Why or why not?

Let me know your thoughts on this subject. Feedback is greatly appreciated. Thank you (:

-Z

Last edited by Zparx (2011-09-24 12:15:03)


http://images3.wikia.nocookie.net/__cb20101119183412/halo/images/4/43/Hero2.png
^ My rank on Halo: Reach :3

Offline

 

#2 2011-09-24 12:53:20

Zparx
Scratcher
Registered: 2011-03-23
Posts: 500+

Re: If <nothing> pressed condition

Bump. Come on guys. Feedback?


http://images3.wikia.nocookie.net/__cb20101119183412/halo/images/4/43/Hero2.png
^ My rank on Halo: Reach :3

Offline

 

#3 2011-09-24 12:57:01

ihaveamac
Scratcher
Registered: 2007-09-22
Posts: 1000+

Re: If <nothing> pressed condition

<not> <key[  ]pressed?> >>

Doesn't work for all, but it works.


~ihaveamac - visit ihaveamac.net

Offline

 

#4 2011-09-24 13:06:17

Zparx
Scratcher
Registered: 2011-03-23
Posts: 500+

Re: If <nothing> pressed condition

ihaveamac wrote:

<not> <key[  ]pressed?> >>

Doesn't work for all, but it works.

well I know that, that's just it though. It "doesn't work for all". I was suggesting one that checks if no keys are pressed.


http://images3.wikia.nocookie.net/__cb20101119183412/halo/images/4/43/Hero2.png
^ My rank on Halo: Reach :3

Offline

 

#5 2011-09-24 14:09:42

Greenatic
Scratcher
Registered: 2009-05-03
Posts: 1000+

Re: If <nothing> pressed condition

I think these are the main ones we need:

<number pressed>
<letter pressed>
<arrow key pressed>
<any key pressed>

Those can then be combined with the "not" block.

Offline

 

#6 2011-09-24 14:23:12

Death_Wish
Scratcher
Registered: 2011-07-26
Posts: 1000+

Re: If <nothing> pressed condition

Greenatic wrote:

I think these are the main ones we need:

<number pressed>
<letter pressed>
<arrow key pressed>
<any key pressed>

Those can then be combined with the "not" block.

Great idea  big_smile


With a straight flush.
http://4.bp.blogspot.com/-FlUhnzmIROE/TgtpjdJl4tI/AAAAAAAABCM/W19pvFTZFaU/s1600/save_the_world.png http://blocsonic.com/images/special/rip-stevejobs.jpg

Offline

 

#7 2011-09-24 17:42:27

Zparx
Scratcher
Registered: 2011-03-23
Posts: 500+

Re: If <nothing> pressed condition

Greenatic wrote:

I think these are the main ones we need:

<number pressed>
<letter pressed>
<arrow key pressed>
<any key pressed>

Those can then be combined with the "not" block.

I agree!!


http://images3.wikia.nocookie.net/__cb20101119183412/halo/images/4/43/Hero2.png
^ My rank on Halo: Reach :3

Offline

 

#8 2011-09-26 12:14:56

prokohtu
Scratcher
Registered: 2008-06-19
Posts: 100+

Re: If <nothing> pressed condition

first, you could if <not<key( )pressed>[command, second, with the release os Scratch 2.0, you could make such a block. If you want, write to me, I'll try to make such a block in BYOB for you.


Scratch's most realistic F1 simulator
https://lh6.googleusercontent.com/-qIdF-SzbTzw/UU29tK-FYvI/AAAAAAAAAOs/vRFKr1Iwldc/s225/logo.jpg

Offline

 

Board footer