[SDL] Keyboard events problem

Ghazan Haider ghazanhaider at yahoo.com
Sun Aug 5 18:16:01 PDT 2001

Hi, I'm new to this list...

I have been learning the SDL library functions and on
two different computers and in linux and BeOS, I have
a little problem getting the keyboard events.

Take the following prog:

SDL_Event event;

     if (SDL_PollEvent($event) != NULL)
          /* Or similar without the & */


This produces a constant value continuously  at keysym
in the console and X11 mode. All graphics functions
work fine. Is there some additional Initialization for
the keyboard events?? The documentation doesnt suggest
as such.

Would someone please show me a little demo prog that
just outputs in printf variable keys pressed. I havent
found such a prog yet.. the testkeys.c in SDL-1.2.2
just shows the values of the keys.. doesnt input
anything. I'm using two very standard computers and
even the -Wall arg to gcc doesnt give any warnings. 
Thanks for help in advance.
Ghazan Haider

Do You Yahoo!?
Make international calls for as low as $.04/minute with Yahoo! Messenger

More information about the SDL mailing list