[SDL] Multiple key pushes in SDL
e9725415 at student.tuwien.ac.at
Tue Aug 14 00:46:00 PDT 2001
There is some function called SDL_GetKeyState or something like this. I don't
remeber the whole name(loook in the doc's).
This funktion gives you a pointer to a table where the states of all key's
So you only have to check at the beginning of your main loop of the key is
pressed by indexing this array.
nwagenaar at digitaldynamics.nl wrote:
> Hello All,
> I've got a small problem concerning SDL and multiple key pushes.
> Atm I'm writing a programm (emulator) which requires multiple key pushes.
> For instance, I'm playing an racing game. I want to throttle using the UP
> button (SDLK_UP) and steer using right and left.
> Only when I push up and then try to steer then the up button is
> not active anymore (whilst it is pushed)! I need to push the up
> button again to make speed. I used the examples from the Key event but
> somehow I just can't get it working.
> How can I make sure that the button pushes stays in the event queue
> when other buttons are pressed?
> If somebody has a idea, please give me your knowledge.
> Thanks in advance.
> Niels Wagenaar
> SDL mailing list
> SDL at libsdl.org
More information about the SDL