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:
Robert Osfield
2011-01-27 16:23:48 +00:00
parent 67e1d14991
commit 67ae23f2cf
9 changed files with 216 additions and 137 deletions

View File

@@ -146,17 +146,17 @@ class OSGGA_EXPORT EventQueue : public osg::Referenced
/** Method for adapting keyboard press events. Note, special keys such as Ctrl/Function keys should be adapted to GUIEventAdapter::KeySymbol mappings.*/
void keyPress(int key) { keyPress(key, getTime()); }
void keyPress(int key, int unmodifiedKey = 0) { keyPress(key, getTime(), unmodifiedKey); }
/** Method for adapting keyboard press events. Note, special keys such as Ctrl/Function keys should be adapted to GUIEventAdapter::KeySymbol mappings, with specified time.*/
void keyPress(int key, double time);
void keyPress(int key, double time, int unmodifiedKey = 0);
/** Method for adapting keyboard press events. Note, special keys such as Ctrl/Function keys should be adapted to GUIEventAdapter::KeySymbol mappings.*/
void keyRelease(int key) { keyRelease(key, getTime()); }
void keyRelease(int key, int unmodifiedKey = 0) { keyRelease(key, getTime(), unmodifiedKey); }
/** Method for adapting keyboard press events. Note, special keys such as Ctrl/Function keys should be adapted to GUIEventAdapter::KeySymbol mappings, with specified time.*/
void keyRelease(int key, double time);
void keyRelease(int key, double time, int unmodifiedKey = 0);
GUIEventAdapter* touchBegan(unsigned int id, GUIEventAdapter::TouchPhase phase, float x, float y, double time);
GUIEventAdapter* touchBegan(unsigned int id, GUIEventAdapter::TouchPhase phase, float x, float y) {