Hi Melchoir,

Thanks for the extra explanations, this is really useful.

I'm in two minds if I'd would classify this issue as a bug, and I'm in
two minds about your suggested remedy.  The code is it stands right
now doesn't enforce a matching of presses and releases, it just the
way it works.  It's a bug if your assume that it does match.

Making them match does require inserting artificial events that the
the person at the keyboard has never instigated directly, if you press
an 'a' key, then press shift to 'A', then release the 'A' then that is
the sequence events.  What you haven't done is press 'a', release 'a',
pressed 'A' then release 'A', which is what you are saying should
happen be resented in events passed back from the OSG - this in itself
could be considered a bug.

I don't know what the solution should be yet, but I suspect it'll
require some more information passed back via GUIEventAdapter, and
make it easier to track unmodified key events.  Whatever solution we
go for it'll have to work identically across all platforms.

Robert.

On Thu, Jun 4, 2009 at 9:42 AM, Melchior FRANZ <melchior.fr...@gmail.com> wrote:
> Here's another illustration of what the patch does. The first part
> is what the added code in KeyPress does, the second part is what
> the code in KeyRelease does.
>
>
>
> press '3' (with autorepetition), press shift, release '3', release 'shift':
>
>  key: 51, shift: 0, pressed: 1
>  key: 51, shift: 0, pressed: 1
>  key: 51, shift: 0, pressed: 1
>  key: 51, shift: 1, pressed: 0     <<< this release event *added* by the
>  key: 35, shift: 1, pressed: 1         patch, otherwise 51=='3' would never
>  key: 35, shift: 1, pressed: 1         be released
>  key: 35, shift: 1, pressed: 1
>  key: 35, shift: 1, pressed: 0
>
>
>
>
> like above, but typing the sequence faster:
>
>  key: 51, shift: 0, pressed: 1
>  key: 51, shift: 1, pressed: 0     <<< this changed from 35 ('#') to 51 ('3')
>                                        by the patch, otherwise 51 would never
>                                        be released, but 35 (which wasn't even
>                                        reported pressed before)
>
> m.
> _______________________________________________
> osg-users mailing list
> osg-users@lists.openscenegraph.org
> http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org
>
_______________________________________________
osg-users mailing list
osg-users@lists.openscenegraph.org
http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org

Reply via email to