[osg-submissions] osgGA: complete super/hyper modifier support
Melchior FRANZ
melchior.franz at gmail.com
Wed Apr 9 07:08:57 PDT 2008
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
Changed Files:
src/osgGA/EventQueue.cpp
include/osgGA/GUIEventAdapter
src/osgViewer/GraphicsWindowX11.cpp
examples/osgkeyboard/osgkeyboard.cpp
m.
-------------- next part --------------
A non-text attachment was scrubbed...
Name: superhyper.diff
Type: text/x-diff
Size: 7506 bytes
Desc: not available
Url : http://lists.openscenegraph.org/pipermail/osg-submissions-openscenegraph.org/attachments/20080409/83575874/attachment-0002.bin
-------------- next part --------------
A non-text attachment was scrubbed...
Name: superhyper.tar.bz2
Type: application/x-tbz
Size: 18968 bytes
Desc: not available
Url : http://lists.openscenegraph.org/pipermail/osg-submissions-openscenegraph.org/attachments/20080409/83575874/attachment-0003.bin
More information about the osg-submissions
mailing list