In my haste, I appear to have been a bit obscure. I apologize for that. Yes, I 
am using Qt. I am also mostly on Windows, but also Linux (cross-platform).

I guess I really wish for one of the following things:

1) Obviously, a translation happens from Qt to osg on the keystrokes. It would 
be nice if I could translate it back to Qt. I realize this might not be as 
simple as it sounds as some keys are mapped from one to many. For example, 
Qt::Key_Return is mapped to both osgGA:GUIEventAdapter::KEY_Linefeed & 
KEY_Return. In this case, it would be nice if I could get the original 
Qt::Key_Return returned to me.

2) Consistency would really be nicer. The ea.getModKeyMask() is always correct, 
but what I am talking about as the inconsistency can be seen below (obviously, 
I did not try every combination and hopefully it will be readable). First of 
all ea.getUnmodifiedKey() always returns 0x00 (maybe that is the real problem):

Code:
Key Sequence   ea.getKey()   expect from ea.getUnmodifiedKey()
c                      c                   c
Shift+C            C                   c
Ctrl+C             0x03              c
Alt+C              c                    c
Alt+Shift+C      C                  c
`                     `                   `
~ (Shift+`)      ~                   ~
Ctrl+`             `                   `
Ctrl+~            ~                   ~
(previous would be same as Ctrl+Shift+' if same key)
-                    -                    -
Shift+- (_)      _                   _
Ctrl+-            -                    -
Ctrl+_           0x1f               _
(previous would be same as Ctrl+Shift+- if same key)



I support the nicest thing would be if getUnmodifiedKey() actually returned 
something other than 0x00 (such as what is in my "would expect" column). Like I 
said though, maybe the real problem is that getUnmodifiedKey() is always zero. 
For example, GraphicsWindowQt.cpp calls _gw->getEventQueue()->keyPress(value); 
and pass the unmodifiedKey. In the last case (Ctrl+_), value=0x1f and 
event->k='_' as I would expect. Maybe the solution is to call keyPress(value, 
event->key())???

------------------
Read this topic online here:
http://forum.openscenegraph.org/viewtopic.php?p=45415#45415





_______________________________________________
osg-users mailing list
[email protected]
http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org

Reply via email to