detect key pressed?

Previous Topic Next Topic
 
classic Classic list List threaded Threaded
5 messages Options
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

detect key pressed?

niccokunzmann
Dear All,

when developing games with eToys it is important to know whether a key
is pressed or released.
This way multiple actions can be controlled at the same time. Something
like:

if (key pressed? <up>)
if (key pressed? <w>)

However I only found "last keystroke".
      Is there something built in?
or: Do I need to develop this myself?
or: Do sources exist that add this behaviour?
I found this: http://wiki.squeak.org/squeak/488 and I downloaded eToys 5
from the website.
But I can not get it to run.

Greetings,
Nicco
_______________________________________________
squeakland mailing list
[hidden email]
http://lists.squeakland.org/mailman/listinfo/squeakland
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Re: detect key pressed?

Steve Thomas
Nicco,

In the "Object Catalog" under "Just for Fun" you will find a "Key Press" morph.  This should meet your needs.

What exactly is the error you are getting when trying to run Etoys 5?  , What OS are you using?

Stephen


On Wed, Jul 10, 2013 at 5:56 PM, Nicco Kunzmann <[hidden email]> wrote:
Dear All,

when developing games with eToys it is important to know whether a key
is pressed or released.
This way multiple actions can be controlled at the same time. Something
like:

if (key pressed? <up>)
if (key pressed? <w>)

However I only found "last keystroke".
      Is there something built in?
or: Do I need to develop this myself?
or: Do sources exist that add this behaviour?
I found this: http://wiki.squeak.org/squeak/488 and I downloaded eToys 5
from the website.
But I can not get it to run.

Greetings,
Nicco
_______________________________________________
squeakland mailing list
[hidden email]
http://lists.squeakland.org/mailman/listinfo/squeakland



--

To some of us, writing computer programs is a fascinating game. A program is a building of thought. It is costless to build, weightless, growing easily under our typing hands. If we get carried away, its size and complexity will grow out of control, confusing even the one who created it. This is the main problem of programming. It is why so much of today's software tends to crash, fail, screw up.

When a program works, it is beautiful. The art of programming is the skill of controlling complexity. The great program is subdued, made simple in its complexity.

- Martin Harverbeke (from Eloquent JavaScript)


_______________________________________________
squeakland mailing list
[hidden email]
http://lists.squeakland.org/mailman/listinfo/squeakland
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Re: detect key pressed?

Mike Lee-12
Nicco,

Steve kindly demonstrated the use of the Key Press Morph on a Google Hangout. Watch the first part of this video:



Mike


On Wed, Jul 10, 2013 at 9:53 PM, Steve Thomas <[hidden email]> wrote:
Nicco,

In the "Object Catalog" under "Just for Fun" you will find a "Key Press" morph.  This should meet your needs.

What exactly is the error you are getting when trying to run Etoys 5?  , What OS are you using?

Stephen


On Wed, Jul 10, 2013 at 5:56 PM, Nicco Kunzmann <[hidden email]> wrote:
Dear All,

when developing games with eToys it is important to know whether a key
is pressed or released.
This way multiple actions can be controlled at the same time. Something
like:

if (key pressed? <up>)
if (key pressed? <w>)

However I only found "last keystroke".
      Is there something built in?
or: Do I need to develop this myself?
or: Do sources exist that add this behaviour?
I found this: http://wiki.squeak.org/squeak/488 and I downloaded eToys 5
from the website.
But I can not get it to run.

Greetings,
Nicco
_______________________________________________
squeakland mailing list
[hidden email]
http://lists.squeakland.org/mailman/listinfo/squeakland



--

To some of us, writing computer programs is a fascinating game. A program is a building of thought. It is costless to build, weightless, growing easily under our typing hands. If we get carried away, its size and complexity will grow out of control, confusing even the one who created it. This is the main problem of programming. It is why so much of today's software tends to crash, fail, screw up.

When a program works, it is beautiful. The art of programming is the skill of controlling complexity. The great program is subdued, made simple in its complexity.

- Martin Harverbeke (from Eloquent JavaScript)


_______________________________________________
squeakland mailing list
[hidden email]
http://lists.squeakland.org/mailman/listinfo/squeakland



_______________________________________________
squeakland mailing list
[hidden email]
http://lists.squeakland.org/mailman/listinfo/squeakland
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Re: detect key pressed?

Markus Schlager-2
Key Press is really usefull, but unfortunately it's name is not translated
in the object catalog. Could someone fix this, please.

Markus
_______________________________________________
squeakland mailing list
[hidden email]
http://lists.squeakland.org/mailman/listinfo/squeakland
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Re: detect key pressed?

Bert Freudenberg
On 2013-07-12, at 01:30, Markus Schlager <[hidden email]> wrote:

> Key Press is really usefull, but unfortunately it's name is not translated in the object catalog. Could someone fix this, please.

This was fixed already, but we need to build a new image, which as a byproduct generates new POT templates (via "GetTextExporter exportTemplate").

- Bert -


_______________________________________________
squeakland mailing list
[hidden email]
http://lists.squeakland.org/mailman/listinfo/squeakland
Loading...