implementing sdl event mapping