Имею такой код
const Uint8 *state = SDL_GetKeyboardState(NULL);
if (state[SDL_SCANCODE_W]) {
gty+=0.01;
}
if (state[SDL_SCANCODE_S]) {
gty-=0.01;
}
....
switch(???) {
case SDL_SCANCODE_W: gty+=0.01; break;
case SDL_SCANCODE_S: gty-=0.01; break;
...
}