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

#1 2012-11-19 11:06:22

Ideas
Scratcher
Registered: 2012-10-07
Posts: 100+

Online <key [button v] pressed?>

You know this key:
...

<key [space v] pressed?>//an example
...
Why can't there be a ([ v] key)
...
It will help with:
mapping keys[setting keys]
setting variables
setting lists
and more.
...

Last edited by Ideas (2012-11-20 10:43:15)


http://img685.imageshack.us/img685/2010/screenshot20121110at132.pngI think that you must CLICK above

Offline

 

#2 2012-11-19 19:09:24

TorbyFork234
Scratcher
Registered: 2012-03-01
Posts: 1000+

Re: Online <key [button v] pressed?>

you've just put the exact same thing
But i'm assuming you mean this:
<key pressed?>
where it reports the key pressed, and undefined if no key is pressed.

I would support, except for the fact that you can make a new block in 2.0 in which it makes that block using a bunch of ifs and ors, but you would have to first make a boolean (key pressed?) block.

Offline

 

#3 2012-11-20 10:44:11

Ideas
Scratcher
Registered: 2012-10-07
Posts: 100+

Re: Online <key [button v] pressed?>

Yes, my mistake


http://img685.imageshack.us/img685/2010/screenshot20121110at132.pngI think that you must CLICK above

Offline

 

#4 2012-11-20 12:03:52

technoguyx
Scratcher
Registered: 2008-10-18
Posts: 1000+

Re: Online <key [button v] pressed?>

I believe being able to use reporter blocks in the "key pressed" blocks, would be a better choice, if you wanted to be able to map keys:

when gf clicked
set [key v] to [space]
forever
  if <key (key) pressed?>
    say [do stuff]
  end
end
You could then use the ask block to define that key, though I understand that might look a bit ugly and clash with the look of your project. A "key currently pressed" block, as you describe, would be great if pulled off well (what happens if I'm pressing two keys? I think it should return the last pressed one).


http://getgnulinux.org/links/en/linuxliberated_4_78x116.png

Offline

 

#5 2012-11-20 13:07:47

Ideas
Scratcher
Registered: 2012-10-07
Posts: 100+

Re: Online <key [button v] pressed?>

I tried that and it doesn't work, if that worked then why would i need this topic? But thanx anyway


http://img685.imageshack.us/img685/2010/screenshot20121110at132.pngI think that you must CLICK above

Offline

 

Board footer