[SDL] Well, me again having problems with the Key Events...

Manuel García Cabrera manugarciac5 at yahoo.com.ar
Tue Jun 12 03:15:37 PDT 2007


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?
---------------------------------------------------------------------------


More information about the SDL mailing list