CommonHostInterface: Fix key inputs getting stuck with modifiers

This commit is contained in:
Connor McLaughlin
2021-02-28 02:45:30 +10:00
parent 091b745af6
commit a48fa4097b
5 changed files with 32 additions and 20 deletions

View File

@ -381,7 +381,7 @@ void QtHostInterface::onDisplayWindowKeyEvent(int key, bool pressed)
if (masked_key < countof(ImGuiIO::KeysDown))
ImGui::GetIO().KeysDown[masked_key] = pressed;
HandleHostKeyEvent(key, pressed);
HandleHostKeyEvent(key & ~Qt::KeyboardModifierMask, key & Qt::KeyboardModifierMask, pressed);
}
void QtHostInterface::onDisplayWindowMouseMoveEvent(int x, int y)