Hi Robert,

I find some time to dig into this. And here are my observations ( I am
working with Vivien's submission, with osgviewerMFC )

I put break points in GraphicsWindowWin32.cpp:
Line: 2476
        case WM_KEYDOWN    :
        case WM_SYSKEYDOWN :
        ////////////////////

            {
                int keySymbol = 0;

Line: 2451
         /////////////////
        case WM_CHAR :
        /////////////////
            {
                // if event was not handled by WM_KEYDOWN then we take care
of it here
                // this method gives directly the utf16 char back so just
need to add it as it is
                if(!_keypresshandled)
                {
                    // first check if key is already registered on the map


case WM_KEYDOWN/WM_SYSKEYDOWN : get its chance to handle every single key
you press, even a dead key. So, for my czech character 'č', I have to press:
SHIFT, '+', and 'c', in this order, and for each of these three I get
WM_KEYDOWN. The only difference is that when I complete this sequence, on
top of all WM_KEYDOWNs, it gets to case WM_CHAR: with my 'č'. This is how
the system is managing these events. To reflect this behavior into OSG, only
one single line needs to be added, I think, and that will fix Brad's issue
as well:

else
                {
                    // was no special key, let WM_CHAR handle it
                    _keypresshandled = false;
                    _lastkeysymbol = keySymbol;
     /* the new line */ getEventQueue()->keyPress(keySymbol, eventTime);
                }

This was the key that was waste (being 'eaten' :) ..).

So to me it sounds that, with Vivien's submission, only the dead key +
'something' was not firing an event in osg - for the rest it should work as
before, not  as Brad states above that the key events stopped work. I am
very curious what he was actually doing.

Cheers,
-Nick


On Fri, Sep 17, 2010 at 8:04 PM, Vivien Delage <[email protected]> wrote:

> Hi guys,
>
> I understand you Robert. I have no problem with reverting the code for now
> if this causes issues for other people. I will go and experiment a bit more
> on how to fix the dead key problem. Maybe I can find a solution which is not
> using the WM_CHAR message. I will let you know how it goes on my side.
>
>
> Cheers,
> Vivien
>
> ------------------
> Read this topic online here:
> http://forum.openscenegraph.org/viewtopic.php?p=31778#31778
>
>
>
>
>
> _______________________________________________
> osg-users mailing list
> [email protected]
> http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org
>
_______________________________________________
osg-users mailing list
[email protected]
http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org

Reply via email to