Hi,
it seems there is a bug in GraphWidget::keyPressEvent( QKeyEvent* event ) at 
least in OSG 2.9.14 with Qt 4.8.2.
I guess the problem is here:

    int remapKey(QKeyEvent* event)
    {
        KeyMap::iterator itr = mKeyMap.find(event->key());
        if (itr == mKeyMap.end())
        {
            return int(*(event->text().toAscii().data()));
        }
        else
            return itr->second;
    }

"return int(*(event->text().toAscii().data()));" is not correct for a QKeyEvent 
like "CTRL+F" in fact txt does not contain 'f'. That code is correct only for 
key events without modifiers. The variable 'txt contains something else I don't 
understand but I could ask toe Qt support about that. The only way to get the 
key pressed in combination with a modifier is to look at the 'k' value of 
QKeyEvent.

Regards,
Gianni

------------------
Read this topic online here:
http://forum.openscenegraph.org/viewtopic.php?p=50584#50584





_______________________________________________
osg-users mailing list
osg-users@lists.openscenegraph.org
http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org

Reply via email to