<div dir="ltr">Hi All.<br><br>I am using OSG in my Project. I Have a requirement to handle the combination keys from KeyBoard,For E.g ctrl + S , ctrl + q etc.<br><br>Seeing the documentation i have inherited my class from osgGA::GUIEventHandler and implemented handle virtual function to recieve the keyboard Events.<br><br>Here is my Handle Function<br><br> bool MyKeyboardHandle::handle(const osgGA::GUIEventAdapter& ea, osgGA::GUIActionAdapter& aa)<br>{<br><br> viewer = dynamic_cast<osgViewer::View*>(&aa);<br> if (viewer)<br> {<br> switch (ea.getEventType())<br> {<br> case(osgGA::GUIEventAdapter::KEYDOWN):<br> {<br> if (ea.getModKeyMask() & osgGA::GUIEventAdapter::MODKEY_CTRL)<br> {<br> if (ea.getKey() == osgGA::GUIEventAdapter::KEY_S)<br> {<br> //call my specific function here<br>. // I want to call my function here<br> }<br> }<br> }<br> break;<br><br> default:<br> break;<br> }<br> }<br> return false;<br>}<br><br>If i debug my program, i can see control reaching until this condition if (ea.getModKeyMask() & osgGA::GUIEventAdapter::MODKEY_CTRL) when i press combination keys( ctrl + s) . But next if condition fails where i am checking if the key pressed is 's'.<br><br>Can you guys guide me is my code correct to handle combination keys from keyboard, If you can guide to any examples, that will really helpful<br><br>Thanks & Rgds<br>santhosh<br></div>
<p></p>
-- <br />
You received this message because you are subscribed to the Google Groups "OpenSceneGraph Users" group.<br />
To unsubscribe from this group and stop receiving emails from it, send an email to <a href="mailto:osg-users+unsubscribe@googlegroups.com">osg-users+unsubscribe@googlegroups.com</a>.<br />
To view this discussion on the web visit <a href="https://groups.google.com/d/msgid/osg-users/e54835af-6e75-44d3-97ab-017ea100040c%40googlegroups.com?utm_medium=email&utm_source=footer">https://groups.google.com/d/msgid/osg-users/e54835af-6e75-44d3-97ab-017ea100040c%40googlegroups.com</a>.<br />