[osg-users] osg+QT MODKEY How to

legeochen legeochen at gmail.com
Sat Mar 7 00:14:06 PST 2009


Hi all,
   I'm trying to add a Modkey event handler to my application with osg and
qt4. But it seems that the getModKeyMask() fuction fails to work. Return
value of getModKeyMask() always is 0, even if I have a MODKEY pressed. And,
this is my code:
        if ( ea.getEventType() == osgGA::GUIEventAdapter::PUSH &&
             ea.getButtonMask() == osgGA::GUIEventAdapter::LEFT_MOUSE_BUTTON
&&
             ea.getModKeyMask() == osgGA::GUIEventAdapter::MODKEY_SHIFT )
         {
            /*---------------------------------------------
                    do something here
            -------------------------------------------------*/
        }
How can I handle it? Thanks in advance!

cheers
legeo
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.openscenegraph.org/pipermail/osg-users-openscenegraph.org/attachments/20090307/760a871c/attachment-0002.htm>


More information about the osg-users mailing list