Original Post
Hi, I want to use SDL_GetKeyState for Input. Here the example code from the sdl homepage:
iKeyState = SDL_GetKeyState(NULL);
if (iKeyState[SDLK_F1]) {
// do lkhhk
So, first I get the pointer to a key matrix and then I check whether a certain key was pressed. This examples works fine. But is there a possibility to convert the SDL_GetKeyState directly to a virtual SDLKey, something like that:
iKeyState = SDL_GetKeyState(NULL);
vKey = someFunctionIDontKnow(iKeyState);
if(vKey == SDLK_F1) {
// do lkhkhk
}
Thanks for your help!