HI Andres,

Keyboards often have a toggle for the values they generate when pressing
the function keys, perhaps you keyboard is generating desktop control codes.

Run the osgkeyboard example to see what keys are being generated.

Robert.


On 17 July 2014 10:22, Andrés Barrionuevo <[email protected]> wrote:

> Hi,
>
> I'm trying to detect the press of some keys in a custom event handler.
>
> Code:
>
>    if( osgGA::GUIEventAdapter::RESIZE == ea.getEventType() ) {
>      switch( ea.getKey() ) {
>         case osgGA::GUIEventAdapter::KEY_L:
>             // More things...
>         break;
>        case osgGA::GUIEventAdapter::KEY_F2:
>
>
>
>
>
> I'am able to do this with keys from a to z and the modifier keys. But when
> I try to use, say, the F2 key, and then print the
> Code:
> ea.getKey()
>
>  value, I always get 0.
>
> Do I need to activate some option before to use the functions keys?
> ...
>
> Thank you!
>
> Cheers,
> Andrés
>
> ------------------
> Read this topic online here:
> http://forum.openscenegraph.org/viewtopic.php?p=60307#60307
>
>
>
>
>
> _______________________________________________
> 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