Hi Robert, >> Thanks for the testing. >> Its kinda odd that just reverting a "fix" fixes things. The original >> attempt at fixing things which led to the buggy submission must have >> had some motivation - perhaps a misunderstanding of how it should >> work, or could there be some difference in the way that some Windows >> versions/setups work differently w.r.t keyboard handling?
I did some more investigation on this and I think I understand the reason the original submission was made; it was a fix in the right direction but unfortunately incomplete. The problem lies in the way key tracking is implemented in the EventQueue class and will manifest itself when keyboard focus changes from one window to another during event handling. When that happens the tracking done by the EventQueue class will miss some keyboard events (release of shift/ctrl keys for instance being redirected to the new window owning keyboard focus) and this will cause the tracked modifiers key state to become out of sync. The proper way to fix this, IMHO, is to always send the complete modifiers key state as part of the EventQueue::keyPress() and EventQueue::keyRelease() calls (i.e. keyPress(key, modifiers, time) ) and within the EventQueue::keyPress/Release methods set the modKeyMask with this value. Note that this requires that the graphics windows implementations provide the complete modifiers state when they call these methods, which is not the case currently. This is the reason the original fix was incomplete. I also suspect that this same problem affects the mouse state (buttons). I'm currently testing this fix (keyboard only) on the Win32 side and once submitted would require the same changes to be done concurrently in the other graphics windows implementations before being committed (Mac, Linux). For these platforms, I don't know how feasible that solution would be though. Comments ? André _______________________________________________ osg-users mailing list osg-users@openscenegraph.net http://openscenegraph.net/mailman/listinfo/osg-users http://www.openscenegraph.org/