Robert,

I also gave osgkeyboard a whirl on my OSX-10.6.5 system built from r12127.  
Here is what I see on my system:

KeyPress / Output
-----------------
c / c
Shift-c / C
Ctrl-c / c
Alt-c / c
Command(Super)-c / c

So pretty much in every case it prints the lowercase version except when you 
use Shift-c.  Is this the desired behavior?

Allessandro - my build puts things in the correct location.  I am using the 
Makefile generator and not doing anything framework/bundle specific.

My screen keys do not get highlighted either.  Also there is no distinction 
between left and right (they are all left) for shift, alt and super.

Adding one more item to the strange behavior queue - The capslock modifier also 
seems to not be fully baked.  I seem to need to press it 4 times in order to 
sync the MODKEY_CAPS_LOCK bit with the physical keyboard.  If I press it once, 
it registers in osg: (8192) and the light shows up on my keyboard.  Pressing it 
again still sets the bit (8192), while the keyboard light turns off.  A third 
time turns off the bit (0), but enables the keyboard light.  The 4th time syncs 
everything once again with both the MODKEY_CAPS_LOCK bit set to 0 and the 
keyboard light being off.

Regards,
Chuck Seberino

On Jan 27, 2011, at 10:21 AM, Alessandro Terenzi wrote:

> Hi Robert,
> I've just tried osgkeyboard on Mac OS X 10.6.5: whatever key I press I see 
> that it is correctly written in yellow in the row just below the keyboard, 
> but it is NOT highlighted on the keyboard itself. I'm talking about not only 
> the modifiable-keys but also about keys (such as backspace, space, ...) that 
> cannot have a modified status (at least I guess).
> 
> One note not related to this topic: I noticed that plugins are not built into 
> the osgPlugins-2.9.11 folder but just at the same level of the dylibs.
> 
> Hope this helps.
> Cheers.
> Alessandro
> 
> On Thu, Jan 27, 2011 at 5:40 PM, Robert Osfield <[email protected]> 
> wrote:
> Hi OSX dev's,
> 
> This afternoon I merged a submission from Alexander Sinditskiy, that
> addressed a limitation in osgGA::GUIEventAdapter where the getKey()
> method would return only the modified variation of the keycode that
> was pressed - so this would be Ctrl-C, 'C' or 'c', and if your you
> didn't want to worry about the modified key status you'd have to
> handle each of these cases in your event code.
> 
> The way that Alexander addressed this was to add a new UnmodifiedKey
> property to GUIEventAdapter, with support added to the
> osgGA::EventQueue as well as the X11 and Win32 implementations found
> in GraphicsWindowX11.cpp and GraphicsWindowWin32.cpp.  Alexander and
> his colleagues don't have access to OSX so couldn't add the required
> support into GraphicsWindowCocoa/Carbon so for now you'll just get a 0
> for the UnmofidiedKey.
> 
> Now this won't affect most apps as they won't yet be using the
> UnmodifiedKey property, but osgkeyboard has now been modified to use
> the UnmodifiedKey property as this illustrates it's usage and also
> simplifies the example as it no longer needs to doing multiple
> mappings to handle upper and lower case letters.  However, osgkeyboard
> will now just get a 0 for UnmodifiedKey so the keys on screen won't
> toggle on/off correctly.  At least this is what I'm expecting - I
> don't have on OSX box in front of me so I can't test this.
> 
> Could OSX users try out OSG in svn/trunk and run osgkeyboard and see
> how things behave and then have a look into the possibility of
> providing the UmodifiedKey property as GraphicsWindowWin32.cpp and
> GraphicsWindowX11.cpp now do.  The unmodified keys now map the 'A' and
> 'a' to be 'a', X11 is already uses this convention while Win32 have
> 'A' as the unmodified state, but Alexander's revision addresses this
> so both produce an GUIEventAdapter::KEY_A which is mapped to 'a'.  OSX
> will need to use the same convention.
> 
> Thanks in advance with any help you can provide in adding this
> functionality to OSX.
> 
> Cheers,
> Robert.
> _______________________________________________
> 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

_______________________________________________
osg-users mailing list
[email protected]
http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org

Reply via email to