[SDL] Well, me again having problems with the Key Events...
Manuel García Cabrera
manugarciac5 at yahoo.com.ar
Tue Jun 12 12:52:57 PDT 2007
It's really driving me crazy... Can it be that it's sometimes missing
the KEYUP event? Because I really don't get it.
Manuel García Cabrera escribió:
> Yeah, yeah, I asked exactly the same thing a few days ago and told you
> to never mind. Well, it turns out I was mistaken, so please do mind... lol.
>
> This was my message:
>
> -----------------------------------------------------------------------
> ...
>
> SDL_Event event;
>
> ...
>
> SDL_EnableKeyRepeat(SDL_DEFAULT_REPEAT_DELAY, SDL_DEFAULT_REPEAT_INTERVAL);
>
> while(!exit){
> ...
> while ( SDL_PollEvent(&event) ){
> ...
> switch(event.type){
> ...
> case SDL_KEYDOWN:
> //Some code
> ...
> }
> ...
> }
> ...
> }
>
> ...
>
>
>
> Well, my program is executing the code inside the SDL_KEYDOWN case
> indefinitely SOMETIMES... I mean, it may take 30 key presses before it
> happens to give you an example. It behaves EXACTLY like it would if I
> actually holded the key down. If I press any other key, it starts
> behaving correctly again, until it happens again.
>
> I thought that the problem could be my keyboard, but I tried it with
> several keyboards and it does the same. Any ideas?
> ---------------------------------------------------------------------------
> _______________________________________________
> SDL mailing list
> SDL at lists.libsdl.org
> http://lists.libsdl.org/listinfo.cgi/sdl-libsdl.org
>
More information about the SDL
mailing list