From ce4890fa7a826dc019b97bbc37344896809b4e52 Mon Sep 17 00:00:00 2001 From: Robert Osfield Date: Wed, 8 Feb 2012 09:34:44 +0000 Subject: [PATCH] From Claus Scheiblauer, "in GraphicsWindowQt.cpp the GLWidget::keyReleaseEvent was implemented slightly different to the GLWidget::keyPressEvent, which caused the cursor keys values to be not correctly mapped from an QKeyEvent value to an osg key value when releasing a cursor key." --- src/osgQt/GraphicsWindowQt.cpp | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/src/osgQt/GraphicsWindowQt.cpp b/src/osgQt/GraphicsWindowQt.cpp index df2071592..e19e05e2e 100644 --- a/src/osgQt/GraphicsWindowQt.cpp +++ b/src/osgQt/GraphicsWindowQt.cpp @@ -270,7 +270,8 @@ void GLWidget::keyPressEvent( QKeyEvent* event ) void GLWidget::keyReleaseEvent( QKeyEvent* event ) { setKeyboardModifiers( event ); - _gw->getEventQueue()->keyRelease( (osgGA::GUIEventAdapter::KeySymbol) *(event->text().toAscii().data()) ); + int value = s_QtKeyboardMap.remapKey( event ); + _gw->getEventQueue()->keyRelease( value ); // this passes the event to the regular Qt key event processing, // among others, it closes popup windows on ESC and forwards the event to the parent widgets