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

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

View File

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

View File

@@ -91,7 +91,7 @@ bool OccluderEventHandler::handle(const osgGA::GUIEventAdapter& ea,osgGA::GUIAct
{
switch(ea.getEventType())
{
case(osgGA::GUIEventAdapter::KEYBOARD):
case(osgGA::GUIEventAdapter::KEYDOWN):
{
if (ea.getKey()=='a')
{

View File

@@ -31,7 +31,7 @@ public:
{
bool handled = false;
if (ea.getEventType() == osgGA::GUIEventAdapter::KEYBOARD)
if (ea.getEventType() == osgGA::GUIEventAdapter::KEYDOWN)
{
const char keys[] = "!@#$%^&*()";
for (unsigned int i = 0; i < (sizeof(keys) / sizeof(keys[0])); i++) {

View File

@@ -463,7 +463,7 @@ protected:
}
virtual void keyboard(unsigned char key, int x, int y)
virtual void keyboard(int key, int x, int y)
{
switch(key)
{