Hi Melchior,

On Thu, Jun 4, 2009 at 10:43 AM, Melchior FRANZ
<melchior.fr...@gmail.com> wrote:
> Making the physcial key number available in the event structure would
> allow us to fix our problem in FlightGear, though I think the bug
> is in OSG and should be fixed there.

I don't think calling it bug clarifies anything, rather it muddies the
waters with what is actually the problem as the GraphicsWindowX11 is
reported exactly what is going on w.r.t modified keys.  As fixing what
you see as a bug, could just as easily introduce a bug for others who
make different assumptions about how events modifications are handled.

I would like to see this problem addressed in a way that makes it easy
for end users to cope with this issue.  Injecting events in this
instance is a workaround, but it's a workaround that itself breaks
things.

One step we should take is to add support for reporting back
unmodified keycodes in GraphicsWindowX11/Win32/Carbon and Cocoa in
consistent way.

Another step will be to decide how to report changes in modification
of a key that has been pressed.  If we wanted to report just the key
events pressed then we'd just report the shift key being pressed, not
the other keys that have modified, so we wouldn't report the 'A' being
pressed after the 'a' has been held down, rather we'd report the shift
being pressed.  If one just works in unmodified keys then this works
fine.  Since we do modify the keys things get muddier - with the
later, effectively we'd need to create a layer on top of "virtual key
presses".

One also will need to decide if press 'a' and hold down then press
shift, then press release shift to do aAa should you get the events:

  a pressed.
  A pressed.
  A released.
  a pressed.
  a  released.

Or

  a pressed.
  a released, A pressed.
  A release, a pressed.
  a released.

Or

  a pressed.
  A pressed.
  A release.
  a released.

Or

  a pressed.
  A pressed
  a pressed.
  a released

All are potentially valid interpretations of how to map these virtue
key presses... who's to say which ones are buggy and which ones
aren't?  You basically can't.

The proper solution probably lies in have raw keyboard events, and the
modified virtual events handled in some coherent fashion exactly what
I can't say yet.

Robert.
_______________________________________________
osg-users mailing list
osg-users@lists.openscenegraph.org
http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org

Reply via email to