Hi,
it seems there is a bug in GLWidget::keyPressEvent(QKeyEvent* event).
I guess the problem is here:
Code:
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
with modifiers (like "CTRL+F") in fact event->text() method returns the char
pressed only for keys without modifiers. Otherwise the 'txt' variable contains
something else. The only way to get the key pressed in combination with a
modifier is through the event->key() method. For that reason I suggest to
improve the mKeyMap with other keys as attached.
Regards,
Gianni
------------------
Read this topic online here:
http://forum.openscenegraph.org/viewtopic.php?p=50749#50749
Attachments:
http://forum.openscenegraph.org//files/graphicswindowqt_576.cpp
_______________________________________________
osg-submissions mailing list
[email protected]
http://lists.openscenegraph.org/listinfo.cgi/osg-submissions-openscenegraph.org