PDA

View Full Version : Right ALT key not recognized



papillon
20th October 2011, 22:21
I have the following keypress event routine (Qt 4.7):



void GLTerrain::keyPressEvent(QKeyEvent *event)
{
switch (event->key()) {
case Qt::Key_Shift:
bShift=true;
break;
case Qt::Key_Alt:
bAlt=true;
if (bEnableAllBoundingBoxFeature==true) bAllBoundingBox=true;
break;
}


On OSX everything works fine, on Windows (VC++ 2008, 64bit), the right ALT key event is not triggered (only the left ALT is).
Any idea? Thanks

papillon
21st October 2011, 09:06
I forgot to tell that I checked the values returned by event->key(): the first time I press tha RIGHT ALT key, it returns the correct value (.....251); if I press it again, it returns ......249 (the CTRL key). How odd... and it's happening in Windows, OSX works just fine.