Still experiencing some problems with Key Events

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?

Never mind, it’s my keyboard it seems

Manuel Garc?a Cabrera escribi?:> …

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