SDL: Ignore unused key modifiers

This commit is contained in:
Connor McLaughlin 2020-05-27 00:27:52 +10:00
parent 445bd02cad
commit eb6b490c76
1 changed files with 1 additions and 2 deletions

View File

@ -472,8 +472,7 @@ void SDLHostInterface::HandleSDLEvent(const SDL_Event* event)
{
if (!ImGui::GetIO().WantCaptureKeyboard && event->key.repeat == 0)
{
const HostKeyCode code = static_cast<HostKeyCode>(static_cast<u32>(event->key.keysym.sym) |
static_cast<u32>(event->key.keysym.mod) << 16);
const HostKeyCode code = static_cast<HostKeyCode>(SDLKeyNames::KeyEventToInt(event));
const bool pressed = (event->type == SDL_KEYDOWN);
HandleHostKeyEvent(code, pressed);
}