a3a5af18b0
remain in pressed state after revealing, even if they are no longer pressed on the keyboard. This can have bad effects, especially if the stuck keys are modifier keys. One has to press and release the stuck keys again to reset the wrong state. The fix keeps track of all key presses and releases. On FocusOut and UnmapNotify it releases all keys that are in pressed state, and on KeymapNotify (following a FocusIn), it sets the currently pressed keys again. To avoid confusion in the OSG-using application normal keys are always reported released /before/ and pressed /after/ modifier keys. As current key states are returned as char[32] keymap by XQueryKeymap and XKeymapEvent, this format is also used to recognize modifier keys and for maintaining the current internal key state. Functions to set/clear/query bits in such a keymap are added. The patch was extensively tested with osgkeyboard and FlightGear under KDE and fvwm2. It was not tested on a Xinerama setup or with multiple windows, but as _eventDisplay is used throughout, there should be no problems. The patch also makes the following changes: - removes old and obsolete handling of modifier keys in ::adaptKey(). This wasn't only unused, but also wrong (and for that reason commented out in revision 7066). The modifier states are actually handled in ./src/osgGA/EventQueue.cpp (EventQueue::keyPress/keyRelease). - fixes some spelling" |
||
---|---|---|
.. | ||
osg | ||
osgDB | ||
osgFX | ||
osgGA | ||
osgIntrospection | ||
osgManipulator | ||
osgParticle | ||
osgShadow | ||
osgSim | ||
osgTerrain | ||
osgText | ||
osgUtil | ||
osgViewer |