From Daniel Sjölie, updates to the GUIEventAdapter and GLUTEventAdapter to handle

key and key down, modifiers and funcion keys.
This commit is contained in:
Robert Osfield
2003-01-14 14:25:56 +00:00
parent a03fff8c57
commit 59969be08d
18 changed files with 99 additions and 28 deletions

View File

@@ -65,7 +65,7 @@ bool AnimationPathManipulator::handle(const osgGA::GUIEventAdapter& ea,osgGA::GU
handleFrame( ea.time() );
retval = true;
break;
case GUIEventAdapter::KEYBOARD:
case GUIEventAdapter::KEYDOWN:
if (ea.getKey()==' ')
{
home(ea,us);

View File

@@ -305,7 +305,7 @@ bool DriveManipulator::handle(const GUIEventAdapter& ea,GUIActionAdapter& us)
return true;
}
case(GUIEventAdapter::KEYBOARD):
case(GUIEventAdapter::KEYDOWN):
{
if (ea.getKey()==' ')
{

View File

@@ -127,7 +127,7 @@ bool FlightManipulator::handle(const GUIEventAdapter& ea,GUIActionAdapter& us)
return true;
}
case(GUIEventAdapter::KEYBOARD):
case(GUIEventAdapter::KEYDOWN):
if (ea.getKey()==' ')
{
flushMouseEventStack();

View File

@@ -22,7 +22,7 @@ void KeySwitchCameraManipulator::addNumberedCameraManipulator(CameraManipulator
bool KeySwitchCameraManipulator::handle(const GUIEventAdapter& ea,GUIActionAdapter& aa)
{
if(ea.getEventType()==GUIEventAdapter::KEYBOARD){
if(ea.getEventType()==GUIEventAdapter::KEYDOWN){
KeyManipMap::iterator it=_manips.find(ea.getKey());
if(it != _manips.end()){

View File

@@ -34,7 +34,7 @@ bool StateSetManipulator::handle(const GUIEventAdapter& ea,GUIActionAdapter& aa)
{
if(!_drawState.valid()) return false;
if(ea.getEventType()==GUIEventAdapter::KEYBOARD){
if(ea.getEventType()==GUIEventAdapter::KEYDOWN){
switch( ea.getKey() ){

View File

@@ -135,7 +135,7 @@ bool TrackballManipulator::handle(const GUIEventAdapter& ea,GUIActionAdapter& us
return false;
}
case(GUIEventAdapter::KEYBOARD):
case(GUIEventAdapter::KEYDOWN):
if (ea.getKey()==' ')
{
flushMouseEventStack();