[racket-dev] multiple key-press

From: Jay McCarthy (jay.mccarthy at gmail.com)
Date: Thu Jul 22 09:29:17 EDT 2010

As far as I know, at the lowest level there is no "multiple key press"
event even in the OS.

If they want to do that, they should change their world to record the
"current key press state":

(define-struct the-world (keys . everything-else))

and at the start of `on-tick' look at the collective impact of all the
keys, resetting it to 'empty' when the new world is returned.

That's more like how actually game engines work anyways.


On Thu, Jul 22, 2010 at 7:25 AM, Shriram Krishnamurthi <sk at cs.brown.edu> wrote:
> I just spoke with a room of high-school students studying Universe
> programming in a summer course at Brown.
> One major complaint was that they couldn't do multi-key-presses.  For
> instance, they want to use WASD navigation combined with a right-side
> key for firing, and want to be able to fire and navigate at the "same
> time".
> They've been using Shift, but the general consensus amongst the kids
> was this was Not Cool.  Basically, they felt like they were being
> cheated out of building a "real game".
> I don't know what it would take to support this.
> Shriram
> _________________________________________________
>  For list-related administrative tasks:
>  http://lists.racket-lang.org/listinfo/dev

Jay McCarthy <jay at cs.byu.edu>
Assistant Professor / Brigham Young University

"The glory of God is Intelligence" - D&C 93

Posted on the dev mailing list.