From 2c8b7815502f23ba4fc6cde85040f6400f3d7dd6 Mon Sep 17 00:00:00 2001 From: Mariano Reingart Date: Mon, 29 Sep 2014 03:16:03 +0000 Subject: [PATCH] Discard repeated keyup events in wxQT, thanks @seandepagnier git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@77918 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775 --- src/qt/window.cpp | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/src/qt/window.cpp b/src/qt/window.cpp index d3a37b92d7..6ffaadb1ec 100644 --- a/src/qt/window.cpp +++ b/src/qt/window.cpp @@ -1110,6 +1110,12 @@ bool wxWindowQt::QtHandleWheelEvent ( QWidget *WXUNUSED( handler ), QWheelEvent bool wxWindowQt::QtHandleKeyEvent ( QWidget *WXUNUSED( handler ), QKeyEvent *event ) { + // qt sends keyup and keydown events for autorepeat, but this is not + // normal for wx which only sends repeated keydown events + // discard repeated keyup events + if(event->isAutoRepeat() && event->type() == QEvent::KeyRelease) + return true; + #if wxUSE_ACCEL if ( m_processingShortcut ) {