Hi Thibault,

Here I'd say that the error is to use a combination of EVT_CHAR and
EVT_KEY_UP. Either only EVT_CHAR must be used for complete, translated
keystrokes or EVT_KEY_DOWN *and* EVT_KEY_UP for raw, untranslated key
events.

Sure, that makes sense, thanks for the explanation. The problem is that we need both keydown and keyup events, but we also need the key with the right case. So we can't use EVT_KEY_DOWN (unless we translate to upper/lowercase ourselves), and EVT_CHAR only seems to be called for keydown, so what to do?

The kludge of letting the application convert the keycode with
std::toupper/std::tolower is likely to fail at some point. There are
many pitfalls in managing this kind of stuff and wxWidgets does it
correctly already, including taking care of platform-specific and
locale-specific details.

Of course, but given the situation above I don't really see an alternative, but then again I'm no Wx expert as I said before. I'm just investigating this for a project at work to see if we can use an integrated osgViewer widget in our Wx app that we already have (and which is a standalone window right now).

I have a running wxWidgets+OSG application in which I can change the
threading model without crashes. I can take a look at this issue as
well and try to have the sample application implement this feature.
I'll keep you guys informed.

OK, if you have a look at the osgviewerwx example then I'll back off and let the expert handle it. :-)

Thanks,

J-S
--
______________________________________________________
Jean-Sebastien Guay    [EMAIL PROTECTED]
                               http://www.cm-labs.com/
                        http://whitestar02.webhop.org/
_______________________________________________
osg-submissions mailing list
[email protected]
http://lists.openscenegraph.org/listinfo.cgi/osg-submissions-openscenegraph.org

Reply via email to