Hi,

In my codes, i rewrite keyPressEvent function like below:

> void AdapterWidget::keyPressEvent( QKeyEvent* event )
> {
>         _gw->getEventQueue()->keyPress( (osgGA::GUIEventAdapter::KeySymbol) 
> *(event->text().toAscii().data() ) );
> }


In my osg codes, i write like this:

> bool ManipulatorEventHandler::handle(const osgGA::GUIEventAdapter& ea, 
> osgGA::GUIActionAdapter& aa,
>             osg::Object*, osg::NodeVisitor*)
> {
> 
>     bool alt = (ea.getModKeyMask() & 
> (osgGA::GUIEventAdapter::MODKEY_LEFT_ALT|osgGA::GUIEventAdapter::MODKEY_RIGHT_ALT))
>  != 0;
>     if (alt) return false;
> 
>     if (ea.getEventType() == osgGA::GUIEventAdapter::KEYDOWN)
>     {
>         switch (ea.getKey())
>         {
>             case 'r': resetTransform(); break;
>         }
>     }
> 
>     return true;
> }

but when i press alt key there is no reponse in my application. I need a help 
in an emergency and i'm waiting answer online. Thanks very much.

Thank you!

Cheers,
ramy

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





_______________________________________________
osg-users mailing list
[email protected]
http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org

Reply via email to