Added osgGA::GUIEventAdapter::KeySymbol enumate list, which is a remapping

of the X settings.

Added a pass through of X11 sybmbols from Producer to osgGA::GUIEventAdapter::KeySymbol
in the osgProducer::EventAdapter.
This commit is contained in:
Robert Osfield
2003-03-24 13:43:22 +00:00
parent 9c37fc233a
commit 19e2368991
4 changed files with 199 additions and 44 deletions

View File

@@ -12,26 +12,14 @@ using namespace osgProducer;
void KeyboardMouseCallback::keyPress( Producer::KeySymbol key )
{
if (_escapeKeySetsDone)
{
switch( key )
{
#ifdef XK_MISCELLANY // XWindows keydefs
case XK_Escape:
_done = true;
break;
#endif
#ifdef WIN32
case VK_ESCAPE:
_done = true;
break;
#endif
}
}
osg::ref_ptr<EventAdapter> event = new EventAdapter;
event->adaptKeyPress(getTime(),key);
// check against adapted key symbol.
if (_escapeKeySetsDone &&
event->getKey()==osgGA::GUIEventAdapter::KEY_Escape) _done = true;
_eventQueueMutex.lock();
_eventQueue.push_back(event);
_eventQueueMutex.unlock();