Show
Ignore:
Timestamp:
01/27/11 17:23:48 (3 years ago)
Author:
robert
Message:

From Alexander Sinditskiy, "reason of this changes described in http://forum.openscenegraph.org/viewtopic.php?t=7596

and another problem is:
example osgkeyboard is not work (keys not highlight) if user have 2 keyboard layout native and english and current user layout is native

I try to explain my changes

we need something that is identify key without modifier keys and layout -> this is UnmodifedKey?

I think osg must have its own UnmodifiedKeys? table. Code must be run same on different platforms. This can de guaranteed by UnmodifiedKeys? table.

Mikhail Izmestev helped me. He implemented VirtualKey? changes in GraphicsWindowX11"

Files:
1 modified

Legend:

Unmodified
Added
Removed
  • OpenSceneGraph/trunk/src/osgGA/EventQueue.cpp

    r11934 r12125  
    275275} 
    276276 
    277 void EventQueue::keyPress(int key, double time) 
     277void EventQueue::keyPress(int key, double time, int unmodifiedKey) 
    278278{ 
    279279    switch(key) 
     
    313313    event->setEventType(GUIEventAdapter::KEYDOWN); 
    314314    event->setKey(key); 
    315     event->setTime(time); 
    316      
    317     addEvent(event); 
    318 } 
    319  
    320 void EventQueue::keyRelease(int key, double time) 
     315    event->setUnmodifiedKey(unmodifiedKey); 
     316    event->setTime(time); 
     317     
     318    addEvent(event); 
     319} 
     320 
     321void EventQueue::keyRelease(int key, double time, int unmodifiedKey) 
    321322{ 
    322323    switch(key) 
     
    340341    event->setEventType(GUIEventAdapter::KEYUP); 
    341342    event->setKey(key); 
     343    event->setUnmodifiedKey(unmodifiedKey); 
    342344    event->setTime(time); 
    343345