diff --git a/src/duckstation-sdl/sdl_host_interface.cpp b/src/duckstation-sdl/sdl_host_interface.cpp index 9ceb6a3af..47e1eb548 100644 --- a/src/duckstation-sdl/sdl_host_interface.cpp +++ b/src/duckstation-sdl/sdl_host_interface.cpp @@ -472,8 +472,7 @@ void SDLHostInterface::HandleSDLEvent(const SDL_Event* event) { if (!ImGui::GetIO().WantCaptureKeyboard && event->key.repeat == 0) { - const HostKeyCode code = static_cast(static_cast(event->key.keysym.sym) | - static_cast(event->key.keysym.mod) << 16); + const HostKeyCode code = static_cast(SDLKeyNames::KeyEventToInt(event)); const bool pressed = (event->type == SDL_KEYDOWN); HandleHostKeyEvent(code, pressed); }