SDL_PushEvent in SDL 1.3 question

Hi,
I have a question regarding SDL_PushEvent function in SDL 1.3
I call SDL_PushEvent function to manually add keyboard event:

            SDL_Event e;
            e.key.type = (HIWORD(lparam) & KF_UP) ? SDL_KEYUP :

SDL_KEYDOWN;
e.key.state = (HIWORD(lparam) & KF_UP) ? SDL_RELEASED :
SDL_PRESSED;
e.key.which = 0;
e.key.windowID = windowID;
e.key.keysym.mod = 0;
e.key.keysym.unicode = 0;
e.key.keysym.scancode = SDL_SCANCODE_F;
e.key.keysym.sym = SDLK_f;
SDL_PushEvent(&e);

Is this code supposed to change internal keyboard state which is returned by
SDL_GetKeyboardState ?

Thanks
Michal

2009/2/23 Micha? Ziu?ek :

Hi,
I have a question regarding SDL_PushEvent function in SDL 1.3
I call SDL_PushEvent function to manually add keyboard event:

Is this code supposed to change internal keyboard state which is returned by
SDL_GetKeyboardState ?

SDL_PushEvent() will not change that data for you. You should do it
yourself. You may, however, end up with a confused keyboard state if
you clobber the real keyboard state with your artificial keyboard
manipulation. Perhaps use SDL_AddKeyboard()?–
http://codebad.com/