Impact

This forum is read only and just serves as an archive. If you have any questions, please post them on github.com/phoboslab/impact

1 decade ago by sunnybubblegum

What is the best way to do this?

1 decade ago by gxxaxx

I have seen several games in which the instruction is "Press the Shoot" key to start game. Or, "Press Enter" to start game. Something specific.

Since we have to bind keys, it would be a mess to bind all keys.

There is a chance that there may be some deep javascript voodoo that let's you capture an event for "any" key without specifying each individual key.

But so far I have not found it.

By the way, if you have not done it yet, I highly recommend going through all the games listed in the Games forum -- or at least a bunch.

There are some fun games there, and they can give you an idea of how others are handling this. And you can see the other creative solutions that fellow impactonians are using. :)

Hope someone comes along and shows us both a simple way to capture all keys. But,..... well, we'll see.

1 decade ago by Kxen

How about using <body onKeyPress="impactFunction()">?

1 decade ago by Jerczu

Add keydown event listener and u done.
Page 1 of 1
« first « previous next › last »