18 #ifndef KEYBOARDMOUSE_H
19 #define KEYBOARDMOUSE_H
25 #include <osgGA/GUIEventHandler>
31 using namespace vrecko;
33 namespace vreckoDP_base {
41 virtual int openDevice(
void);
42 int closeDevice(
void);
45 bool isKeyDown(
int keyCode) {
return keydown_map[keyCode]; };
49 virtual bool handle(
const osgGA::GUIEventAdapter& ea,osgGA::GUIActionAdapter&);
50 virtual void accept(osgGA::GUIEventHandlerVisitor& v) { v.visit(*
this); };
53 void mouseScroll( osgGA::GUIEventAdapter::ScrollingMotion );
54 void mouseMotion(
const osgGA::GUIEventAdapter& ea, osgGA::GUIActionAdapter& aa);
55 void passiveMouseMotion(
const osgGA::GUIEventAdapter& ea, osgGA::GUIActionAdapter& aa,
float mx,
float my);
56 void buttonPress(
const osgGA::GUIEventAdapter& ea, osgGA::GUIActionAdapter& aa,
float mx,
float my,
unsigned int mb);
57 void doubleButtonPress(
const osgGA::GUIEventAdapter& ea, osgGA::GUIActionAdapter& aa,
float mx,
float my,
unsigned int mb);
58 void buttonRelease(
const osgGA::GUIEventAdapter& ea, osgGA::GUIActionAdapter& aa,
float mx,
float my,
unsigned int mb);
60 void keyRelease(
int );
61 void specialKeyPress(
int );
62 void specialKeyRelease(
int );
64 bool idle() {
return false; }
79 bool sendMousePosIfReady();
80 bool keyToString(
int key, std::string *str);