On Wed, Mar 18, 2009 at 3:30 PM, Luke Crook <l...@balooga.com> wrote:

> On Wed, 18 Mar 2009 14:57:08 -0700, Elliott Slaughter
> <elliottslaugh...@gmail.com> wrote:
>
> > Hi,
> >
> > Two questions:
> >
> > I have noticed that calling sdl:window causes keyboard input to reset.
> > That
> > is, upon calling sdl:window, I get key-up events for each key pressed,
> > even
> > if the user didn't lift up on the key. Is this expected behavior?
>
> So for the duration that a key is depressed, you receive a continuous
> stream of key-up events? That is weird. The SDL docs don't mention any
> impact that a new display surface would have on the event queue.
>

No, I get a single event for each key which is depressed. So for example:

User starts game, presses arrow up key.
Key-down event for :sdl-key-up is handled, player starts moving.
Player hits a door, and sdl:window is called to change the size of the room.
A key-up event for :sdl-key-up is seen, even though the player is still
holding the key.
User releases the key, but no key-up event is generated.

Sorry if I wasn't clear before.

-- 
Elliott Slaughter

"Any road followed precisely to its end leads precisely nowhere." - Frank
Herbert
_______________________________________________
application-builder mailing list
application-builder@lispniks.com
http://www.lispniks.com/mailman/listinfo/application-builder

Reply via email to