Cannot trigger key-up event!

Dear all, you know that event-driving program is the features of the SDL
programs.

Now I want to make a robot move when I pressed a key (say, A),
and make it stop when I release the key.

However, on my system only the key-down event can be triggered, and
when I release the key, the
if (event.type == SDL_KEYUP)
{ … }
code segment is not entered.

What’s the problem?

Best Regard.

Dear all, you know that event-driving program is the features of the SDL
programs.

Now I want to make a robot move when I pressed a key (say, A),
and make it stop when I release the key.

However, on my system only the key-down event can be triggered, and
when I release the key, the
if (event.type == SDL_KEYUP)
{ … }
code segment is not entered.

What’s the problem?

What platform are you running on? What video driver are you using?

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