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"
This commit is contained in:
@@ -274,7 +274,7 @@ void EventQueue::mouseButtonRelease(float x, float y, unsigned int button, doubl
|
||||
addEvent(event);
|
||||
}
|
||||
|
||||
void EventQueue::keyPress(int key, double time)
|
||||
void EventQueue::keyPress(int key, double time, int unmodifiedKey)
|
||||
{
|
||||
switch(key)
|
||||
{
|
||||
@@ -312,12 +312,13 @@ void EventQueue::keyPress(int key, double time)
|
||||
GUIEventAdapter* event = new GUIEventAdapter(*_accumulateEventState);
|
||||
event->setEventType(GUIEventAdapter::KEYDOWN);
|
||||
event->setKey(key);
|
||||
event->setUnmodifiedKey(unmodifiedKey);
|
||||
event->setTime(time);
|
||||
|
||||
addEvent(event);
|
||||
}
|
||||
|
||||
void EventQueue::keyRelease(int key, double time)
|
||||
void EventQueue::keyRelease(int key, double time, int unmodifiedKey)
|
||||
{
|
||||
switch(key)
|
||||
{
|
||||
@@ -339,6 +340,7 @@ void EventQueue::keyRelease(int key, double time)
|
||||
GUIEventAdapter* event = new GUIEventAdapter(*_accumulateEventState);
|
||||
event->setEventType(GUIEventAdapter::KEYUP);
|
||||
event->setKey(key);
|
||||
event->setUnmodifiedKey(unmodifiedKey);
|
||||
event->setTime(time);
|
||||
|
||||
addEvent(event);
|
||||
|
||||
Reference in New Issue
Block a user