SDL_GetKeys - [Enter] key pressed after program start

Hi there,

i have a problem, that the Return key is still pressed after i start
the game. How can i reset all key informations ?

Here is a part from the source:

    /* keyboard handling */
    keys = SDL_GetKeyState (NULL);

    if (keys[SDLK_RETURN] && (!keypressed)) {
	done=1;
	keypressed = 1;
    }

I hope someone can help ? Right now we let the user press the enter
key at start and then we go into the menu_loop.

Bye Bye
Steffen.–

Steffen Pohle (@Steffen_Pohle)| _ x
http://stpohle.bei.t-online.de | /#/ BomberClone - The Clone of
JabberID: stpohle at amessage.de ||###| DynaBlaster and Bomberman
ICQ: 370965 Yahoo: stpohle | #/ http://www.bomberclone.de
MSN: stpohle at hotmail.com |

Hi there,

i have a problem, that the Return key is still pressed after i start
the game. How can i reset all key informations ?

Sounds like a bug. What platform and video driver are you using?

See ya,
-Sam Lantinga, Software Engineer, Blizzard Entertainment

Hi there,

Sounds like a bug. What platform and video driver are you using?

Linux Debian 3.0
XFree4.2 with NVidia Drivers.

I think it have more to do with the windowmanager, because a friend
who is working on the game too have the same problems. They are not
there always but sometimes it helps if you move with the mouse out of
the window and go back there again… (the focus is moving there where
the mouse is)

i was thinking there is a general function the flush the whole
keyboard buffer… just to reset it.

maybe this helps more to find out what’s wrong.

bye bye
Steffen–

Steffen Pohle (@Steffen_Pohle)| _ x
http://stpohle.bei.t-online.de | /#/ BomberClone - The Clone of
JabberID: stpohle at amessage.de ||###| DynaBlaster and Bomberman
ICQ: 370965 Yahoo: stpohle | #/ http://www.bomberclone.de
MSN: stpohle at hotmail.com |