Show
Ignore:
Timestamp:
04/11/08 13:10:12 (6 years ago)
Author:
robert
Message:

From Melchior Franz, "The GUIEventAdapter header file had KeySymbols? for the super and
hyper keys defined already, but these modifiers were missing in
GUIEventAdapter::ModKeyMask?, and the EventQueue? ingored them as well.

The attached diff/archive adds the missing parts for Super/Hyper
modifier key support.

I'm aware that this might not be supported on all systems/keyboards
out of the box, but decided to submit it anyway because:

- developers are aware of differences between input devices

(Some mice have scroll wheels, others don't. Some have five or
more buttons, some have only one. Some keyboards don't have
numpads, some have AltGr?, some don't etc.)

- even if someone relies on Hyper/Super in distributed software,

this is easy to fix and doesn't create lock-in conditions

- while the names Hyper/Super may only be common on X11, they are

just symbol names and not OS-specific

- even though some systems might not offer these additional modifiers

by default, it's likely that all of them have at least 8 modifier
levels internally, so it should only be a matter of OS configuration
to make them work

- having super/hyper available is useful to offer a user ways

to define local key definitions that are safe from collisions with
predefined "official" key assignments"

Files:
1 modified

Legend:

Unmodified
Added
Removed
  • OpenSceneGraph/trunk/examples/osgkeyboard/osgkeyboard.cpp

    r7112 r8079  
    390390                    PRINT(osgGA::GUIEventAdapter::MODKEY_LEFT_META); 
    391391                    PRINT(osgGA::GUIEventAdapter::MODKEY_RIGHT_META); 
     392                    PRINT(osgGA::GUIEventAdapter::MODKEY_LEFT_SUPER); 
     393                    PRINT(osgGA::GUIEventAdapter::MODKEY_RIGHT_SUPER); 
     394                    PRINT(osgGA::GUIEventAdapter::MODKEY_LEFT_HYPER); 
     395                    PRINT(osgGA::GUIEventAdapter::MODKEY_RIGHT_HYPER); 
    392396                    PRINT(osgGA::GUIEventAdapter::MODKEY_NUM_LOCK); 
    393397                    PRINT(osgGA::GUIEventAdapter::MODKEY_CAPS_LOCK);