<commit_before>#include <osgProducer/KeyboardMouseCallback>

#ifdef WIN32
    #include <windows.h>
#else
    #include <X11/keysym.h>
#endif


using namespace osgProducer;

void KeyboardMouseCallback::keyPress( Producer::KeySymbol key )
{

           
    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();
}

void KeyboardMouseCallback::keyRelease( Producer::KeySymbol key )
{

    osg::ref_ptr<EventAdapter> event = new EventAdapter;
    event->adaptKeyRelease(getTime(),key);
    
    _eventQueueMutex.lock();
    _eventQueue.push_back(event);
    _eventQueueMutex.unlock();
}

void KeyboardMouseCallback::mouseMotion( float mx, float my) 
{<commit_msg>Added back into the win32 build of KeyboardMouseCallback the check against VK_ESCAPE.<commit_after>#include <osgProducer/KeyboardMouseCallback>

#ifdef WIN32
    #include <windows.h>
#else
    #include <X11/keysym.h>
#endif


using namespace osgProducer;

void KeyboardMouseCallback::keyPress( Producer::KeySymbol key )
{

           
    osg::ref_ptr<EventAdapter> event = new EventAdapter;
    event->adaptKeyPress(getTime(),key);


#ifdef WIN32
    if (_escapeKeySetsDone && 
        event->getKey()==VK_ESCAPE) _done = true;
#endif

    // check against adapted key symbol.    
    if (_escapeKeySetsDone && 
        event->getKey()==osgGA::GUIEventAdapter::KEY_Escape) _done = true;


    _eventQueueMutex.lock();
    _eventQueue.push_back(event);
    _eventQueueMutex.unlock();
}

void KeyboardMouseCallback::keyRelease( Producer::KeySymbol key )
{

    osg::ref_ptr<EventAdapter> event = new EventAdapter;
    event->adaptKeyRelease(getTime(),key);
    
    _eventQueueMutex.lock();
    _eventQueue.push_back(event);
    _eventQueueMutex.unlock();
}

void KeyboardMouseCallback::mouseMotion( float mx, float my) 
{
{'fraction_non_alphanumeric': 0.11665053242981607, 'fraction_numerical': 0.005808325266214908, 'mean_word_length': 4.246192893401015, 'pattern_counts': {'":': 0, '<': 13, '<?xml version=': 0, '>': 20, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '1548584', 'n_tokens_mistral': 679, 'n_tokens_neox': 666, 'n_words': 125}