Qt: Ignore key repeat events for input

This commit is contained in:
Connor McLaughlin 2020-01-06 14:08:15 +10:00
parent d61f12cb4e
commit 6d5eca13a6
1 changed files with 6 additions and 0 deletions

View File

@ -72,11 +72,17 @@ void QtDisplayWindow::onWindowResized(int width, int height)
void QtDisplayWindow::keyPressEvent(QKeyEvent* event)
{
if (event->isAutoRepeat())
return;
m_host_interface->handleKeyEvent(event->key(), true);
}
void QtDisplayWindow::keyReleaseEvent(QKeyEvent* event)
{
if (event->isAutoRepeat())
return;
m_host_interface->handleKeyEvent(event->key(), false);
}