Index: /code/branches/input/bin/keybindings.ini
===================================================================
--- /code/branches/input/bin/keybindings.ini	(revision 1213)
+++ /code/branches/input/bin/keybindings.ini	(revision 1213)
@@ -0,0 +1,560 @@
+[KeyBinder]
+P_UNASSIGNED=
+R_UNASSIGNED=
+H_UNASSIGNED=
+P_ESCAPE=exit
+R_ESCAPE=
+H_ESCAPE=
+P_1=
+R_1=
+H_1=
+P_2=
+R_2=
+H_2=
+P_3=
+R_3=
+H_3=
+P_4=
+R_4=
+H_4=
+P_5=
+R_5=
+H_5=
+P_6=
+R_6=
+H_6=
+P_7=
+R_7=
+H_7=
+P_8=
+R_8=
+H_8=
+P_9=
+R_9=
+H_9=
+P_0=
+R_0=
+H_0=
+P_MINUS=
+R_MINUS=
+H_MINUS=
+P_EQUALS=activateConsole
+R_EQUALS=
+H_EQUALS=
+P_BACK=
+R_BACK=
+H_BACK=
+P_TAB=
+R_TAB=
+H_TAB=
+P_Q=
+R_Q=
+H_Q=
+P_W=
+R_W=
+H_W=
+P_E=
+R_E=
+H_E=
+P_R=
+R_R=
+H_R=
+P_T=
+R_T=
+H_T=
+P_Y=
+R_Y=
+H_Y=
+P_U=
+R_U=
+H_U=
+P_I=
+R_I=
+H_I=
+P_O=
+R_O=
+H_O=
+P_P=
+R_P=
+H_P=
+P_LBRACKET=
+R_LBRACKET=
+H_LBRACKET=
+P_RBRACKET=
+R_RBRACKET=
+H_RBRACKET=
+P_RETURN=
+R_RETURN=
+H_RETURN=
+P_LCONTROL=
+R_LCONTROL=
+H_LCONTROL=
+P_A=
+R_A=
+H_A=
+P_S=
+R_S=
+H_S=
+P_D=
+R_D=
+H_D=
+P_F=
+R_F=
+H_F=
+P_G=
+R_G=
+H_G=
+P_H=
+R_H=
+H_H=
+P_J=
+R_J=
+H_J=
+P_K=
+R_K=
+H_K=
+P_L=
+R_L=
+H_L=
+P_SEMICOLON=
+R_SEMICOLON=
+H_SEMICOLON=
+P_APOSTROPHE=
+R_APOSTROPHE=
+H_APOSTROPHE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D=
+P_NUMPAD1=
+R_NUMPAD1=
+H_NUMPAD1=
+P_NUMPAD2=
+R_NUMPAD2=
+H_NUMPAD2=
+P_NUMPAD3=
+R_NUMPAD3=
+H_NUMPAD3=
+P_NUMPAD0=
+R_NUMPAD0=
+H_NUMPAD0=
+P_DECIMAL=
+R_DECIMAL=
+H_DECIMAL=
+P_=
+R_=
+H_=
+P_OEM_102=
+R_OEM_102=
+H_OEM_102=
+P_F11=
+R_F11=
+H_F11=
+P_F12=
+R_F12=
+H_F12=
+P_F13=
+R_F13=
+H_F13=
+P_F14=
+R_F14=
+H_F14=
+P_F15=
+R_F15=
+H_F15=
+P_KANA=
+R_KANA=
+H_KANA=
+P_ABNT_C1=
+R_ABNT_C1=
+H_ABNT_C1=
+P_CONVERT=
+R_CONVERT=
+H_CONVERT=
+P_NOCONVERT=
+R_NOCONVERT=
+H_NOCONVERT=
+P_YEN=
+R_YEN=
+H_YEN=
+P_ABNT_C2=
+R_ABNT_C2=
+H_ABNT_C2=
+P_NUMPADEQUALS=
+R_NUMPADEQUALS=
+H_NUMPADEQUALS=
+P_PREVTRACK=
+R_PREVTRACK=
+H_PREVTRACK=
+P_AT=
+R_AT=
+H_AT=
+P_COLON=
+R_COLON=
+H_COLON=
+P_UNDERLINE=
+R_UNDERLINE=
+H_UNDERLINE=
+P_KANJI=
+R_KANJI=
+H_KANJI=
+P_STOP=
+R_STOP=
+H_STOP=
+P_AX=
+R_AX=
+H_AX=
+P_UNLABELED=
+R_UNLABELED=
+H_UNLABELED=
+P_NEXTTRACK=
+R_NEXTTRACK=
+H_NEXTTRACK=
+P_NUMPADENTER=activateConsole
+R_NUMPADENTER=
+H_NUMPADENTER=
+P_RCONTROL=
+R_RCONTROL=
+H_RCONTROL=
+P_MUTE=
+R_MUTE=
+H_MUTE=
+P_CALCULATOR=
+R_CALCULATOR=
+H_CALCULATOR=
+P_PLAYPAUSE=
+R_PLAYPAUSE=
+H_PLAYPAUSE=
+P_MEDIASTOP=exit
+R_ME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P_MEDIASELECT=
+R_MEDIASELECT=
+H_MEDIASELECT=
+P_MouseLeft=
+R_MouseLeft=
+H_MouseLeft=
+P_MouseRight=
+R_MouseRight=
+H_MouseRight=
+P_MouseMiddle=
+R_MouseMiddle=
+H_MouseMiddle=
+P_MouseButton3=
+R_MouseButton3=
+H_MouseButton3=
+P_MouseButton4=
+R_MouseButton4=
+H_MouseButton4=
+P_MouseButton5=
+R_MouseButton5=
+H_MouseButton5=
+P_MouseButton6=
+R_MouseButton6=
+H_MouseButton6=
+P_MouseButton7=
+R_MouseButton7=
+H_MouseButton7=
+P_JoyStick0=
+R_JoyStick0=
+H_JoyStick0=
+P_JoyStick1=
+R_JoyStick1=
+H_JoyStick1=
+P_JoyStick2=
+R_JoyStick2=
+H_JoyStick2=
+P_JoyStick3=
+R_JoyStick3=
+H_JoyStick3=
+P_JoyStick4=
+R_JoyStick4=
+H_JoyStick4=
+P_JoyStick5=
+R_JoyStick5=
+H_JoyStick5=
+P_JoyStick6=
+R_JoyStick6=
+H_JoyStick6=
+P_JoyStick7=
+R_JoyStick7=
+H_JoyStick7=
+P_JoyStick8=
+R_JoyStick8=
+H_JoyStick8=
+P_JoyStick9=
+R_JoyStick9=
+H_JoyStick9=
+P_JoyStick10=
+R_JoyStick10=
+H_JoyStick10=
+P_JoyStick11=
+R_JoyStick11=
+H_JoyStick11=
+P_JoyStick12=
+R_JoyStick12=
+H_JoyStick12=
+P_JoyStick13=
+R_JoyStick13=
+H_JoyStick13=
+P_JoyStick14=
+R_JoyStick14=
+H_JoyStick14=
+P_JoyStick15=
+R_JoyStick15=
+H_JoyStick15=
+P_JoyStick16=
+R_JoyStick16=
+H_JoyStick16=
+P_JoyStick17=
+R_JoyStick17=
+H_JoyStick17=
+P_JoyStick18=
+R_JoyStick18=
+H_JoyStick18=
+P_JoyStick19=
+R_JoyStick19=
+H_JoyStick19=
+P_JoyStick20=
+R_JoyStick20=
+H_JoyStick20=
+P_JoyStick21=
+R_JoyStick21=
+H_JoyStick21=
+P_JoyStick22=
+R_JoyStick22=
+H_JoyStick22=
+P_JoyStick23=
+R_JoyStick23=
+H_JoyStick23=
+P_JoyStick24=
+R_JoyStick24=
+H_JoyStick24=
+P_JoyStick25=
+R_JoyStick25=
+H_JoyStick25=
+P_JoyStick26=
+R_JoyStick26=
+H_JoyStick26=
+P_JoyStick27=
+R_JoyStick27=
+H_JoyStick27=
+P_JoyStick28=
+R_JoyStick28=
+H_JoyStick28=
+P_JoyStick29=
+R_JoyStick29=
+H_JoyStick29=
+P_JoyStick30=
+R_JoyStick30=
+H_JoyStick30=
+P_JoyStick31=
+R_JoyStick31=
+H_JoyStick31=
+
Index: /code/branches/input/src/core/InputHandler.cc
===================================================================
--- /code/branches/input/src/core/InputHandler.cc	(revision 1212)
+++ /code/branches/input/src/core/InputHandler.cc	(revision 1213)
@@ -34,4 +34,6 @@
 #include "InputHandler.h"
 #include "Debug.h"
+#include "ConfigValueIncludes.h"
+#include "CoreIncludes.h"
 #include "util/Convert.h"
 #include "core/CommandExecutor.h"
@@ -48,5 +50,191 @@
   KeyBinder::KeyBinder()
   {
+    RegisterObject(KeyBinder);
     clearBindings();
+
+    std::string keyNames[] = {
+    "UNASSIGNED",
+		"ESCAPE",
+		"1",
+		"2",
+		"3",
+		"4",
+		"5",
+		"6",
+		"7",
+		"8",
+		"9",
+		"0",
+		"MINUS",
+		"EQUALS",
+		"BACK",
+		"TAB",
+		"Q",
+		"W",
+		"E",
+		"R",
+		"T",
+		"Y",
+		"U",
+		"I",
+		"O",
+		"P",
+		"LBRACKET",
+		"RBRACKET",
+		"RETURN",
+		"LCONTROL",
+		"A",
+		"S",
+		"D",
+		"F",
+		"G",
+		"H",
+		"J",
+		"K",
+		"L",
+		"SEMICOLON",
+		"APOSTROPHE",
+		"GRAVE",
+		"LSHIFT",
+		"BACKSLASH",
+		"Z",
+		"X",
+		"C",
+		"V",
+		"B",
+		"N",
+		"M",
+		"COMMA",
+		"PERIOD",
+		"SLASH",
+		"RSHIFT",
+		"MULTIPLY",
+		"LMENU",
+		"SPACE",
+		"CAPITAL",
+		"F1",
+		"F2",
+		"F3",
+		"F4",
+		"F5",
+		"F6",
+		"F7",
+		"F8",
+		"F9",
+		"F10",
+		"NUMLOCK",
+		"SCROLL",
+		"NUMPAD7",
+		"NUMPAD8",
+		"NUMPAD9",
+		"SUBTRACT",
+		"NUMPAD4",
+		"NUMPAD5",
+		"NUMPAD6",
+		"ADD",
+		"NUMPAD1",
+		"NUMPAD2",
+		"NUMPAD3",
+		"NUMPAD0",
+		"DECIMAL",
+    "","",
+		"OEM_102",
+		"F11",
+		"F12",
+    "","","","","","","","","","","",
+		"F13",
+		"F14",
+		"F15",
+    "","","","","","","","","","",
+		"KANA",
+    "","",
+		"ABNT_C1",
+    "","","","","",
+		"CONVERT",
+    "",
+		"NOCONVERT",
+    "",
+		"YEN",
+		"ABNT_C2",
+    "","","","","","","","","","","","","","",
+		"NUMPADEQUALS",
+    "","",
+		"PREVTRACK",
+		"AT",
+		"COLON",
+		"UNDERLINE",
+		"KANJI",
+		"STOP",
+		"AX",
+		"UNLABELED",
+		"NEXTTRACK",
+    "","",
+		"NUMPADENTER",
+		"RCONTROL",
+    "","",
+		"MUTE",
+		"CALCULATOR",
+		"PLAYPAUSE",
+    "",
+		"MEDIASTOP",
+    "","","","","","","","","",
+		"VOLUMEDOWN",
+    "",
+		"VOLUMEUP",
+    "",
+		"WEBHOME",
+		"NUMPADCOMMA",
+    "",
+		"DIVIDE",
+    "",
+		"SYSRQ",
+		"RMENU",
+    "","","","","","","","","","","","",
+		"PAUSE",
+    "",
+		"HOME",
+		"UP",
+		"PGUP",
+    "",
+		"LEFT",
+    "",
+		"RIGHT",
+    "",
+		"END",
+		"DOWN",
+		"PGDOWN",
+		"INSERT",
+		"DELETE",
+    "","","","","","","",
+		"LWIN",
+		"RWIN",
+		"APPS",
+		"POWER",
+		"SLEEP",
+    "","","",
+		"WAKE",
+    "",
+		"WEBSEARCH",
+		"WEBFAVORITES",
+		"WEBREFRESH",
+		"WEBSTOP",
+		"WEBFORWARD",
+		"WEBBACK",
+		"MYCOMPUTER",
+		"MAIL",
+		"MEDIASELECT"
+    };
+    for (int i = 0; i < numberOfKeys_s; i++)
+      keyNames_[i] = keyNames[i];
+
+    std::string mouseButtonNames[] = {
+    "MouseLeft", "MouseRight", "MouseMiddle",
+    "MouseButton3", "MouseButton4", "MouseButton5",
+    "MouseButton6", "MouseButton7" };
+    for (int i = 0; i < numberOfMouseButtons_s; i++)
+      mouseButtonNames_[i] = mouseButtonNames[i];
+
+    for (int i = 0; i < numberOfJoyStickButtons_s; i++)
+      joyStickButtonNames_[i] = "JoyStick" + getConvertedValue<int, std::string>(i);
   }
 
@@ -56,4 +244,88 @@
   KeyBinder::~KeyBinder()
   {
+  }
+
+  /**
+    @brief Loader for the key bindings, managed by config values.
+  */
+  void KeyBinder::setConfigValues()
+  {
+    ConfigValueContainer* cont;
+    std::string modes[] = {"P_", "R_", "H_"};
+
+    // keys
+    for (int i = 0; i < numberOfKeys_s; i++)
+    {
+      for (int j = 0; j < 3; j++)
+      {
+        cont = getIdentifier()->getConfigValueContainer(modes[j] + keyNames_[i]);
+        if (!cont)
+        {
+          cont = new ConfigValueContainer(CFT_Keybindings, getIdentifier(), modes[j] + keyNames_[i], "");
+          getIdentifier()->addConfigValueContainer(modes[j] + keyNames_[i], cont);
+        }
+        switch (j)
+        {
+          case 0:
+            cont->getValue(bindingsKeyPress_ + i);
+            break;
+          case 1:
+            cont->getValue(bindingsKeyRelease_ + i);
+            break;
+          case 2:
+            cont->getValue(bindingsKeyHold_ + i);
+        }
+      }
+    }
+
+    // mouse buttons
+    for (int i = 0; i < numberOfMouseButtons_s; i++)
+    {
+      for (int j = 0; j < 3; j++)
+      {
+        cont = getIdentifier()->getConfigValueContainer(modes[j] + mouseButtonNames_[i]);
+        if (!cont)
+        {
+          cont = new ConfigValueContainer(CFT_Keybindings, getIdentifier(), modes[j] + mouseButtonNames_[i], "");
+          getIdentifier()->addConfigValueContainer(modes[j] + mouseButtonNames_[i], cont);
+        }
+        switch (j)
+        {
+          case 0:
+            cont->getValue(bindingsMouseButtonPress_ + i);
+            break;
+          case 1:
+            cont->getValue(bindingsMouseButtonRelease_ + i);
+            break;
+          case 2:
+            cont->getValue(bindingsMouseButtonHold_ + i);
+        }
+      }
+    }
+
+    // joy stick buttons
+    for (int i = 0; i < numberOfJoyStickButtons_s; i++)
+    {
+      for (int j = 0; j < 3; j++)
+      {
+        cont = getIdentifier()->getConfigValueContainer(modes[j] + joyStickButtonNames_[i]);
+        if (!cont)
+        {
+          cont = new ConfigValueContainer(CFT_Keybindings, getIdentifier(), modes[j] + joyStickButtonNames_[i], "");
+          getIdentifier()->addConfigValueContainer(modes[j] + joyStickButtonNames_[i], cont);
+        }
+        switch (j)
+        {
+          case 0:
+            cont->getValue(bindingsJoyStickButtonPress_ + i);
+            break;
+          case 1:
+            cont->getValue(bindingsJoyStickButtonRelease_ + i);
+            break;
+          case 2:
+            cont->getValue(bindingsJoyStickButtonHold_ + i);
+        }
+      }
+    }
   }
 
@@ -91,11 +363,6 @@
     COUT(ORX_DEBUG) << "KeyBinder: Loading key bindings..." << std::endl;
 
-    // clear all the bindings at first.
-    clearBindings();
-
-    // TODO: Insert the code to load the bindings from file.
-    bindingsKeyPress_[OIS::KC_NUMPADENTER] = "activateConsole";
-    bindingsKeyPress_[OIS::KC_ESCAPE] = "exit";
-    bindingsKeyHold_ [OIS::KC_U] = "exec disco.txt";
+    ConfigFileManager::getSingleton()->setFile(CFT_Keybindings, "keybindings.ini");
+    setConfigValues();
 
     COUT(ORX_DEBUG) << "KeyBinder: Loading key bindings done." << std::endl;
@@ -110,4 +377,5 @@
   bool KeyBinder::keyPressed(const OIS::KeyEvent &e)
   {
+    COUT(3) << "Key: " << e.key << std::endl;
     // find the appropriate key binding
     std::string cmdStr = bindingsKeyPress_[int(e.key)];
Index: /code/branches/input/src/core/InputHandler.h
===================================================================
--- /code/branches/input/src/core/InputHandler.h	(revision 1212)
+++ /code/branches/input/src/core/InputHandler.h	(revision 1213)
@@ -39,4 +39,5 @@
 #include <string>
 #include "ois/OIS.h"
+#include "OrxonoxClass.h"
 
 namespace orxonox
@@ -85,5 +86,5 @@
            Manages the key bindings.
   */
-  class _CoreExport KeyBinder : public KeyHandler, public MouseHandler, public JoyStickHandler
+  class _CoreExport KeyBinder : public KeyHandler, public MouseHandler, public JoyStickHandler, public OrxonoxClass
   {
   public:
@@ -93,4 +94,8 @@
     bool loadBindings();
     void clearBindings();
+
+    void setConfigValues();
+
+    std::string testtest;
 
   private: // functions
@@ -112,17 +117,18 @@
 
   private: // variables
-    /** denotes the maximum number of different keys there are in OIS.
-        256 should be ok since the highest number in the OIS enum is 237. */
-    static const int numberOfKeys_s = 256;
+
+    //! denotes the number of different keys there are in OIS.
+    static const int numberOfKeys_s = 0xEE;
     //! Array of input events for every pressed key
     std::string bindingsKeyPress_  [numberOfKeys_s];
     //! Array of input events for every released key
     std::string bindingsKeyRelease_[numberOfKeys_s];
-    //!Array of input events for every held key
+    //! Array of input events for every held key
     std::string bindingsKeyHold_   [numberOfKeys_s];
+    //! Names of the keys as strings
+    std::string keyNames_[numberOfKeys_s];
 
-    /** denotes the maximum number of different buttons there are in OIS.
-        16 should be ok since the highest number in the OIS enum is 7. */
-    static const int numberOfMouseButtons_s = 16;
+    //! denotes the number of different mouse buttons there are in OIS.
+    static const int numberOfMouseButtons_s = 8;
     //! Array of input events for every pressed mouse button
     std::string bindingsMouseButtonPress_  [numberOfMouseButtons_s];
@@ -131,7 +137,8 @@
     //! Array of input events for every held mouse button
     std::string bindingsMouseButtonHold_   [numberOfMouseButtons_s];
+    //! Names of the mouse buttons as strings
+    std::string mouseButtonNames_[numberOfMouseButtons_s];
 
-    /** denotes the maximum number of different buttons there are in OIS.
-        32 should be ok. */
+    //! denotes the number of different joy stick buttons there are in OIS.
     static const int numberOfJoyStickButtons_s = 32;
     //! Array of input events for every pressed joy stick button
@@ -141,4 +148,6 @@
     //! Array of input events for every held joy stick button
     std::string bindingsJoyStickButtonHold_   [numberOfJoyStickButtons_s];
+    //! Names of the joy stick buttons as strings
+    std::string joyStickButtonNames_[numberOfJoyStickButtons_s];
 
   };
Index: /code/branches/input/src/core/InputManager.cc
===================================================================
--- /code/branches/input/src/core/InputManager.cc	(revision 1212)
+++ /code/branches/input/src/core/InputManager.cc	(revision 1213)
@@ -822,7 +822,11 @@
     {
       if ((*it) == (*mapIt).second)
+      {
+        _getSingleton().stateRequest_ = IS_CUSTOM;
         return true;
+      }
     }
     _getSingleton().activeKeyHandlers_.push_back((*mapIt).second);
+    _getSingleton().stateRequest_ = IS_CUSTOM;
     return true;
   }
@@ -846,7 +850,9 @@
       {
         _getSingleton().activeKeyHandlers_.erase(it);
+        _getSingleton().stateRequest_ = IS_CUSTOM;
         return true;
       }
     }
+    _getSingleton().stateRequest_ = IS_CUSTOM;
     return true;
   }
@@ -942,7 +948,11 @@
     {
       if ((*it) == (*mapIt).second)
+      {
+        _getSingleton().stateRequest_ = IS_CUSTOM;
         return true;
+      }
     }
     _getSingleton().activeMouseHandlers_.push_back((*mapIt).second);
+    _getSingleton().stateRequest_ = IS_CUSTOM;
     return true;
   }
@@ -966,7 +976,9 @@
       {
         _getSingleton().activeMouseHandlers_.erase(it);
+        _getSingleton().stateRequest_ = IS_CUSTOM;
         return true;
       }
     }
+    _getSingleton().stateRequest_ = IS_CUSTOM;
     return true;
   }
@@ -1071,7 +1083,11 @@
     {
       if ((*it) == (*handlerIt).second)
+      {
+        _getSingleton().stateRequest_ = IS_CUSTOM;
         return true;
+      }
     }
     _getSingleton().activeJoyStickHandlers_[id].push_back((*handlerIt).second);
+    _getSingleton().stateRequest_ = IS_CUSTOM;
     return true;
   }
@@ -1101,7 +1117,9 @@
       {
         _getSingleton().activeJoyStickHandlers_[id].erase(it);
+        _getSingleton().stateRequest_ = IS_CUSTOM;
         return true;
       }
     }
+    _getSingleton().stateRequest_ = IS_CUSTOM;
     return true;
   }
Index: /code/branches/input/src/orxonox/Orxonox.cc
===================================================================
--- /code/branches/input/src/orxonox/Orxonox.cc	(revision 1212)
+++ /code/branches/input/src/orxonox/Orxonox.cc	(revision 1213)
@@ -398,5 +398,8 @@
           ogre_->getWindowWidth(), ogre_->getWindowHeight()))
       abortImmediateForce();
-    InputManager::setInputState(InputManager::IS_NORMAL);
+    InputManager::setInputState(InputManager::IS_CUSTOM);
+    InputManager::enableKeyHandler("keybinder");
+    InputManager::enableMouseHandler("keybinder");
+    InputManager::enableJoyStickHandler("keybinder", 0);
   }
 
Index: /code/branches/input/src/orxonox/objects/SpaceShip.cc
===================================================================
--- /code/branches/input/src/orxonox/objects/SpaceShip.cc	(revision 1212)
+++ /code/branches/input/src/orxonox/objects/SpaceShip.cc	(revision 1213)
@@ -428,11 +428,9 @@
     void SpaceShip::tick(float dt)
     {
-      if (InputManager::getMouse()->getEventCallback() != this)
-        {
-            if (InputManager::getMouse())
-            {
-                InputManager::getMouse()->setEventCallback(this);
-                this->setMouseEventCallback_ = true;
-            }
+        if (!setMouseEventCallback_)
+        {
+          InputManager::addMouseHandler(this, "SpaceShip");
+          InputManager::enableMouseHandler("SpaceShip");
+          setMouseEventCallback_ = true;
         }
 
@@ -458,6 +456,4 @@
 
         OIS::Keyboard* mKeyboard = InputManager::getKeyboard();
-        //FIXME: variable never used
-        //OIS::Mouse* mMouse = InputManager::getSingleton().getMouse();
 
 
Index: /code/branches/input/src/orxonox/objects/SpaceShip.h
===================================================================
--- /code/branches/input/src/orxonox/objects/SpaceShip.h	(revision 1212)
+++ /code/branches/input/src/orxonox/objects/SpaceShip.h	(revision 1213)
@@ -34,5 +34,5 @@
 #include <OgrePrerequisites.h>
 
-#include "ois/OISMouse.h"
+#include "core/InputHandler.h"
 #include "Model.h"
 #include "../tools/BillboardSet.h"
@@ -40,5 +40,5 @@
 namespace orxonox
 {
-    class _OrxonoxExport SpaceShip : public Model, public OIS::MouseListener
+    class _OrxonoxExport SpaceShip : public Model, public MouseHandler
     {
         public:
@@ -68,4 +68,5 @@
             bool mousePressed(const OIS::MouseEvent &e, OIS::MouseButtonID id);
             bool mouseReleased(const OIS::MouseEvent &e, OIS::MouseButtonID id);
+            bool mouseHeld(const OIS::MouseEvent &e, OIS::MouseButtonID id) { return true; }
 
 
