Use SDL_GetKeyFromScancode instead of the SDL_SCANCODE_TO_KEYCODE macro.