Index: code/trunk/src/core/BaseObject.cc
===================================================================
--- code/trunk/src/core/BaseObject.cc	(revision 1224)
+++ code/trunk/src/core/BaseObject.cc	(revision 1293)
@@ -45,12 +45,11 @@
         @brief Constructor: Registers the object in the BaseObject-list.
     */
-    BaseObject::BaseObject()
+    BaseObject::BaseObject() :
+      bActive_(true),
+      bVisible_(true),
+      level_(0),
+      namespace_(0)
     {
         RegisterRootObject(BaseObject);
-
-        this->bActive_ = true;
-        this->bVisible_ = true;
-        this->level_ = 0;
-        this->namespace_ = 0;
     }
 
Index: code/trunk/src/core/CommandExecutor.h
===================================================================
--- code/trunk/src/core/CommandExecutor.h	(revision 1224)
+++ code/trunk/src/core/CommandExecutor.h	(revision 1293)
@@ -89,4 +89,5 @@
             inline std::string getAdditionalParameter() const
                 { return (this->additionalParameter_ != "") ? (" " + this->additionalParameter_) : ""; }
+            inline std::string getCommandString() const { return this->processedCommand_; }
 
             void setEvaluatedParameter(unsigned int index, MultiTypeMath param);
Index: code/trunk/src/core/CoreIncludes.h
===================================================================
--- code/trunk/src/core/CoreIncludes.h	(revision 1224)
+++ code/trunk/src/core/CoreIncludes.h	(revision 1293)
@@ -59,5 +59,7 @@
     if (orxonox::Identifier::isCreatingHierarchy() && this->getParents()) \
         this->getParents()->insert(this->getParents()->end(), this->getIdentifier()); \
-    orxonox::ClassManager<ClassName>::getIdentifier()->addObject(this)
+    orxonox::ClassManager<ClassName>::getIdentifier()->addObject(this); \
+    if (orxonox::Identifier::isCreatingHierarchy()) \
+      return
 
 /**
Index: code/trunk/src/core/CorePrereqs.h
===================================================================
--- code/trunk/src/core/CorePrereqs.h	(revision 1224)
+++ code/trunk/src/core/CorePrereqs.h	(revision 1293)
@@ -144,12 +144,12 @@
 
   // input
+  //class GUIInputHandler;
   class InputBuffer;
   class InputBufferListener;
   class InputManager;
+  class JoyStickHandler;
   class KeyBinder;
-  class GUIInputHandler;
   class KeyHandler;
   class MouseHandler;
-  class JoyStickHandler;
 
 }
Index: code/trunk/src/core/Debug.h
===================================================================
--- code/trunk/src/core/Debug.h	(revision 1224)
+++ code/trunk/src/core/Debug.h	(revision 1293)
@@ -273,5 +273,5 @@
 #define CCOUT_EXEC(x) \
   orxonox::OutputHandler::getOutStream().setOutputLevel(x) \
-  << "*** " << this->getIdentifier()->getName() << ": "
+  << this->getIdentifier()->getName() << ": "
 
 #ifndef CCOUT
Index: code/trunk/src/core/Error.cc
===================================================================
--- code/trunk/src/core/Error.cc	(revision 1224)
+++ code/trunk/src/core/Error.cc	(revision 1293)
@@ -37,15 +37,5 @@
 namespace orxonox
 {
-	Error::Error()
-	{
-		Error(0,"");
-	}
-
 	Error::Error(std::string errorMsg, int errorCode)
-	{
-		Error(errorCode, errorMsg);
-	}
-
-	Error::Error(int errorCode, std::string errorMsg)
 	{
 		COUT(1) << "############################ "<< std::endl
Index: code/trunk/src/core/Error.h
===================================================================
--- code/trunk/src/core/Error.h	(revision 1224)
+++ code/trunk/src/core/Error.h	(revision 1293)
@@ -44,7 +44,5 @@
 	{
 	public:
-		Error();
-		Error(std::string errorMsg, int errorCode = 0);
-		Error(int errorCode, std::string errorMsg = "");
+		Error(std::string errorMsg = "", int errorCode = 0);
 	private:
 
Index: code/trunk/src/core/InputBuffer.cc
===================================================================
--- code/trunk/src/core/InputBuffer.cc	(revision 1224)
+++ code/trunk/src/core/InputBuffer.cc	(revision 1293)
@@ -23,5 +23,5 @@
  *      Fabian 'x3n' Landau
  *   Co-authors:
- *      ...
+ *      Reto Grieder
  *
  */
@@ -32,162 +32,182 @@
 
 #include "util/Clipboard.h"
-#include "InputManager.h"
+#include "CoreIncludes.h"
+#include "ConfigValueIncludes.h"
 
 namespace orxonox
 {
-    InputBuffer::InputBuffer()
-    {
-        //this->bActivated_ = false;
-        this->allowedChars_ = "abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZäöüÄÖÜ0123456789 \\\"(){}[]<>.:,;_-+*/=!?|$&%^";
-        this->keyboard_ = InputManager::getKeyboard();
-        this->buffer_ = "";
-
-        //this->keyboard_->setEventCallback(this);
-    }
-
-    InputBuffer::InputBuffer(const std::string allowedChars)
-    {
-        //this->bActivated_ = false;
-        this->allowedChars_ = allowedChars;
-        this->keyboard_ = InputManager::getKeyboard();
-        this->buffer_ = "";
-    }
-/*
-    void InputBuffer::registerListener(InputBufferListener* listener, void (InputBufferListener::*function)(), bool bOnlySingleInput)
-    {
-        struct InputBufferListenerTuple newListener = {listener, function, true, bOnlySingleInput, ' '};
-        this->listeners_.insert(this->listeners_.end(), newListener);
-    }
-
-    void InputBuffer::registerListener(InputBufferListener* listener, void (InputBufferListener::*function)(), char char_, bool bOnlySingleInput)
-    {
-        struct InputBufferListenerTuple newListener = {listener, function, false, bOnlySingleInput, char_};
-        this->listeners_.insert(this->listeners_.end(), newListener);
-    }
-*/
-    void InputBuffer::set(const std::string& input)
-    {
-        this->buffer_ = "";
-        this->append(input);
-    }
-
-    void InputBuffer::append(const std::string& input)
-    {
-        for (unsigned int i = 0; i < input.size(); i++)
-        {
-            if (this->charIsAllowed(input[i]))
-                this->buffer_ += input[i];
-
-            this->updated(input[i], false);
-        }
-        this->updated();
-    }
-
-    void InputBuffer::append(const char& input)
-    {
-        if (this->charIsAllowed(input))
-            this->buffer_ += input;
-
-        this->updated(input, true);
-    }
-
-    void InputBuffer::clear()
-    {
-        this->buffer_ = "";
-        this->updated();
-    }
-
-    void InputBuffer::removeLast()
-    {
-        this->buffer_ = this->buffer_.substr(0, this->buffer_.size() - 1);
-        this->updated();
-    }
-
-    void InputBuffer::updated()
-    {
-        for (std::list<InputBufferListenerTuple>::iterator it = this->listeners_.begin(); it != this->listeners_.end(); ++it)
-        {
-            if ((*it).bListenToAllChanges_)
-                (*(*it).listener_.*(*it).function_)();
-        }
-    }
-
-    void InputBuffer::updated(const char& update, bool bSingleInput)
-    {
-        for (std::list<InputBufferListenerTuple>::iterator it = this->listeners_.begin(); it != this->listeners_.end(); ++it)
-        {
-            if (((*it).bListenToAllChanges_ || ((*it).char_ == update)) && (!(*it).bOnlySingleInput_ || bSingleInput))
-                (*(*it).listener_.*(*it).function_)();
-        }
-    }
-
-    /*void InputBuffer::activityChanged() const
-    {
-    }*/
-
-    bool InputBuffer::charIsAllowed(const char& input)
-    {
-        if (this->allowedChars_ == "")
-            return true;
-        else
-            return (this->allowedChars_.find(input) != std::string::npos);
-    }
-
-    bool InputBuffer::keyPressed(const OIS::KeyEvent &e)
-    {
-        /*if (e.key == OIS::KC_NUMPADENTER)
-        {
-            this->setActivated(!this->isActivated());
-            this->clear();
-            return true;
-        }*/
-
-        if (this->keyboard_->isModifierDown(OIS::Keyboard::Ctrl))
-        {
-            if (e.key == OIS::KC_V)
-            {
-                this->append(fromClipboard());
-                return true;
-            }
-            else if (e.key == OIS::KC_C)
-            {
-                toClipboard(this->buffer_);
-                return true;
-            }
-            else if (e.key == OIS::KC_X)
-            {
-                toClipboard(this->buffer_);
-                this->clear();
-                return true;
-            }
-        }
-        else if (this->keyboard_->isModifierDown(OIS::Keyboard::Shift))
-        {
-            if (e.key == OIS::KC_INSERT)
-            {
-                this->append(fromClipboard());
-                return true;
-            }
-            else if (e.key == OIS::KC_DELETE)
-            {
-                toClipboard(this->buffer_);
-                this->clear();
-                return true;
-            }
-        }
-
-        //std::cout << this->keyboard_->getAsString(e.key) << " / " << (char)e.text << std::endl;
-
-        std::string input = this->keyboard_->getAsString(e.key);
-        /*if (input.size() >= 1)
-            this->append(input[0]);*/
-
-        this->append((char)e.text);
-        return true;
-    }
-
-    bool InputBuffer::keyReleased(const OIS::KeyEvent &e)
-    {
-        return true;
-    }
+  InputBuffer::InputBuffer(const std::string allowedChars) :
+    buffer_(""),
+    allowedChars_(allowedChars),
+    lastKey_(KeyCode::Unassigned),
+    timeSinceKeyPressed_(0.0f),
+    timeSinceKeyRepeated_(0.0f),
+    keysToRepeat_(0)
+  {
+    RegisterObject(InputBuffer);
+    setConfigValues();
+  }
+
+  void InputBuffer::setConfigValues()
+  {
+    SetConfigValue(keyRepeatDeleay_, 0.4).description("Key repeat deleay of the input buffer");
+    SetConfigValue(keyRepeatTime_, 0.022).description("Key repeat time of the input buffer");
+    if (keyRepeatDeleay_ < 0.0)
+    {
+      ResetConfigValue(keyRepeatDeleay_);
+    }
+    if (keyRepeatTime_ < 0.0)
+    {
+      ResetConfigValue(keyRepeatTime_);
+    }
+  }
+  /*
+  void InputBuffer::registerListener(InputBufferListener* listener, void (InputBufferListener::*function)(), bool bOnlySingleInput)
+  {
+    struct InputBufferListenerTuple newListener = {listener, function, true, bOnlySingleInput, ' '};
+    listeners_.insert(listeners_.end(), newListener);
+  }
+
+  void InputBuffer::registerListener(InputBufferListener* listener, void (InputBufferListener::*function)(), char char_, bool bOnlySingleInput)
+  {
+    struct InputBufferListenerTuple newListener = {listener, function, false, bOnlySingleInput, char_};
+    listeners_.insert(listeners_.end(), newListener);
+  }
+  */
+  void InputBuffer::set(const std::string& input)
+  {
+    buffer_ = "";
+    append(input);
+  }
+
+  void InputBuffer::append(const std::string& input)
+  {
+    for (unsigned int i = 0; i < input.size(); i++)
+    {
+      if (charIsAllowed(input[i]))
+        buffer_ += input[i];
+
+      updated(input[i], false);
+    }
+    updated();
+  }
+
+  void InputBuffer::append(const char& input)
+  {
+    if (charIsAllowed(input))
+      buffer_ += input;
+
+    updated(input, true);
+  }
+
+  void InputBuffer::clear()
+  {
+    buffer_ = "";
+    updated();
+  }
+
+  void InputBuffer::removeLast()
+  {
+    buffer_ = buffer_.substr(0, buffer_.size() - 1);
+    updated();
+  }
+
+  void InputBuffer::updated()
+  {
+    for (std::list<InputBufferListenerTuple>::iterator it = listeners_.begin(); it != listeners_.end(); ++it)
+    {
+      if ((*it).bListenToAllChanges_)
+        (*(*it).listener_.*(*it).function_)();
+    }
+  }
+
+  void InputBuffer::updated(const char& update, bool bSingleInput)
+  {
+    for (std::list<InputBufferListenerTuple>::iterator it = listeners_.begin(); it != listeners_.end(); ++it)
+    {
+      if (((*it).bListenToAllChanges_ || ((*it).char_ == update)) && (!(*it).bOnlySingleInput_ || bSingleInput))
+        (*(*it).listener_.*(*it).function_)();
+    }
+  }
+
+  bool InputBuffer::charIsAllowed(const char& input)
+  {
+    if (allowedChars_ == "")
+      return true;
+    else
+      return (allowedChars_.find(input) != std::string::npos);
+  }
+
+
+  void InputBuffer::processKey(const KeyEvent &evt)
+  {
+    if (evt.isModifierDown(KeyboardModifier::Ctrl))
+    {
+      if (evt.key == KeyCode::V)
+        append(fromClipboard());
+      else if (evt.key == KeyCode::C)
+        toClipboard(buffer_);
+      else if (evt.key == KeyCode::X)
+      {
+        toClipboard(buffer_);
+        clear();
+      }
+    }
+    else if (evt.isModifierDown(KeyboardModifier::Shift))
+    {
+      if (evt.key == KeyCode::Insert)
+      {
+        append(fromClipboard());
+      }
+      else if (evt.key == KeyCode::Delete)
+      {
+        toClipboard(buffer_);
+        clear();
+      }
+    }
+    //std::string input = keyboard_->getAsString(e.key);
+    /*if (input.size() >= 1)
+    append(input[0]);*/
+
+    append((char)evt.text);
+  }
+
+  void InputBuffer::tick(float dt)
+  {
+    timeSinceKeyPressed_ += dt;
+    if (keysToRepeat_ < 10 && timeSinceKeyPressed_ > keyRepeatDeleay_)
+    {
+      // initial time out has gone by, start repeating keys
+      while (timeSinceKeyPressed_ - timeSinceKeyRepeated_ > keyRepeatTime_)
+      {
+        timeSinceKeyRepeated_ += keyRepeatTime_;
+        keysToRepeat_++;
+      }
+    }
+  }
+
+  bool InputBuffer::keyPressed(const KeyEvent &evt)
+  {
+    lastKey_ = evt.key;
+    timeSinceKeyPressed_ = 0.0;
+    timeSinceKeyRepeated_ = keyRepeatDeleay_;
+    keysToRepeat_ = 0;
+
+    processKey(evt);
+    return true;
+  }
+
+  bool InputBuffer::keyHeld(const KeyEvent& evt)
+  {
+    if (evt.key == lastKey_)
+    {
+      while (keysToRepeat_)
+      {
+        processKey(evt);
+        keysToRepeat_--;
+      }
+    }
+    return true;
+  }
+
 }
Index: code/trunk/src/core/InputBuffer.h
===================================================================
--- code/trunk/src/core/InputBuffer.h	(revision 1224)
+++ code/trunk/src/core/InputBuffer.h	(revision 1293)
@@ -23,5 +23,5 @@
  *      Fabian 'x3n' Landau
  *   Co-authors:
- *      ...
+ *      Reto Grieder
  *
  */
@@ -35,89 +35,91 @@
 #include <list>
 
-#include "ois/OISKeyboard.h"
-#include "InputHandler.h"
+#include "InputInterfaces.h"
+#include "Tickable.h"
 
 namespace orxonox
 {
-    class _CoreExport InputBufferListener
-    {};
+  class _CoreExport InputBufferListener
+  {};
 
-    class _CoreExport InputBuffer : public KeyHandler
+  class _CoreExport InputBuffer : public KeyHandler, public TickableReal
+  {
+    struct InputBufferListenerTuple
     {
-        struct InputBufferListenerTuple
-        {
-            InputBufferListener* listener_;
-            void (InputBufferListener::*function_)();
-            bool bListenToAllChanges_;
-            bool bOnlySingleInput_;
-            char char_;
-        };
+      InputBufferListener* listener_;
+      void (InputBufferListener::*function_)();
+      bool bListenToAllChanges_;
+      bool bOnlySingleInput_;
+      char char_;
+    };
 
-        public:
-            InputBuffer();
-            InputBuffer(const std::string allowedChars);
+  public:
+    InputBuffer(const std::string allowedChars =
+      "abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZäöüÄÖÜ0123456789 \\\"(){}[]<>.:,;_-+*/=!?|$&%^");
 
-            template <class T>
-            void registerListener(T* listener, void (T::*function)(), bool bOnlySingleInput)
-            {
-                struct InputBufferListenerTuple newListener = {listener, (void (InputBufferListener::*)())function, true, bOnlySingleInput, ' '};
-                this->listeners_.insert(this->listeners_.end(), newListener);
-            }
-            template <class T>
-            void registerListener(T* listener, void (T::*function)() const, bool bOnlySingleInput)
-            {
-                struct InputBufferListenerTuple newListener = {listener, (void (InputBufferListener::*)())function, true, bOnlySingleInput, ' '};
-                this->listeners_.insert(this->listeners_.end(), newListener);
-            }
+    void setConfigValues();
 
-            template <class T>
-            void registerListener(T* listener, void (T::*function)(), char char_, bool bOnlySingleInput)
-            {
-                struct InputBufferListenerTuple newListener = {listener, (void (InputBufferListener::*)())function, false, bOnlySingleInput, char_};
-                this->listeners_.insert(this->listeners_.end(), newListener);
-            }
-            template <class T>
-            void registerListener(T* listener, void (T::*function)() const, char char_, bool bOnlySingleInput)
-            {
-                struct InputBufferListenerTuple newListener = {listener, (void (InputBufferListener::*)())function, false, bOnlySingleInput, char_};
-                this->listeners_.insert(this->listeners_.end(), newListener);
-            }
+    template <class T>
+    void registerListener(T* listener, void (T::*function)(), bool bOnlySingleInput)
+    {
+      struct InputBufferListenerTuple newListener = {listener, (void (InputBufferListener::*)())function, true, bOnlySingleInput, ' '};
+      this->listeners_.insert(this->listeners_.end(), newListener);
+    }
+    template <class T>
+    void registerListener(T* listener, void (T::*function)() const, bool bOnlySingleInput)
+    {
+      struct InputBufferListenerTuple newListener = {listener, (void (InputBufferListener::*)())function, true, bOnlySingleInput, ' '};
+      this->listeners_.insert(this->listeners_.end(), newListener);
+    }
 
-            void set(const std::string& input);
-            void append(const std::string& input);
-            void append(const char& input);
-            void removeLast();
-            void clear();
+    template <class T>
+    void registerListener(T* listener, void (T::*function)(), char char_, bool bOnlySingleInput)
+    {
+      struct InputBufferListenerTuple newListener = {listener, (void (InputBufferListener::*)())function, false, bOnlySingleInput, char_};
+      this->listeners_.insert(this->listeners_.end(), newListener);
+    }
+    template <class T>
+    void registerListener(T* listener, void (T::*function)() const, char char_, bool bOnlySingleInput)
+    {
+      struct InputBufferListenerTuple newListener = {listener, (void (InputBufferListener::*)())function, false, bOnlySingleInput, char_};
+      this->listeners_.insert(this->listeners_.end(), newListener);
+    }
 
-            void updated();
-            void updated(const char& update, bool bSingleInput);
+    void set(const std::string& input);
+    void append(const std::string& input);
+    void append(const char& input);
+    void removeLast();
+    void clear();
 
-            inline std::string get() const
-                { return this->buffer_; }
+    void updated();
+    void updated(const char& update, bool bSingleInput);
 
-            /*inline void activate()
-                { this->setActivated(true); }
-            inline void deactivate()
-                { this->setActivated(false); }
-            inline void setActivated(bool bActivated)
-                { if (this->bActivated_ != bActivated) { this->bActivated_ = bActivated; this->activityChanged(); } else { this->bActivated_ = bActivated; } }
-            inline bool isActivated() const
-                { return this->bActivated_; }
+    inline std::string get() const
+    { return this->buffer_; }
 
-            void activityChanged() const;*/
+  private:  // functions
+    bool charIsAllowed(const char& input);
 
-        private:
-            bool charIsAllowed(const char& input);
+    bool keyPressed (const KeyEvent& evt);
+    bool keyReleased(const KeyEvent& evt) { return true; }
+    bool keyHeld    (const KeyEvent& evt);
+    void processKey (const KeyEvent &e);
 
-            bool keyPressed(const OIS::KeyEvent &e);
-            bool keyReleased(const OIS::KeyEvent &e);
-            bool keyHeld(const OIS::KeyEvent &e) { return true; }
+    void tick(float dt);
 
-            OIS::Keyboard* keyboard_;
-            //bool bActivated_;
-            std::string buffer_;
-            std::list<InputBufferListenerTuple> listeners_;
-            std::string allowedChars_;
-    };
+  private: // variables
+    std::string buffer_;
+    std::list<InputBufferListenerTuple> listeners_;
+    std::string allowedChars_;
+
+    KeyCode::Enum lastKey_;
+    float timeSinceKeyPressed_;
+    float timeSinceKeyRepeated_;
+    int keysToRepeat_;
+
+    // configured values
+    float keyRepeatDeleay_;
+    float keyRepeatTime_;
+  };
 }
 
Index: code/trunk/src/core/InputHandler.cc
===================================================================
--- code/trunk/src/core/InputHandler.cc	(revision 1224)
+++ code/trunk/src/core/InputHandler.cc	(revision 1293)
@@ -33,9 +33,9 @@
 
 #include "InputHandler.h"
+#include "util/Convert.h"
 #include "Debug.h"
 #include "ConfigValueIncludes.h"
 #include "CoreIncludes.h"
-#include "util/Convert.h"
-#include "core/CommandExecutor.h"
+#include "CommandExecutor.h"
 
 namespace orxonox
@@ -55,173 +55,173 @@
     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",
+    "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",
+    "OEM_102",
+    "F11",
+    "F12",
     "","","","","","","","","","","",
-		"F13",
-		"F14",
-		"F15",
+    "F13",
+    "F14",
+    "F15",
     "","","","","","","","","","",
-		"KANA",
+    "KANA",
     "","",
-		"ABNT_C1",
+    "ABNT_C1",
     "","","","","",
-		"CONVERT",
-    "",
-		"NOCONVERT",
-    "",
-		"YEN",
-		"ABNT_C2",
+    "CONVERT",
+    "",
+    "NOCONVERT",
+    "",
+    "YEN",
+    "ABNT_C2",
     "","","","","","","","","","","","","","",
-		"NUMPADEQUALS",
+    "NUMPADEQUALS",
     "","",
-		"PREVTRACK",
-		"AT",
-		"COLON",
-		"UNDERLINE",
-		"KANJI",
-		"STOP",
-		"AX",
-		"UNLABELED",
-		"NEXTTRACK",
+    "PREVTRACK",
+    "AT",
+    "COLON",
+    "UNDERLINE",
+    "KANJI",
+    "STOP",
+    "AX",
+    "UNLABELED",
+    "NEXTTRACK",
     "","",
-		"NUMPADENTER",
-		"RCONTROL",
+    "NUMPADENTER",
+    "RCONTROL",
     "","",
-		"MUTE",
-		"CALCULATOR",
-		"PLAYPAUSE",
-    "",
-		"MEDIASTOP",
+    "MUTE",
+    "CALCULATOR",
+    "PLAYPAUSE",
+    "",
+    "MEDIASTOP",
     "","","","","","","","","",
-		"VOLUMEDOWN",
-    "",
-		"VOLUMEUP",
-    "",
-		"WEBHOME",
-		"NUMPADCOMMA",
-    "",
-		"DIVIDE",
-    "",
-		"SYSRQ",
-		"RMENU",
+    "VOLUMEDOWN",
+    "",
+    "VOLUMEUP",
+    "",
+    "WEBHOME",
+    "NUMPADCOMMA",
+    "",
+    "DIVIDE",
+    "",
+    "SYSRQ",
+    "RMENU",
     "","","","","","","","","","","","",
-		"PAUSE",
-    "",
-		"HOME",
-		"UP",
-		"PGUP",
-    "",
-		"LEFT",
-    "",
-		"RIGHT",
-    "",
-		"END",
-		"DOWN",
-		"PGDOWN",
-		"INSERT",
-		"DELETE",
+    "PAUSE",
+    "",
+    "HOME",
+    "UP",
+    "PGUP",
+    "",
+    "LEFT",
+    "",
+    "RIGHT",
+    "",
+    "END",
+    "DOWN",
+    "PGDOWN",
+    "INSERT",
+    "DELETE",
     "","","","","","","",
-		"LWIN",
-		"RWIN",
-		"APPS",
-		"POWER",
-		"SLEEP",
+    "LWIN",
+    "RWIN",
+    "APPS",
+    "POWER",
+    "SLEEP",
     "","","",
-		"WAKE",
-    "",
-		"WEBSEARCH",
-		"WEBFAVORITES",
-		"WEBREFRESH",
-		"WEBSTOP",
-		"WEBFORWARD",
-		"WEBBACK",
-		"MYCOMPUTER",
-		"MAIL",
-		"MEDIASELECT"
+    "WAKE",
+    "",
+    "WEBSEARCH",
+    "WEBFAVORITES",
+    "WEBREFRESH",
+    "WEBSTOP",
+    "WEBFORWARD",
+    "WEBBACK",
+    "MYCOMPUTER",
+    "MAIL",
+    "MEDIASELECT"
     };
     for (int i = 0; i < numberOfKeys_s; i++)
@@ -229,7 +229,7 @@
 
     std::string mouseButtonNames[] = {
-    "MouseLeft", "MouseRight", "MouseMiddle",
-    "MouseButton3", "MouseButton4", "MouseButton5",
-    "MouseButton6", "MouseButton7" };
+      "MouseLeft", "MouseRight", "MouseMiddle",
+      "MouseButton3", "MouseButton4", "MouseButton5",
+      "MouseButton6", "MouseButton7" };
     for (int i = 0; i < numberOfMouseButtons_s; i++)
       mouseButtonNames_[i] = mouseButtonNames[i];
@@ -267,14 +267,12 @@
         switch (j)
         {
-          // note: the first element in the struct is the string, so the following pointer
-          //       arithmetic works.
           case 0:
             cont->getValue(&bindingsKeyPress_[i].commandStr);
             break;
           case 1:
-            cont->getValue(bindingsKeyRelease_ + i);
+            cont->getValue(&bindingsKeyRelease_[i].commandStr);
             break;
           case 2:
-            cont->getValue(bindingsKeyHold_ + i);
+            cont->getValue(&bindingsKeyHold_[i].commandStr);
         }
       }
@@ -295,11 +293,11 @@
         {
           case 0:
-            cont->getValue(bindingsMouseButtonPress_ + i);
+            cont->getValue(&bindingsMouseButtonPress_[i].commandStr);
             break;
           case 1:
-            cont->getValue(bindingsMouseButtonRelease_ + i);
+            cont->getValue(&bindingsMouseButtonRelease_[i].commandStr);
             break;
           case 2:
-            cont->getValue(bindingsMouseButtonHold_ + i);
+            cont->getValue(&bindingsMouseButtonHold_[i].commandStr);
         }
       }
@@ -320,11 +318,11 @@
         {
           case 0:
-            cont->getValue(bindingsJoyStickButtonPress_ + i);
+            cont->getValue(&bindingsJoyStickButtonPress_[i].commandStr);
             break;
           case 1:
-            cont->getValue(bindingsJoyStickButtonRelease_ + i);
+            cont->getValue(&bindingsJoyStickButtonRelease_[i].commandStr);
             break;
           case 2:
-            cont->getValue(bindingsJoyStickButtonHold_ + i);
+            cont->getValue(&bindingsJoyStickButtonHold_[i].commandStr);
         }
       }
@@ -345,13 +343,13 @@
     for (int i = 0; i < numberOfMouseButtons_s; i++)
     {
-      bindingsMouseButtonPress_  [i] = "";
-      bindingsMouseButtonRelease_[i] = "";
-      bindingsMouseButtonHold_   [i] = "";
+      bindingsMouseButtonPress_  [i].commandStr = "";
+      bindingsMouseButtonRelease_[i].commandStr = "";
+      bindingsMouseButtonHold_   [i].commandStr = "";
     }
     for (int i = 0; i < numberOfJoyStickButtons_s; i++)
     {
-      bindingsJoyStickButtonPress_  [i] = "";
-      bindingsJoyStickButtonRelease_[i] = "";
-      bindingsJoyStickButtonHold_   [i] = "";
+      bindingsJoyStickButtonPress_  [i].commandStr = "";
+      bindingsJoyStickButtonRelease_[i].commandStr = "";
+      bindingsJoyStickButtonHold_   [i].commandStr = "";
     }
   }
@@ -370,12 +368,12 @@
     // evaluate the key bindings
     // TODO: what if binding is invalid?
-    //for (int i = 0; i < numberOfKeys_s; i++)
-    //{
-    //  if (bindingsKeyPress_[i].commandStr != "")
-    //  {
-    //    bindingsKeyPress_[i].evaluation = CommandExecutor::evaluate(bindingsKeyPress_[i].commandStr);
-    //    bindingsKeyPress_[i].commandStr = bindingsKeyPress_[i].evaluation.getCommandString();
-    //  }
-    //}
+    for (int i = 0; i < numberOfKeys_s; i++)
+    {
+      if (bindingsKeyPress_[i].commandStr != "")
+      {
+        bindingsKeyPress_[i].evaluation = CommandExecutor::evaluate(bindingsKeyPress_[i].commandStr);
+        bindingsKeyPress_[i].commandStr = bindingsKeyPress_[i].evaluation.getCommandString();
+      }
+    }
 
     COUT(ORX_DEBUG) << "KeyBinder: Loading key bindings done." << std::endl;
@@ -383,15 +381,15 @@
   }
 
-  bool KeyBinder::executeBinding(KeyBinding& binding)
+  bool KeyBinder::executeSimpleBinding(KeyBinding& binding)
   {
     if (binding.commandStr != "")
     {
-      //if (binding.commandStr != binding.evaluation.getCommandString())
-      //{
-      //  // key binding has changed, reevaluate the command string.
-      //  binding.evaluation = CommandExecutor::evaluate(binding.commandStr);
-      //  binding.commandStr = binding.evaluation.getCommandString();
-      //}
-      COUT(3) << "Executing command: " << binding.commandStr << std::endl;
+      if (binding.commandStr != binding.evaluation.getCommandString())
+      {
+        // key binding has changed, reevaluate the command string.
+        binding.evaluation = CommandExecutor::evaluate(binding.commandStr);
+        binding.commandStr = binding.evaluation.getCommandString();
+      }
+      COUT(ORX_DEBUG) << "Keybinding: Executing command: " << binding.commandStr << std::endl;
       CommandExecutor::execute(binding.commandStr);
     }
@@ -405,10 +403,9 @@
     @param e Event information
   */
-  bool KeyBinder::keyPressed(const OIS::KeyEvent &e)
-  {
-    COUT(3) << "Key: " << e.key << std::endl;
-    // find the appropriate key binding
-    executeBinding(bindingsKeyPress_[int(e.key)]);
-     
+  bool KeyBinder::keyPressed(const KeyEvent& evt)
+  {
+    // find the appropriate key binding
+    executeSimpleBinding(bindingsKeyPress_[int(evt.key)]);
+
     return true;
   }
@@ -418,8 +415,8 @@
     @param e Event information
   */
-  bool KeyBinder::keyReleased(const OIS::KeyEvent &e)
-  {
-    // find the appropriate key binding
-    executeBinding(bindingsKeyRelease_[int(e.key)]);
+  bool KeyBinder::keyReleased(const KeyEvent& evt)
+  {
+    // find the appropriate key binding
+    executeSimpleBinding(bindingsKeyRelease_[int(evt.key)]);
 
     return true;
@@ -428,10 +425,10 @@
   /**
     @brief Event handler for the keyHeld Event.
-    @param e Event information
-  */
-  bool KeyBinder::keyHeld(const OIS::KeyEvent &e)
-  {
-    // find the appropriate key binding
-    executeBinding(bindingsKeyHold_[int(e.key)]);
+    @param e Mouse state information
+  */
+  bool KeyBinder::keyHeld(const KeyEvent& evt)
+  {
+    // find the appropriate key binding
+    executeSimpleBinding(bindingsKeyHold_[int(evt.key)]);
 
     return true;
@@ -440,7 +437,30 @@
   /**
     @brief Event handler for the mouseMoved Event.
-    @param e Event information
-  */
-  bool KeyBinder::mouseMoved(const OIS::MouseEvent &e)
+    @param e Mouse state information
+  */
+  bool KeyBinder::mouseMoved(const MouseState &evt)
+  {
+    /*if (bindingMouseMoved_.commandStr != "")
+    {
+      if (bindingMouseMoved_.commandStr != bindingMouseMoved_.evaluation.getCommandString())
+      {
+        // key binding has changed, reevaluate the command string.
+        bindingMouseMoved_.evaluation = CommandExecutor::evaluate(bindingMouseMoved_.commandStr);
+        bindingMouseMoved_.commandStr = bindingMouseMoved_.evaluation.getCommandString();
+      }
+      COUT(3) << "Executing command: " << bindingMouseMoved_.commandStr << std::endl;
+
+      bindingMouseMoved_.evaluation.setEvaluatedParameter(
+      CommandExecutor::execute(bindingMouseMoved_.commandStr);
+    }*/
+
+    return true;
+  }
+
+  /**
+    @brief Event handler for the mouseScrolled Event.
+    @param e Mouse state information
+  */
+  bool KeyBinder::mouseScrolled(const MouseState &evt)
   {
     return true;
@@ -452,13 +472,8 @@
     @param id The ID of the mouse button
   */
-  bool KeyBinder::mousePressed(const OIS::MouseEvent &e, OIS::MouseButtonID id)
-  {
-    // find the appropriate key binding
-    std::string cmdStr = bindingsMouseButtonPress_[int(id)];
-    if (cmdStr != "")
-    {
-      CommandExecutor::execute(cmdStr);
-      COUT(3) << "Executing command: " << cmdStr << std::endl;
-    }
+  bool KeyBinder::mouseButtonPressed(const MouseState& state, MouseButton::Enum id)
+  {
+    // find the appropriate key binding
+    executeSimpleBinding(bindingsMouseButtonPress_[int(id)]);
 
     return true;
@@ -470,13 +485,8 @@
     @param id The ID of the mouse button
   */
-  bool KeyBinder::mouseReleased(const OIS::MouseEvent &e, OIS::MouseButtonID id)
-  {
-    // find the appropriate key binding
-    std::string cmdStr = bindingsMouseButtonRelease_[int(id)];
-    if (cmdStr != "")
-    {
-      CommandExecutor::execute(cmdStr);
-      COUT(3) << "Executing command: " << cmdStr << std::endl;
-    }
+  bool KeyBinder::mouseButtonReleased(const MouseState& state, MouseButton::Enum id)
+  {
+    // find the appropriate key binding
+    executeSimpleBinding(bindingsMouseButtonRelease_[int(id)]);
 
     return true;
@@ -488,72 +498,52 @@
     @param id The ID of the mouse button
   */
-  bool KeyBinder::mouseHeld(const OIS::MouseEvent &e, OIS::MouseButtonID id)
-  {
-    // find the appropriate key binding
-    std::string cmdStr = bindingsMouseButtonHold_[int(id)];
-    if (cmdStr != "")
-    {
-      CommandExecutor::execute(cmdStr);
-      COUT(3) << "Executing command: " << cmdStr << std::endl;
-    }
-
-    return true;
-  }
-
-  bool KeyBinder::buttonPressed(int joyStickID, const OIS::JoyStickEvent &arg, int button)
-  {
-    // find the appropriate key binding
-    std::string cmdStr = bindingsJoyStickButtonPress_[button];
-    if (cmdStr != "")
-    {
-      CommandExecutor::execute(cmdStr);
-      COUT(3) << "Executing command: " << cmdStr << std::endl;
-    }
-
-    return true;
-  }
-
-  bool KeyBinder::buttonReleased(int joyStickID, const OIS::JoyStickEvent &arg, int button)
-  {
-    // find the appropriate key binding
-    std::string cmdStr = bindingsJoyStickButtonRelease_[button];
-    if (cmdStr != "")
-    {
-      CommandExecutor::execute(cmdStr);
-      COUT(3) << "Executing command: " << cmdStr << std::endl;
-    }
-
-    return true;
-  }
-
-  bool KeyBinder::buttonHeld(int joyStickID, const OIS::JoyStickEvent &arg, int button)
-  {
-    // find the appropriate key binding
-    std::string cmdStr = bindingsJoyStickButtonHold_[button];
-    if (cmdStr != "")
-    {
-      CommandExecutor::execute(cmdStr);
-      COUT(3) << "Executing command: " << cmdStr << std::endl;
-    }
-
-    return true;
-  }
-
-  bool KeyBinder::axisMoved(int joyStickID, const OIS::JoyStickEvent &arg, int axis)
-  {
-    return true;
-  }
-
-  bool KeyBinder::sliderMoved(int joyStickID, const OIS::JoyStickEvent &arg, int id)
-  {
-    return true;
-  }
-
-  bool KeyBinder::povMoved(int joyStickID, const OIS::JoyStickEvent &arg, int id)
-  {
-    return true;
-  }
-
-  bool KeyBinder::vector3Moved(int joyStickID, const OIS::JoyStickEvent &arg, int id)
+  bool KeyBinder::mouseButtonHeld(const MouseState& state, MouseButton::Enum id)
+  {
+    // find the appropriate key binding
+    executeSimpleBinding(bindingsMouseButtonHold_[int(id)]);
+
+    return true;
+  }
+
+  bool KeyBinder::joyStickButtonPressed(const JoyStickState& state, int button)
+  {
+    // find the appropriate key binding
+    executeSimpleBinding(bindingsJoyStickButtonPress_[button]);
+
+    return true;
+  }
+
+  bool KeyBinder::joyStickButtonReleased(const JoyStickState& state, int button)
+  {
+    // find the appropriate key binding
+    executeSimpleBinding(bindingsJoyStickButtonRelease_[button]);
+
+    return true;
+  }
+
+  bool KeyBinder::joyStickButtonHeld(const JoyStickState& state, int button)
+  {
+    // find the appropriate key binding
+    executeSimpleBinding(bindingsJoyStickButtonHold_[button]);
+
+    return true;
+  }
+
+  bool KeyBinder::joyStickAxisMoved(const JoyStickState& state, int axis)
+  {
+    return true;
+  }
+
+  bool KeyBinder::joyStickSliderMoved(const JoyStickState& state, int index)
+  {
+    return true;
+  }
+
+  bool KeyBinder::joyStickPovMoved(const JoyStickState& state, int index)
+  {
+    return true;
+  }
+
+  bool KeyBinder::joyStickVector3Moved(const JoyStickState& state, int index)
   {
     return true;
@@ -586,6 +576,6 @@
   //bool GUIInputHandler::keyPressed(const OIS::KeyEvent &e)
   //{
-		////CEGUI::System::getSingleton().injectKeyDown( arg.key );
-		////CEGUI::System::getSingleton().injectChar( arg.text );
+    ////CEGUI::System::getSingleton().injectKeyDown( arg.key );
+    ////CEGUI::System::getSingleton().injectChar( arg.text );
   //  return true;
   //}
@@ -597,5 +587,5 @@
   //bool GUIInputHandler::keyReleased(const OIS::KeyEvent &e)
   //{
-		////CEGUI::System::getSingleton().injectKeyUp( arg.key );
+    ////CEGUI::System::getSingleton().injectKeyUp( arg.key );
   //  return true;
   //}
@@ -607,5 +597,5 @@
   //bool GUIInputHandler::mouseMoved(const OIS::MouseEvent &e)
   //{
-		////CEGUI::System::getSingleton().injectMouseMove( arg.state.X.rel, arg.state.Y.rel );
+    ////CEGUI::System::getSingleton().injectMouseMove( arg.state.X.rel, arg.state.Y.rel );
   //  return true;
   //}
@@ -616,7 +606,7 @@
   //  @param id The ID of the mouse button
   //*/
-  //bool GUIInputHandler::mousePressed(const OIS::MouseEvent &e, OIS::MouseButtonID id)
+  //bool GUIInputHandler::mousePressed(const OIS::MouseEvent &e, OIS::MouseButton id)
   //{
-		////CEGUI::System::getSingleton().injectMouseButtonDown(convertOISMouseButtonToCegui(id));
+    ////CEGUI::System::getSingleton().injectMouseButtonDown(convertOISMouseButtonToCegui(id));
   //  return true;
   //}
@@ -627,7 +617,7 @@
   //  @param id The ID of the mouse button
   //*/
-  //bool GUIInputHandler::mouseReleased(const OIS::MouseEvent &e, OIS::MouseButtonID id)
+  //bool GUIInputHandler::mouseReleased(const OIS::MouseEvent &e, OIS::MouseButton id)
   //{
-		////CEGUI::System::getSingleton().injectMouseButtonUp(convertOISMouseButtonToCegui(id));
+    ////CEGUI::System::getSingleton().injectMouseButtonUp(convertOISMouseButtonToCegui(id));
   //  return true;
   //}
Index: code/trunk/src/core/InputHandler.h
===================================================================
--- code/trunk/src/core/InputHandler.h	(revision 1224)
+++ code/trunk/src/core/InputHandler.h	(revision 1293)
@@ -38,7 +38,9 @@
 
 #include <string>
+
 #include "ois/OIS.h"
 #include "OrxonoxClass.h"
 #include "CommandExecutor.h"
+#include "InputInterfaces.h"
 
 namespace orxonox
@@ -54,40 +56,4 @@
     };
   }
-
-  /**
-    @brief Interface class used for key input listeners.
-  */
-  class _CoreExport KeyHandler : public OIS::KeyListener
-  {
-  public:
-    virtual ~KeyHandler() { }
-    virtual bool keyHeld(const OIS::KeyEvent &arg) = 0;
-  };
-
-  /**
-    @brief Interface class used for mouse input listeners.
-  */
-  class _CoreExport MouseHandler : public OIS::MouseListener
-  {
-  public:
-    virtual ~MouseHandler() { }
-    virtual bool mouseHeld(const OIS::MouseEvent &arg, OIS::MouseButtonID id) = 0;
-  };
-
-  /**
-    @brief Interface class used for joy stick input listeners.
-  */
-  class _CoreExport JoyStickHandler
-  {
-  public:
-    virtual ~JoyStickHandler() { }
-		virtual bool buttonPressed (int joyStickID, const OIS::JoyStickEvent &arg, int button) = 0;
-		virtual bool buttonReleased(int joyStickID, const OIS::JoyStickEvent &arg, int button) = 0;
-    virtual bool buttonHeld    (int joyStickID, const OIS::JoyStickEvent &arg, int button) = 0;
-		virtual bool axisMoved     (int joyStickID, const OIS::JoyStickEvent &arg, int axis)   = 0;
-		virtual bool sliderMoved   (int joyStickID, const OIS::JoyStickEvent &arg, int index) {return true;}
-		virtual bool povMoved      (int joyStickID, const OIS::JoyStickEvent &arg, int index) {return true;}
-		virtual bool vector3Moved  (int joyStickID, const OIS::JoyStickEvent &arg, int index) {return true;}
-  };
 
   struct _CoreExport KeyBinding
@@ -113,26 +79,25 @@
     void setConfigValues();
 
-    std::string testtest;
-
   private: // functions
 
-    bool executeBinding(KeyBinding &binding);
+    bool executeSimpleBinding(KeyBinding &binding);
 
-		bool keyPressed   (const OIS::KeyEvent   &arg);
-		bool keyReleased  (const OIS::KeyEvent   &arg);
-		bool keyHeld      (const OIS::KeyEvent   &arg);
+    bool keyPressed (const KeyEvent& evt);
+    bool keyReleased(const KeyEvent& evt);
+    bool keyHeld    (const KeyEvent& evt);
 
-    bool mousePressed (const OIS::MouseEvent &arg, OIS::MouseButtonID id);
-		bool mouseReleased(const OIS::MouseEvent &arg, OIS::MouseButtonID id);
-		bool mouseHeld    (const OIS::MouseEvent &arg, OIS::MouseButtonID id);
-    bool mouseMoved   (const OIS::MouseEvent &arg);
+    bool mouseButtonPressed (const MouseState& state, MouseButton::Enum id);
+    bool mouseButtonReleased(const MouseState& state, MouseButton::Enum id);
+    bool mouseButtonHeld    (const MouseState& state, MouseButton::Enum id);
+    bool mouseMoved         (const MouseState& state);
+    bool mouseScrolled      (const MouseState& state);
 
-		bool buttonPressed (int joyStickID, const OIS::JoyStickEvent &arg, int button);
-		bool buttonReleased(int joyStickID, const OIS::JoyStickEvent &arg, int button);
-		bool buttonHeld    (int joyStickID, const OIS::JoyStickEvent &arg, int button);
-		bool axisMoved     (int joyStickID, const OIS::JoyStickEvent &arg, int axis);
-		bool sliderMoved   (int joyStickID, const OIS::JoyStickEvent &arg, int id);
-		bool povMoved      (int joyStickID, const OIS::JoyStickEvent &arg, int id);
-		bool vector3Moved  (int joyStickID, const OIS::JoyStickEvent &arg, int id);
+    bool joyStickButtonPressed (const JoyStickState& state, int button);
+    bool joyStickButtonReleased(const JoyStickState& state, int button);
+    bool joyStickButtonHeld    (const JoyStickState& state, int button);
+    bool joyStickAxisMoved     (const JoyStickState& state, int axis)  ;
+    bool joyStickSliderMoved   (const JoyStickState& state, int index) ;
+    bool joyStickPovMoved      (const JoyStickState& state, int index) ;
+    bool joyStickVector3Moved  (const JoyStickState& state, int index) ;
 
   private: // variables
@@ -152,9 +117,13 @@
     static const int numberOfMouseButtons_s = 8;
     //! Array of input events for every pressed mouse button
-    std::string bindingsMouseButtonPress_  [numberOfMouseButtons_s];
+    KeyBinding bindingsMouseButtonPress_  [numberOfMouseButtons_s];
     //! Array of input events for every released mouse button
-    std::string bindingsMouseButtonRelease_[numberOfMouseButtons_s];
+    KeyBinding bindingsMouseButtonRelease_[numberOfMouseButtons_s];
     //! Array of input events for every held mouse button
-    std::string bindingsMouseButtonHold_   [numberOfMouseButtons_s];
+    KeyBinding bindingsMouseButtonHold_   [numberOfMouseButtons_s];
+    //! Key binding for mouse moved event
+    KeyBinding bindingMouseMoved_;
+    //! Key binding for mouse scrolled event
+    KeyBinding bindingMouseScrolled_;
     //! Names of the mouse buttons as strings
     std::string mouseButtonNames_[numberOfMouseButtons_s];
@@ -163,9 +132,9 @@
     static const int numberOfJoyStickButtons_s = 32;
     //! Array of input events for every pressed joy stick button
-    std::string bindingsJoyStickButtonPress_  [numberOfJoyStickButtons_s];
+    KeyBinding bindingsJoyStickButtonPress_  [numberOfJoyStickButtons_s];
     //! Array of input events for every released joy stick button
-    std::string bindingsJoyStickButtonRelease_[numberOfJoyStickButtons_s];
+    KeyBinding bindingsJoyStickButtonRelease_[numberOfJoyStickButtons_s];
     //! Array of input events for every held joy stick button
-    std::string bindingsJoyStickButtonHold_   [numberOfJoyStickButtons_s];
+    KeyBinding bindingsJoyStickButtonHold_   [numberOfJoyStickButtons_s];
     //! Names of the joy stick buttons as strings
     std::string joyStickButtonNames_[numberOfJoyStickButtons_s];
@@ -186,19 +155,19 @@
   //private:
   //  // input events
-		//bool keyPressed   (const OIS::KeyEvent   &arg);
-		//bool keyReleased  (const OIS::KeyEvent   &arg);
-		//bool keyHeld      (const OIS::KeyEvent   &arg);
+    //bool keyPressed   (const OIS::KeyEvent   &arg);
+    //bool keyReleased  (const OIS::KeyEvent   &arg);
+    //bool keyHeld      (const OIS::KeyEvent   &arg);
 
-  //  bool mousePressed (const OIS::MouseEvent &arg, OIS::MouseButtonID id);
-		//bool mouseReleased(const OIS::MouseEvent &arg, OIS::MouseButtonID id);
-		//bool mouseHeld    (const OIS::MouseEvent &arg, OIS::MouseButtonID id);
+  //  bool mousePressed (const OIS::MouseEvent &arg, OIS::MouseButton id);
+    //bool mouseReleased(const OIS::MouseEvent &arg, OIS::MouseButton id);
+    //bool mouseHeld    (const OIS::MouseEvent &arg, OIS::MouseButton id);
   //  bool mouseMoved   (const OIS::MouseEvent &arg);
 
-		//bool buttonPressed (const OIS::JoyStickEvent &arg, int button);
-		//bool buttonReleased(const OIS::JoyStickEvent &arg, int button);
-		//bool buttonHeld    (const OIS::JoyStickEvent &arg, int button);
-		//bool axisMoved     (const OIS::JoyStickEvent &arg, int axis);
-		//bool sliderMoved   (const OIS::JoyStickEvent &arg, int id);
-		//bool povMoved      (const OIS::JoyStickEvent &arg, int id);
+    //bool buttonPressed (const OIS::JoyStickEvent &arg, int button);
+    //bool buttonReleased(const OIS::JoyStickEvent &arg, int button);
+    //bool buttonHeld    (const OIS::JoyStickEvent &arg, int button);
+    //bool axisMoved     (const OIS::JoyStickEvent &arg, int axis);
+    //bool sliderMoved   (const OIS::JoyStickEvent &arg, int id);
+    //bool povMoved      (const OIS::JoyStickEvent &arg, int id);
   //};
 
Index: code/trunk/src/core/InputInterfaces.h
===================================================================
--- code/trunk/src/core/InputInterfaces.h	(revision 1293)
+++ code/trunk/src/core/InputInterfaces.h	(revision 1293)
@@ -0,0 +1,296 @@
+/*
+ *   ORXONOX - the hottest 3D action shooter ever to exist
+ *                    > www.orxonox.net <
+ *
+ *
+ *   License notice:
+ *
+ *   This program is free software; you can redistribute it and/or
+ *   modify it under the terms of the GNU General Public License
+ *   as published by the Free Software Foundation; either version 2
+ *   of the License, or (at your option) any later version.
+ *
+ *   This program is distributed in the hope that it will be useful,
+ *   but WITHOUT ANY WARRANTY; without even the implied warranty of
+ *   MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+ *   GNU General Public License for more details.
+ *
+ *   You should have received a copy of the GNU General Public License
+ *   along with this program; if not, write to the Free Software
+ *   Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA  02110-1301, USA.
+ *
+ *   Author:
+ *      Reto Grieder
+ *   Co-authors:
+ *      ...
+ *
+ */
+
+/**
+ @file
+ @brief Declarations of various interface classes for the input management.
+*/
+
+#ifndef _InputInterfaces_H__
+#define _InputInterfaces_H__
+
+#include "CorePrereqs.h"
+
+#include "ois/OIS.h"
+
+namespace orxonox
+{
+  namespace KeyCode
+  {
+    // note: KeyCode comments were directly taken from OISKeyboard.h
+    enum Enum
+    {
+      Unassigned    = OIS::KC_UNASSIGNED,  
+      Escape        = OIS::KC_ESCAPE,      
+      NumRow1       = OIS::KC_1,           
+      NumRow2       = OIS::KC_2,           
+      NumRow3       = OIS::KC_3,           
+      NumRow4       = OIS::KC_4,           
+      NumRow5       = OIS::KC_5,           
+      NumRow6       = OIS::KC_6,           
+      NumRow7       = OIS::KC_7,           
+      NumRow8       = OIS::KC_8,           
+      NumRow9       = OIS::KC_9,           
+      NumRow0       = OIS::KC_0,           
+      Minus         = OIS::KC_MINUS,           // - on main keyboard
+      Equals        = OIS::KC_EQUALS,      
+      Back          = OIS::KC_BACK,            // backspace
+      Tab           = OIS::KC_TAB,         
+      Q             = OIS::KC_Q,           
+      W             = OIS::KC_W,           
+      E             = OIS::KC_E,           
+      R             = OIS::KC_R,           
+      T             = OIS::KC_T,           
+      Y             = OIS::KC_Y,           
+      U             = OIS::KC_U,           
+      I             = OIS::KC_I,           
+      O             = OIS::KC_O,           
+      P             = OIS::KC_P,           
+      LeftBracket   = OIS::KC_LBRACKET,    
+      RightBracket  = OIS::KC_RBRACKET,    
+      Return        = OIS::KC_RETURN,          // Enter on main keyboard
+      LeftControl   = OIS::KC_LCONTROL,    
+      A             = OIS::KC_A,           
+      S             = OIS::KC_S,           
+      D             = OIS::KC_D,           
+      F             = OIS::KC_F,           
+      G             = OIS::KC_G,           
+      H             = OIS::KC_H,           
+      J             = OIS::KC_J,           
+      K             = OIS::KC_K,           
+      L             = OIS::KC_L,           
+      Semicolon     = OIS::KC_SEMICOLON,   
+      Apostrophe    = OIS::KC_APOSTROPHE,  
+      Grave         = OIS::KC_GRAVE,           // accent
+      LeftShift     = OIS::KC_LSHIFT,      
+      Backslash     = OIS::KC_BACKSLASH,   
+      Z             = OIS::KC_Z,           
+      X             = OIS::KC_X,           
+      C             = OIS::KC_C,           
+      V             = OIS::KC_V,           
+      B             = OIS::KC_B,           
+      N             = OIS::KC_N,           
+      M             = OIS::KC_M,           
+      Comma         = OIS::KC_COMMA,       
+      Period        = OIS::KC_PERIOD,          // . on main keyboard
+      Slash         = OIS::KC_SLASH,           // / on main keyboard
+      RightShift    = OIS::KC_RSHIFT,      
+      Multiply      = OIS::KC_MULTIPLY,        // * on numeric keypad
+      LeftAlt       = OIS::KC_LMENU,           // left Alt
+      Space         = OIS::KC_SPACE,       
+      CapsLock      = OIS::KC_CAPITAL,     
+      F1            = OIS::KC_F1,          
+      F2            = OIS::KC_F2,          
+      F3            = OIS::KC_F3,          
+      F4            = OIS::KC_F4,          
+      F5            = OIS::KC_F5,          
+      F6            = OIS::KC_F6,          
+      F7            = OIS::KC_F7,          
+      F8            = OIS::KC_F8,          
+      F9            = OIS::KC_F9,          
+      F10           = OIS::KC_F10,         
+      Numlock       = OIS::KC_NUMLOCK,     
+      Scrolllock    = OIS::KC_SCROLL,          // Scroll Lock
+      Numpad7       = OIS::KC_NUMPAD7,     
+      Numpad8       = OIS::KC_NUMPAD8,     
+      Numpad9       = OIS::KC_NUMPAD9,     
+      NumpadSubtract= OIS::KC_SUBTRACT,        // - on numeric keypad
+      Numpad4       = OIS::KC_NUMPAD4,     
+      Numpad5       = OIS::KC_NUMPAD5,     
+      Numpad6       = OIS::KC_NUMPAD6,     
+      NumpadAdd     = OIS::KC_ADD,             // + on numeric keypad
+      Numpad1       = OIS::KC_NUMPAD1,     
+      Numpad2       = OIS::KC_NUMPAD2,     
+      Numpad3       = OIS::KC_NUMPAD3,     
+      Numpad0       = OIS::KC_NUMPAD0,     
+      NumpadPeriod  = OIS::KC_DECIMAL,         // . on numeric keypad
+      LessThan      = OIS::KC_OEM_102,         // < > | on UK/Germany keyboards
+      F11           = OIS::KC_F11,         
+      F12           = OIS::KC_F12,         
+      F13           = OIS::KC_F13,             //                     (NEC PC98)
+      F14           = OIS::KC_F14,             //                     (NEC PC98)
+      F15           = OIS::KC_F15,             //                     (NEC PC98)
+      Kana          = OIS::KC_KANA,            // (Japanese keyboard)
+      ABNT_C1       = OIS::KC_ABNT_C1,         // / ? on Portugese (Brazilian) keyboards
+      Convert       = OIS::KC_CONVERT,         // (Japanese keyboard)
+      NoConvert     = OIS::KC_NOCONVERT,       // (Japanese keyboard)
+      Yen           = OIS::KC_YEN,             // (Japanese keyboard)
+      ABNT_C2       = OIS::KC_ABNT_C2,         // Numpad . on Portugese (Brazilian) keyboards
+      NumpadEquals  = OIS::KC_NUMPADEQUALS,    // = on numeric keypad (NEC PC98)
+      PreviousTrack = OIS::KC_PREVTRACK,       // Previous Track (KC_CIRCUMFLEX on Japanese keyboard)
+      AT            = OIS::KC_AT,              //                     (NEC PC98)
+      Colon         = OIS::KC_COLON,           //                     (NEC PC98)
+      Underline     = OIS::KC_UNDERLINE,       //                     (NEC PC98)
+      Kanji         = OIS::KC_KANJI,           // (Japanese keyboard)
+      Stop          = OIS::KC_STOP,            //                     (NEC PC98)
+      AX            = OIS::KC_AX,              //                     (Japan AX)
+      Unlabeled     = OIS::KC_UNLABELED,       //                        (J3100)
+      NextTrack     = OIS::KC_NEXTTRACK,       // Next Track
+      NumpadEnter   = OIS::KC_NUMPADENTER,     // Enter on numeric keypad
+      RightControl  = OIS::KC_RCONTROL,    
+      Mute          = OIS::KC_MUTE,            // Mute
+      Calculator    = OIS::KC_CALCULATOR,      // Calculator
+      PlayPause     = OIS::KC_PLAYPAUSE,       // Play / Pause
+      MediaStop     = OIS::KC_MEDIASTOP,       // Media Stop
+      VolumeDown    = OIS::KC_VOLUMEDOWN,      // Volume -
+      VolumeUp      = OIS::KC_VOLUMEUP,        // Volume +
+      WebHome       = OIS::KC_WEBHOME,         // Web home
+      NumpadComma   = OIS::KC_NUMPADCOMMA,     // , on numeric keypad (NEC PC98)
+      Divide        = OIS::KC_DIVIDE,          // / on numeric keypad
+      SYSRQ         = OIS::KC_SYSRQ,       
+      RightAlt      = OIS::KC_RMENU,           // right Alt
+      Pause         = OIS::KC_PAUSE,           // Pause
+      Home          = OIS::KC_HOME,            // Home on arrow keypad
+      Up            = OIS::KC_UP,              // UpArrow on arrow keypad
+      PageUp        = OIS::KC_PGUP,            // PgUp on arrow keypad
+      Left          = OIS::KC_LEFT,            // LeftArrow on arrow keypad
+      Right         = OIS::KC_RIGHT,           // RightArrow on arrow keypad
+      End           = OIS::KC_END,             // End on arrow keypad
+      Down          = OIS::KC_DOWN,            // DownArrow on arrow keypad
+      PageDown      = OIS::KC_PGDOWN,          // PgDn on arrow keypad
+      Insert        = OIS::KC_INSERT,          // Insert on arrow keypad
+      Delete        = OIS::KC_DELETE,          // Delete on arrow keypad
+      LeftWindows   = OIS::KC_LWIN,            // Left Windows key
+      RightWindows  = OIS::KC_RWIN,            // Right Windows key
+      Apps          = OIS::KC_APPS,            // AppMenu key
+      Power         = OIS::KC_POWER,           // System Power
+      Sleep         = OIS::KC_SLEEP,           // System Sleep
+      Wake          = OIS::KC_WAKE,            // System Wake
+      WebSearch     = OIS::KC_WEBSEARCH,       // Web Search
+      WebFavorites  = OIS::KC_WEBFAVORITES,    // Web Favorites
+      WebRefresh    = OIS::KC_WEBREFRESH,      // Web Refresh
+      WebStop       = OIS::KC_WEBSTOP,         // Web Stop
+      WebForward    = OIS::KC_WEBFORWARD,      // Web Forward
+      WebBack       = OIS::KC_WEBBACK,         // Web Back
+      MyComputer    = OIS::KC_MYCOMPUTER,      // My Computer
+      Mail          = OIS::KC_MAIL,            // Mail
+      MediaSelect   = OIS::KC_MEDIASELECT      // Media Select
+    };
+  }
+
+  namespace MouseButton
+  {
+    enum Enum
+    {
+      Left    = OIS::MB_Left,
+      Right   = OIS::MB_Right,
+      Middle  = OIS::MB_Middle,
+      Button3 = OIS::MB_Button3,
+      Button4 = OIS::MB_Button4,
+      Button5 = OIS::MB_Button5,
+      Button6 = OIS::MB_Button6,
+      Button7 = OIS::MB_Button7
+    };
+  }
+
+  namespace KeyboardModifier
+  {
+    enum Enum
+    {
+      Shift = 0x0000001,
+      Ctrl  = 0x0000010,
+      Alt   = 0x0000100
+    };
+  }
+
+  struct _CoreExport Key
+  {
+    Key(const OIS::KeyEvent& evt) : key((KeyCode::Enum)evt.key), text(evt.text) { }
+    KeyCode::Enum key;
+    unsigned int text;
+  };
+
+  class _CoreExport KeyEvent
+  {
+  public:
+    KeyEvent(KeyCode::Enum key, unsigned int text) : key(key), text(text) { }
+    KeyEvent(const OIS::KeyEvent& evt, unsigned int mod) : key((KeyCode::Enum)evt.key), text(evt.text), modifiers(mod) { }
+    KeyEvent(const Key& key, unsigned int mod) : key(key.key), text(key.text), modifiers(mod) { }
+    bool isModifierDown(KeyboardModifier::Enum modifier) const { return (KeyboardModifier::Enum)modifier&modifiers; }
+
+    const KeyCode::Enum key;
+    unsigned int text;
+    unsigned int modifiers;
+  };
+
+  typedef OIS::MouseState MouseState;
+
+  class _CoreExport JoyStickState : OIS::JoyStickState
+  {
+  public:
+    JoyStickState(const OIS::JoyStickState& state, int ID) : OIS::JoyStickState(state), mJoyStickID(ID) { }
+    JoyStickState() { clear(); }
+    int mJoyStickID;
+  };
+
+  /**
+    @brief Interface class used for key input listeners.
+  */
+  class _CoreExport KeyHandler
+  {
+  public:
+    virtual ~KeyHandler() { }
+    virtual bool keyPressed (const KeyEvent& evt) = 0;
+    virtual bool keyReleased(const KeyEvent& evt) = 0;
+    virtual bool keyHeld    (const KeyEvent& evt) = 0;
+  };
+
+  /**
+    @brief Interface class used for mouse input listeners.
+  */
+  class _CoreExport MouseHandler 
+  {
+  public:
+    virtual ~MouseHandler() { }
+    virtual bool mouseButtonPressed (const MouseState& state, MouseButton::Enum id) = 0;
+    virtual bool mouseButtonReleased(const MouseState& state, MouseButton::Enum id) = 0;
+    virtual bool mouseButtonHeld    (const MouseState& state, MouseButton::Enum id) = 0;
+    virtual bool mouseMoved         (const MouseState& state) = 0;
+    virtual bool mouseScrolled      (const MouseState& state) = 0;
+  };
+
+
+  /**
+    @brief Interface class used for joy stick input listeners.
+  */
+  class _CoreExport JoyStickHandler
+  {
+  public:
+    virtual ~JoyStickHandler() { }
+    virtual bool joyStickButtonPressed (const JoyStickState& state, int button) = 0;
+    virtual bool joyStickButtonReleased(const JoyStickState& state, int button) = 0;
+    virtual bool joyStickButtonHeld    (const JoyStickState& state, int button) = 0;
+    virtual bool joyStickAxisMoved     (const JoyStickState& state, int axis)   = 0;
+    virtual bool joyStickSliderMoved   (const JoyStickState& state, int index) {return true;}
+    virtual bool joyStickPovMoved      (const JoyStickState& state, int index) {return true;}
+    virtual bool joyStickVector3Moved  (const JoyStickState& state, int index) {return true;}
+  };
+
+}
+
+#endif /* _InputInterfaces_H__ */
Index: code/trunk/src/core/InputManager.cc
===================================================================
--- code/trunk/src/core/InputManager.cc	(revision 1224)
+++ code/trunk/src/core/InputManager.cc	(revision 1293)
@@ -30,5 +30,5 @@
   @file
   @brief Implementation of the InputManager that captures all the input from OIS
-         and redirects it to handlers if necessary.
+         and redirects it to handlers.
  */
 
@@ -52,12 +52,9 @@
   InputManager::InputManager() :
       inputSystem_(0), keyboard_(0), mouse_(0),
-      state_(IS_UNINIT), stateRequest_(IS_UNINIT)
+      joySticksSize_(0),
+      state_(IS_UNINIT), stateRequest_(IS_UNINIT),
+      keyboardModifiers_(0)
   {
     RegisterObject(InputManager);
-
-    this->joySticks_.reserve(5);
-    //this->activeJoyStickHandlers_.reserve(10);
-    this->activeKeyHandlers_.reserve(10);
-    this->activeMouseHandlers_.reserve(10);
   }
 
@@ -87,9 +84,10 @@
     @param windowHeight The height of the render window
   */
-  bool InputManager::_initialise(const size_t windowHnd, const int windowWidth, const int windowHeight,
-        const bool createKeyboard, const bool createMouse, const bool createJoySticks)
+  bool InputManager::_initialise(const size_t windowHnd, int windowWidth, int windowHeight,
+        bool createKeyboard, bool createMouse, bool createJoySticks)
   {
     if (state_ == IS_UNINIT)
     {
+      CCOUT(3) << "Initialising Input System..." << std::endl;
       CCOUT(ORX_DEBUG) << "Initialising OIS components..." << std::endl;
 
@@ -145,4 +143,5 @@
     addKeyHandler(binder, "keybinder");
     addMouseHandler(binder, "keybinder");
+    addJoyStickHandler(binder, "keybinder");
 
     // Read all the key bindings and assign them
@@ -234,5 +233,5 @@
   bool InputManager::_initialiseJoySticks()
   {
-    if (joySticks_.size() > 0)
+    if (joySticksSize_ > 0)
     {
       CCOUT(2) << "Warning: Joy sticks already initialised, skipping." << std::endl;
@@ -265,4 +264,7 @@
       return false;
     }
+    joySticksSize_ = joySticks_.size();
+    activeJoyStickHandlers_.resize(joySticksSize_);
+    joyStickButtonsDown_.resize(joySticksSize_);
     return success;
   }
@@ -273,8 +275,8 @@
   void InputManager::_destroy()
   {
-    CCOUT(ORX_DEBUG) << "Destroying ..." << std::endl;
-
     if (state_ != IS_UNINIT)
     {
+      CCOUT(ORX_DEBUG) << "Destroying ..." << std::endl;
+
       if (keyHandlers_.find("buffer") != keyHandlers_.end())
         delete keyHandlers_["buffer"];
@@ -296,9 +298,6 @@
 
       state_ = IS_UNINIT;
-    }
-    else
-      CCOUT(ORX_WARNING) << "Warning: Cannot be destroyed, since not initialised." << std::endl;
-
-    CCOUT(ORX_DEBUG) << "Destroying done." << std::endl;
+      CCOUT(ORX_DEBUG) << "Destroying done." << std::endl;
+    }
   }
 
@@ -336,12 +335,13 @@
   void InputManager::_destroyJoySticks()
   {
-    if (joySticks_.size() > 0)
+    if (joySticksSize_ > 0)
     {
       // note: inputSystem_ can never be 0, or else the code is mistaken
-      for (unsigned int i = 0; i < joySticks_.size(); i++)
+      for (unsigned int i = 0; i < joySticksSize_; i++)
         if (joySticks_[i] != 0)
           inputSystem_->destroyInputObject(joySticks_[i]);
 
       joySticks_.clear();
+      joySticksSize_ = 0;
       activeJoyStickHandlers_.clear();
       joyStickButtonsDown_.clear();
@@ -372,5 +372,6 @@
         activeKeyHandlers_.clear();
         activeMouseHandlers_.clear();
-        activeJoyStickHandlers_.clear();
+        for (unsigned int i = 0; i < joySticksSize_; i++)
+          activeJoyStickHandlers_[i].clear();
 
         switch (stateRequest_)
@@ -381,8 +382,8 @@
           activeKeyHandlers_.push_back(keyHandlers_["keybinder"]);
           activeMouseHandlers_.push_back(mouseHandlers_["keybinder"]);
-          activeMouseHandlers_.push_back(mouseHandlers_["SpaceShip"]);
-          for (std::vector<OIS::JoyStick*>::const_iterator it = joySticks_.begin();
-                it != joySticks_.end(); it++)
-            activeJoyStickHandlers_[*it].push_back(joyStickHandlers_["keybinder"]);
+          if (getMouseHandler("SpaceShip"))
+            activeMouseHandlers_.push_back(mouseHandlers_["SpaceShip"]);
+          for (unsigned int i = 0; i < joySticksSize_; i++)
+            activeJoyStickHandlers_[i].push_back(joyStickHandlers_["keybinder"]);
           break;
 
@@ -393,7 +394,8 @@
         case IS_CONSOLE:
           activeMouseHandlers_.push_back(mouseHandlers_["keybinder"]);
-          for (std::vector<OIS::JoyStick*>::const_iterator it = joySticks_.begin();
-                it != joySticks_.end(); it++)
-            activeJoyStickHandlers_[*it].push_back(joyStickHandlers_["keybinder"]);
+          if (getMouseHandler("SpaceShip"))
+            activeMouseHandlers_.push_back(mouseHandlers_["SpaceShip"]);
+          for (unsigned int i = 0; i < joySticksSize_; i++)
+            activeJoyStickHandlers_[i].push_back(joyStickHandlers_["keybinder"]);
 
           activeKeyHandlers_.push_back(keyHandlers_["buffer"]);
@@ -412,39 +414,25 @@
     if (keyboard_)
       keyboard_->capture();
+    for (unsigned  int i = 0; i < joySticksSize_; i++)
+      joySticks_[i]->capture();
 
 
     // call all the handlers for the held key events
-    for (std::list<OIS::KeyCode>::const_iterator itKey = keysDown_.begin();
-          itKey != keysDown_.end(); itKey++)
-    {
-      OIS::KeyEvent keyArg(keyboard_, *itKey, 0);
-      for (unsigned int i = 0; i < activeKeyHandlers_.size(); i++)
-        activeKeyHandlers_[i]->keyHeld(keyArg);
-    }
+    for (unsigned int iKey = 0; iKey < keysDown_.size(); iKey++)
+      for (unsigned int iHandler = 0; iHandler < activeKeyHandlers_.size(); iHandler++)
+        activeKeyHandlers_[iHandler]->keyHeld(KeyEvent(keysDown_[iKey], keyboardModifiers_));
 
     // call all the handlers for the held mouse button events
-    for (std::list<OIS::MouseButtonID>::const_iterator itMouseButton = mouseButtonsDown_.begin();
-          itMouseButton != mouseButtonsDown_.end(); itMouseButton++)
-    {
-      OIS::MouseEvent mouseButtonArg(mouse_, mouse_->getMouseState());
-      for (unsigned int i = 0; i < activeMouseHandlers_.size(); i++)
-        activeMouseHandlers_[i]->mouseHeld(mouseButtonArg, *itMouseButton);
-    }
+    for (unsigned int iButton = 0; iButton < mouseButtonsDown_.size(); iButton++)
+      for (unsigned int iHandler = 0; iHandler < activeMouseHandlers_.size(); iHandler++)
+        activeMouseHandlers_[iHandler]->mouseButtonHeld(mouse_->getMouseState(), mouseButtonsDown_[iButton]);
 
     // call all the handlers for the held joy stick button events
-    for (std::map< OIS::JoyStick*, std::list <int> >::const_iterator itJoyStick = joyStickButtonsDown_.begin();
-          itJoyStick != joyStickButtonsDown_.end(); itJoyStick++)
-    {
-      OIS::JoyStick* joyStick = (*itJoyStick).first;
-      for (std::list<int>::const_iterator itJoyStickButton = (*itJoyStick).second.begin();
-            itJoyStickButton != (*itJoyStick).second.end(); itJoyStickButton++)
-      {
-        OIS::JoyStickEvent joyStickButtonArg(joyStick, joyStick->getJoyStickState());
-        for (unsigned int i = 0; i < activeJoyStickHandlers_[joyStick].size(); i++)
-          activeJoyStickHandlers_[joyStick][i]->buttonHeld(i, joyStickButtonArg, *itJoyStickButton);
-      }
-    }
-  }
-
+    for (unsigned int iJoyStick  = 0; iJoyStick < joySticksSize_; iJoyStick++)
+      for (unsigned int iButton   = 0; iButton   < joyStickButtonsDown_[iJoyStick].size(); iButton++)
+        for (unsigned int iHandler = 0; iHandler  < activeJoyStickHandlers_[iJoyStick].size(); iHandler++)
+          activeJoyStickHandlers_[iJoyStick][iHandler]->joyStickButtonHeld(
+              JoyStickState(joySticks_[iJoyStick]->getJoyStickState(), iJoyStick), joyStickButtonsDown_[iJoyStick][iButton]);
+  }
 
   // ###### Key Events ######
@@ -457,16 +445,20 @@
   {
     // check whether the key already is in the list (can happen when focus was lost)
-    for (std::list<OIS::KeyCode>::iterator it = keysDown_.begin(); it != keysDown_.end(); it++)
-    {
-      if (*it == e.key)
-      {
-        keysDown_.erase(it);
-        break;
-      }
-    }
-    keysDown_.push_back(e.key);
+    unsigned int iKey = 0;
+    while (iKey < keysDown_.size() && keysDown_[iKey].key != (KeyCode::Enum)e.key)
+      iKey++;
+    if (iKey == keysDown_.size())
+      keysDown_.push_back(Key(e));
+
+    // update modifiers
+    if(e.key == OIS::KC_RMENU    || e.key == OIS::KC_LMENU)
+      keyboardModifiers_ |= KeyboardModifier::Alt;   // alt key
+    if(e.key == OIS::KC_RCONTROL || e.key == OIS::KC_LCONTROL)
+      keyboardModifiers_ |= KeyboardModifier::Ctrl;  // ctrl key
+    if(e.key == OIS::KC_RSHIFT   || e.key == OIS::KC_LSHIFT)
+      keyboardModifiers_ |= KeyboardModifier::Shift; // shift key
 
     for (unsigned int i = 0; i < activeKeyHandlers_.size(); i++)
-      activeKeyHandlers_[i]->keyPressed(e);
+      activeKeyHandlers_[i]->keyPressed(KeyEvent(e, keyboardModifiers_));
 
     return true;
@@ -480,15 +472,23 @@
   {
     // remove the key from the keysDown_ list
-    for (std::list<OIS::KeyCode>::iterator it = keysDown_.begin(); it != keysDown_.end(); it++)
-    {
-      if (*it == e.key)
-      {
-        keysDown_.erase(it);
+    for (unsigned int iKey = 0; iKey < keysDown_.size(); iKey++)
+    {
+      if (keysDown_[iKey].key == (KeyCode::Enum)e.key)
+      {
+        keysDown_.erase(keysDown_.begin() + iKey);
         break;
       }
     }
 
+    // update modifiers
+    if(e.key == OIS::KC_RMENU    || e.key == OIS::KC_LMENU)
+      keyboardModifiers_ &= ~KeyboardModifier::Alt;   // alt key
+    if(e.key == OIS::KC_RCONTROL || e.key == OIS::KC_LCONTROL)
+      keyboardModifiers_ &= ~KeyboardModifier::Ctrl;  // ctrl key
+    if(e.key == OIS::KC_RSHIFT   || e.key == OIS::KC_LSHIFT)
+      keyboardModifiers_ &= ~KeyboardModifier::Shift; // shift key
+
     for (unsigned int i = 0; i < activeKeyHandlers_.size(); i++)
-      activeKeyHandlers_[i]->keyReleased(e);
+      activeKeyHandlers_[i]->keyReleased(KeyEvent(e, keyboardModifiers_));
 
     return true;
@@ -504,6 +504,17 @@
   bool InputManager::mouseMoved(const OIS::MouseEvent &e)
   {
-    for (unsigned int i = 0; i < activeMouseHandlers_.size(); i++)
-      activeMouseHandlers_[i]->mouseMoved(e);
+    // check for actual moved event
+    if (e.state.X.rel != 0 || e.state.Y.rel != 0)
+    {
+      for (unsigned int i = 0; i < activeMouseHandlers_.size(); i++)
+        activeMouseHandlers_[i]->mouseMoved(e.state);
+    }
+
+    // check for mouse scrolled event
+    if (e.state.Z.rel != 0)
+    {
+      for (unsigned int i = 0; i < activeMouseHandlers_.size(); i++)
+        activeMouseHandlers_[i]->mouseScrolled(e.state);
+    }
 
     return true;
@@ -518,16 +529,12 @@
   {
     // check whether the button already is in the list (can happen when focus was lost)
-    for (std::list<OIS::MouseButtonID>::iterator it = mouseButtonsDown_.begin(); it != mouseButtonsDown_.end(); it++)
-    {
-      if (*it == id)
-      {
-        mouseButtonsDown_.erase(it);
-        break;
-      }
-    }
-    mouseButtonsDown_.push_back(id);
+    unsigned int iButton = 0;
+    while (iButton < mouseButtonsDown_.size() && mouseButtonsDown_[iButton] != (MouseButton::Enum)id)
+      iButton++;
+    if (iButton == mouseButtonsDown_.size())
+      mouseButtonsDown_.push_back((MouseButton::Enum)id);
 
     for (unsigned int i = 0; i < activeMouseHandlers_.size(); i++)
-      activeMouseHandlers_[i]->mousePressed(e, id);
+      activeMouseHandlers_[i]->mouseButtonPressed(e.state, (MouseButton::Enum)id);
 
     return true;
@@ -542,9 +549,9 @@
   {
     // remove the button from the keysDown_ list
-    for (std::list<OIS::MouseButtonID>::iterator it = mouseButtonsDown_.begin(); it != mouseButtonsDown_.end(); it++)
-    {
-      if (*it == id)
-      {
-        mouseButtonsDown_.erase(it);
+    for (unsigned int iButton = 0; iButton < mouseButtonsDown_.size(); iButton++)
+    {
+      if (mouseButtonsDown_[iButton] == (MouseButton::Enum)id)
+      {
+        mouseButtonsDown_.erase(mouseButtonsDown_.begin() + iButton);
         break;
       }
@@ -552,5 +559,5 @@
 
     for (unsigned int i = 0; i < activeMouseHandlers_.size(); i++)
-      activeMouseHandlers_[i]->mouseReleased(e, id);
+      activeMouseHandlers_[i]->mouseButtonReleased(e.state, (MouseButton::Enum)id);
 
     return true;
@@ -562,77 +569,101 @@
   bool InputManager::buttonPressed(const OIS::JoyStickEvent &arg, int button)
   {
+    // use the device to identify which one called the method
     OIS::JoyStick* joyStick = (OIS::JoyStick*)arg.device;
+    unsigned int iJoyStick = 0;
+    while (joySticks_[iJoyStick] != joyStick)
+      iJoyStick++;
 
     // check whether the button already is in the list (can happen when focus was lost)
-    std::list<int>& buttonsDownList = joyStickButtonsDown_[joyStick];
-    for (std::list<int>::iterator it = buttonsDownList.begin(); it != buttonsDownList.end(); it++)
-    {
-      if (*it == button)
-      {
-        buttonsDownList.erase(it);
+    std::vector<int> buttonsDown = joyStickButtonsDown_[iJoyStick];
+    unsigned int iButton = 0;
+    while (iButton < buttonsDown.size() && buttonsDown[iButton] != button)
+      iButton++;
+    if (iButton == buttonsDown.size())
+      buttonsDown.push_back(button);
+
+    for (unsigned int iHandler = 0; iHandler < activeJoyStickHandlers_[iJoyStick].size(); iHandler++)
+      activeJoyStickHandlers_[iJoyStick][iHandler]->joyStickButtonPressed(JoyStickState(arg.state, iJoyStick), button);
+
+    return true;
+  }
+
+  bool InputManager::buttonReleased(const OIS::JoyStickEvent &arg, int button)
+  {
+    // use the device to identify which one called the method
+    OIS::JoyStick* joyStick = (OIS::JoyStick*)arg.device;
+    unsigned int iJoyStick = 0;
+    while (joySticks_[iJoyStick] != joyStick)
+      iJoyStick++;
+
+    // remove the button from the joyStickButtonsDown_ list
+    std::vector<int> buttonsDown = joyStickButtonsDown_[iJoyStick];
+    for (unsigned int iButton = 0; iButton < buttonsDown.size(); iButton++)
+    {
+      if (buttonsDown[iButton] == button)
+      {
+        buttonsDown.erase(buttonsDown.begin() + iButton);
         break;
       }
     }
-    joyStickButtonsDown_[joyStick].push_back(button);
-
-    for (unsigned int i = 0; i < activeJoyStickHandlers_[joyStick].size(); i++)
-      activeJoyStickHandlers_[joyStick][i]->buttonPressed(i, arg, button);
-
-    return true;
-  }
-
-  bool InputManager::buttonReleased(const OIS::JoyStickEvent &arg, int button)
-  {
+
+    for (unsigned int iHandler = 0; iHandler < activeJoyStickHandlers_[iJoyStick].size(); iHandler++)
+      activeJoyStickHandlers_[iJoyStick][iHandler]->joyStickButtonReleased(JoyStickState(arg.state, iJoyStick), button);
+
+    return true;
+  }
+
+  bool InputManager::axisMoved(const OIS::JoyStickEvent &arg, int axis)
+  {
+    // use the device to identify which one called the method
     OIS::JoyStick* joyStick = (OIS::JoyStick*)arg.device;
-
-    // remove the button from the joyStickButtonsDown_ list
-    std::list<int>& buttonsDownList = joyStickButtonsDown_[joyStick];
-    for (std::list<int>::iterator it = buttonsDownList.begin(); it != buttonsDownList.end(); it++)
-    {
-      if (*it == button)
-      {
-        buttonsDownList.erase(it);
-        break;
-      }
-    }
-
-    for (unsigned int i = 0; i < activeJoyStickHandlers_[joyStick].size(); i++)
-      activeJoyStickHandlers_[joyStick][i]->buttonReleased(i, arg, button);
-
-    return true;
-  }
-
-  bool InputManager::axisMoved(const OIS::JoyStickEvent &arg, int axis)
-  {
+    unsigned int iJoyStick = 0;
+    while (joySticks_[iJoyStick] != joyStick)
+      iJoyStick++;
+
+    for (unsigned int iHandler = 0; iHandler < activeJoyStickHandlers_[iJoyStick].size(); iHandler++)
+      activeJoyStickHandlers_[iJoyStick][iHandler]->joyStickAxisMoved(JoyStickState(arg.state, iJoyStick), axis);
+
+    return true;
+  }
+
+  bool InputManager::sliderMoved(const OIS::JoyStickEvent &arg, int id)
+  {
+    // use the device to identify which one called the method
     OIS::JoyStick* joyStick = (OIS::JoyStick*)arg.device;
-    for (unsigned int i = 0; i < activeJoyStickHandlers_[joyStick].size(); i++)
-      activeJoyStickHandlers_[joyStick][i]->axisMoved(i, arg, axis);
-
-    return true;
-  }
-
-  bool InputManager::sliderMoved(const OIS::JoyStickEvent &arg, int id)
-  {
+    unsigned int iJoyStick = 0;
+    while (joySticks_[iJoyStick] != joyStick)
+      iJoyStick++;
+
+    for (unsigned int iHandler = 0; iHandler < activeJoyStickHandlers_[iJoyStick].size(); iHandler++)
+      activeJoyStickHandlers_[iJoyStick][iHandler]->joyStickSliderMoved(JoyStickState(arg.state, iJoyStick), id);
+
+    return true;
+  }
+
+  bool InputManager::povMoved(const OIS::JoyStickEvent &arg, int id)
+  {
+    // use the device to identify which one called the method
     OIS::JoyStick* joyStick = (OIS::JoyStick*)arg.device;
-    for (unsigned int i = 0; i < activeJoyStickHandlers_[joyStick].size(); i++)
-      activeJoyStickHandlers_[joyStick][i]->sliderMoved(i, arg, id);
-
-    return true;
-  }
-
-  bool InputManager::povMoved(const OIS::JoyStickEvent &arg, int id)
-  {
+    unsigned int iJoyStick = 0;
+    while (joySticks_[iJoyStick] != joyStick)
+      iJoyStick++;
+
+    for (unsigned int iHandler = 0; iHandler < activeJoyStickHandlers_[iJoyStick].size(); iHandler++)
+      activeJoyStickHandlers_[iJoyStick][iHandler]->joyStickPovMoved(JoyStickState(arg.state, iJoyStick), id);
+
+    return true;
+  }
+
+  bool InputManager::vector3Moved(const OIS::JoyStickEvent &arg, int id)
+  {
+    // use the device to identify which one called the method
     OIS::JoyStick* joyStick = (OIS::JoyStick*)arg.device;
-    for (unsigned int i = 0; i < activeJoyStickHandlers_[joyStick].size(); i++)
-      activeJoyStickHandlers_[joyStick][i]->povMoved(i, arg, id);
-
-    return true;
-  }
-
-  bool InputManager::vector3Moved(const OIS::JoyStickEvent &arg, int id)
-  {
-    OIS::JoyStick* joyStick = (OIS::JoyStick*)arg.device;
-    for (unsigned int i = 0; i < activeJoyStickHandlers_[joyStick].size(); i++)
-      activeJoyStickHandlers_[joyStick][i]->vector3Moved(i, arg, id);
+    unsigned int iJoyStick = 0;
+    while (joySticks_[iJoyStick] != joyStick)
+      iJoyStick++;
+
+    for (unsigned int iHandler = 0; iHandler < activeJoyStickHandlers_[iJoyStick].size(); iHandler++)
+      activeJoyStickHandlers_[iJoyStick][iHandler]->joyStickVector3Moved(JoyStickState(arg.state, iJoyStick), id);
 
     return true;
@@ -645,6 +676,6 @@
   // ################################
 
-  bool InputManager::initialise(const size_t windowHnd, const int windowWidth, const int windowHeight,
-    const bool createKeyboard, const bool createMouse, const bool createJoySticks)
+  bool InputManager::initialise(const size_t windowHnd, int windowWidth, int windowHeight,
+    bool createKeyboard, bool createMouse, bool createJoySticks)
   {
     return _getSingleton()._initialise(windowHnd, windowWidth, windowHeight,
@@ -685,5 +716,37 @@
   int InputManager::numberOfJoySticks()
   {
-    return _getSingleton().joySticks_.size();
+    return _getSingleton().joySticksSize_;
+  }
+
+  bool InputManager::isKeyDown(KeyCode::Enum key)
+  {
+    if (_getSingleton().keyboard_)
+      return _getSingleton().keyboard_->isKeyDown((OIS::KeyCode)key);
+    else
+      return false;
+  }
+
+  bool InputManager::isModifierDown(KeyboardModifier::Enum modifier)
+  {
+    if (_getSingleton().keyboard_)
+      return isModifierDown(modifier);
+    else
+      return false;
+  }
+
+  const MouseState InputManager::getMouseState()
+  {
+    if (_getSingleton().mouse_)
+      return _getSingleton().mouse_->getMouseState();
+    else
+      return MouseState();
+  }
+
+  const JoyStickState InputManager::getJoyStickState(unsigned int ID)
+  {
+    if (ID < _getSingleton().joySticksSize_)
+      return JoyStickState(_getSingleton().joySticks_[ID]->getJoyStickState(), ID);
+    else
+      return JoyStickState();
   }
 
@@ -757,4 +820,6 @@
   bool InputManager::addKeyHandler(KeyHandler* handler, const std::string& name)
   {
+    if (!handler)
+      return false;
     if (_getSingleton().keyHandlers_.find(name) == _getSingleton().keyHandlers_.end())
     {
@@ -883,4 +948,6 @@
   bool InputManager::addMouseHandler(MouseHandler* handler, const std::string& name)
   {
+    if (!handler)
+      return false;
     if (_getSingleton().mouseHandlers_.find(name) == _getSingleton().mouseHandlers_.end())
     {
@@ -1010,4 +1077,6 @@
   bool InputManager::addJoyStickHandler(JoyStickHandler* handler, const std::string& name)
   {
+    if (!handler)
+      return false;
     if (_getSingleton().joyStickHandlers_.find(name) == _getSingleton().joyStickHandlers_.end())
     {
@@ -1061,5 +1130,5 @@
     @return False if name or id was not found, true otherwise.
   */
-  bool InputManager::enableJoyStickHandler(const std::string& name, const int ID)
+  bool InputManager::enableJoyStickHandler(const std::string& name, unsigned int ID)
   {
     // get handler pointer from the map with all stored handlers
@@ -1069,11 +1138,10 @@
 
     // check for existence of the ID
-    if ((unsigned int)ID >= _getSingleton().joySticks_.size())
-      return false;
-    OIS::JoyStick* joyStick = _getSingleton().joySticks_[ID];
+    if (ID >= _getSingleton().joySticksSize_)
+      return false;
 
     // see whether the handler already is in the list
-    for (std::vector<JoyStickHandler*>::iterator it = _getSingleton().activeJoyStickHandlers_[joyStick].begin();
-          it != _getSingleton().activeJoyStickHandlers_[joyStick].end(); it++)
+    for (std::vector<JoyStickHandler*>::iterator it = _getSingleton().activeJoyStickHandlers_[ID].begin();
+          it != _getSingleton().activeJoyStickHandlers_[ID].end(); it++)
     {
       if ((*it) == (*handlerIt).second)
@@ -1083,5 +1151,5 @@
       }
     }
-    _getSingleton().activeJoyStickHandlers_[joyStick].push_back((*handlerIt).second);
+    _getSingleton().activeJoyStickHandlers_[ID].push_back((*handlerIt).second);
     _getSingleton().stateRequest_ = IS_CUSTOM;
     return true;
@@ -1093,5 +1161,5 @@
     @return False if name or id was not found, true otherwise.
   */
-  bool InputManager::disableJoyStickHandler(const std::string &name, int ID)
+  bool InputManager::disableJoyStickHandler(const std::string &name, unsigned int ID)
   {
     // get handler pointer from the map with all stored handlers
@@ -1101,15 +1169,14 @@
 
     // check for existence of the ID
-    if ((unsigned int)ID >= _getSingleton().joySticks_.size())
-      return false;
-    OIS::JoyStick* joyStick = _getSingleton().joySticks_[ID];
+    if (ID >= _getSingleton().joySticksSize_)
+      return false;
 
     // look for the handler in the list
-    for (std::vector<JoyStickHandler*>::iterator it = _getSingleton().activeJoyStickHandlers_[joyStick].begin();
-          it != _getSingleton().activeJoyStickHandlers_[joyStick].end(); it++)
+    for (std::vector<JoyStickHandler*>::iterator it = _getSingleton().activeJoyStickHandlers_[ID].begin();
+          it != _getSingleton().activeJoyStickHandlers_[ID].end(); it++)
     {
       if ((*it) == (*handlerIt).second)
       {
-        _getSingleton().activeJoyStickHandlers_[joyStick].erase(it);
+        _getSingleton().activeJoyStickHandlers_[ID].erase(it);
         _getSingleton().stateRequest_ = IS_CUSTOM;
         return true;
@@ -1124,5 +1191,5 @@
     @return False if key handler is not active or doesn't exist, true otherwise.
   */
-  bool InputManager::isJoyStickHandlerActive(const std::string& name, const int ID)
+  bool InputManager::isJoyStickHandlerActive(const std::string& name, unsigned int ID)
   {
     // get handler pointer from the map with all stored handlers
@@ -1132,11 +1199,10 @@
 
     // check for existence of the ID
-    if ((unsigned int)ID >= _getSingleton().joySticks_.size())
-      return false;
-    OIS::JoyStick* joyStick = _getSingleton().joySticks_[ID];
+    if (ID >= _getSingleton().joySticksSize_)
+      return false;
 
     // see whether the handler already is in the list
-    for (std::vector<JoyStickHandler*>::iterator it = _getSingleton().activeJoyStickHandlers_[joyStick].begin();
-          it != _getSingleton().activeJoyStickHandlers_[joyStick].end(); it++)
+    for (std::vector<JoyStickHandler*>::iterator it = _getSingleton().activeJoyStickHandlers_[ID].begin();
+          it != _getSingleton().activeJoyStickHandlers_[ID].end(); it++)
     {
       if ((*it) == (*handlerIt).second)
Index: code/trunk/src/core/InputManager.h
===================================================================
--- code/trunk/src/core/InputManager.h	(revision 1224)
+++ code/trunk/src/core/InputManager.h	(revision 1293)
@@ -39,20 +39,17 @@
 
 #include <map>
-#include <list>
+#include <vector>
 
 #include "ois/OIS.h"
 #include "Tickable.h"
+#include "InputInterfaces.h"
 
 namespace orxonox
 {
-  class Mouse : public OIS::Mouse
-  {
-  };
-
   /**
     @brief Captures and distributes mouse and keyboard input.
   */
   class _CoreExport InputManager
-        : public Tickable,
+        : public TickableReal,
           public OIS::KeyListener, public OIS::MouseListener, public OIS::JoyStickListener
   {
@@ -72,6 +69,6 @@
 
   public: // static functions
-    static bool initialise(const size_t windowHnd, const int windowWidth, const int windowHeight,
-          const bool createKeyboard = true, const bool createMouse = true, const bool createJoySticks = false);
+    static bool initialise(const size_t windowHnd, int windowWidth, int windowHeight,
+          bool createKeyboard = true, bool createMouse = true, bool createJoySticks = false);
     static bool initialiseKeyboard();
     static bool initialiseMouse();
@@ -85,4 +82,9 @@
     static void destroyMouse();
     static void destroyJoySticks();
+
+    static bool isModifierDown(KeyboardModifier::Enum modifier);
+    static bool isKeyDown(KeyCode::Enum key);
+    static const MouseState getMouseState();
+    static const JoyStickState getJoyStickState(unsigned int ID);
 
     static void setWindowExtents(const int width, const int height);
@@ -108,11 +110,7 @@
     static bool removeJoyStickHandler         (const std::string& name);
     static JoyStickHandler* getJoyStickHandler(const std::string& name);
-    static bool enableJoyStickHandler         (const std::string& name, const int id);
-    static bool disableJoyStickHandler        (const std::string& name, const int id);
-    static bool isJoyStickHandlerActive       (const std::string& name, const int id);
-
-    // Temporary solutions. Will be removed soon!
-    static OIS::Mouse*    getMouse()    { return _getSingleton().mouse_   ; }
-    static OIS::Keyboard* getKeyboard() { return _getSingleton().keyboard_; }
+    static bool enableJoyStickHandler         (const std::string& name, unsigned int id);
+    static bool disableJoyStickHandler        (const std::string& name, unsigned int id);
+    static bool isJoyStickHandlerActive       (const std::string& name, unsigned int id);
 
   private: // functions
@@ -123,5 +121,5 @@
 
     // Intenal methods
-    bool _initialise(const size_t, const int, const int, const bool, const bool, const bool);
+    bool _initialise(const size_t, int, int, bool, bool, bool);
     bool _initialiseKeyboard();
     bool _initialiseMouse();
@@ -133,20 +131,18 @@
     void _destroyJoySticks();
 
-    //void _setNumberOfJoysticks(int size);
-
     void tick(float dt);
 
     // input events
-		bool mousePressed  (const OIS::MouseEvent    &arg, OIS::MouseButtonID id);
-		bool mouseReleased (const OIS::MouseEvent    &arg, OIS::MouseButtonID id);
+    bool mousePressed  (const OIS::MouseEvent    &arg, OIS::MouseButtonID id);
+    bool mouseReleased (const OIS::MouseEvent    &arg, OIS::MouseButtonID id);
     bool mouseMoved    (const OIS::MouseEvent    &arg);
-		bool keyPressed    (const OIS::KeyEvent      &arg);
-		bool keyReleased   (const OIS::KeyEvent      &arg);
-		bool buttonPressed (const OIS::JoyStickEvent &arg, int button);
-		bool buttonReleased(const OIS::JoyStickEvent &arg, int button);
-		bool axisMoved     (const OIS::JoyStickEvent &arg, int axis);
-		bool sliderMoved   (const OIS::JoyStickEvent &arg, int id);
-		bool povMoved      (const OIS::JoyStickEvent &arg, int id);
-		bool vector3Moved  (const OIS::JoyStickEvent &arg, int id);
+    bool keyPressed    (const OIS::KeyEvent      &arg);
+    bool keyReleased   (const OIS::KeyEvent      &arg);
+    bool buttonPressed (const OIS::JoyStickEvent &arg, int button);
+    bool buttonReleased(const OIS::JoyStickEvent &arg, int button);
+    bool axisMoved     (const OIS::JoyStickEvent &arg, int axis);
+    bool sliderMoved   (const OIS::JoyStickEvent &arg, int id);
+    bool povMoved      (const OIS::JoyStickEvent &arg, int id);
+    bool vector3Moved  (const OIS::JoyStickEvent &arg, int id);
 
     static InputManager& _getSingleton();
@@ -158,7 +154,9 @@
     OIS::Mouse*                                 mouse_;       //!< OIS keyboard
     std::vector<OIS::JoyStick*>                 joySticks_;   //!< OIS joy sticks
+    unsigned int                                joySticksSize_;
 
     InputState state_;
     InputState stateRequest_;
+    unsigned int keyboardModifiers_;
 
     std::map<std::string, KeyHandler*>          keyHandlers_;
@@ -168,11 +166,12 @@
     std::vector<KeyHandler*>                    activeKeyHandlers_;
     std::vector<MouseHandler*>                  activeMouseHandlers_;
-    std::map< OIS::JoyStick*, std::vector<JoyStickHandler*> > activeJoyStickHandlers_;
+    std::vector<std::vector<JoyStickHandler*> > activeJoyStickHandlers_;
 
-    std::list<OIS::KeyCode>                     keysDown_;
-    std::list<OIS::MouseButtonID>               mouseButtonsDown_;
-    std::map< OIS::JoyStick*, std::list<int> >  joyStickButtonsDown_;
+    std::vector<Key>                            keysDown_;
+    std::vector<MouseButton::Enum>              mouseButtonsDown_;
+    std::vector<std::vector<int> >              joyStickButtonsDown_;
 
   };
+
 }
 
Index: code/trunk/src/core/Namespace.cc
===================================================================
--- code/trunk/src/core/Namespace.cc	(revision 1224)
+++ code/trunk/src/core/Namespace.cc	(revision 1293)
@@ -37,11 +37,10 @@
     CreateFactory(Namespace);
 
-    Namespace::Namespace()
+    Namespace::Namespace() :
+      bAutogeneratedFileRootNamespace_(false),
+      bRoot_(false),
+      operator_("or")
     {
         RegisterObject(Namespace);
-
-        this->bAutogeneratedFileRootNamespace_ = false;
-        this->bRoot_ = false;
-        this->operator_ = "or";
     }
 
Index: code/trunk/src/core/OrxonoxClass.cc
===================================================================
--- code/trunk/src/core/OrxonoxClass.cc	(revision 1224)
+++ code/trunk/src/core/OrxonoxClass.cc	(revision 1293)
@@ -37,10 +37,9 @@
 {
     /** @brief Constructor: Sets the default values. */
-    OrxonoxClass::OrxonoxClass()
+    OrxonoxClass::OrxonoxClass() :
+      identifier_(0),
+      parents_(0)
     {
         this->setConfigValues();
-
-        this->identifier_ = 0;
-        this->parents_ = 0;
     }
 
Index: code/trunk/src/core/SignalHandler.cc
===================================================================
--- code/trunk/src/core/SignalHandler.cc	(revision 1224)
+++ code/trunk/src/core/SignalHandler.cc	(revision 1293)
@@ -35,4 +35,5 @@
 
 #include <assert.h>
+#include <iostream>
 
 #include "Debug.h"
@@ -43,4 +44,9 @@
 
 #include <wait.h>
+#include <X11/Xlib.h>
+#include <X11/Xutil.h>
+#include <X11/keysym.h>
+
+bool SignalHandler::bXAutoKeyRepeatOn_ = false;
 
 SignalHandler::SignalHandler()
@@ -58,4 +64,23 @@
   this->fileName = fileName;
 
+  // prepare for restoring XAutoKeyRepeat
+  Display* display;
+  if ((display = XOpenDisplay(0)))
+  {
+    XKeyboardState oldState;
+    XGetKeyboardControl(display, &oldState);
+    if (oldState.global_auto_repeat == AutoRepeatModeOn)
+      bXAutoKeyRepeatOn_ = true;
+    else
+      bXAutoKeyRepeatOn_ = false;
+    XCloseDisplay(display);
+  }
+  else
+  {
+    std::cout << "Warning: couldn't open X display to restore XAutoKeyRepeat." << std::endl;
+    bXAutoKeyRepeatOn_ = false;
+  }
+
+
   // make sure doCatch is only called once without calling dontCatch
   assert( sigRecList.size() == 0 );
@@ -120,4 +145,15 @@
       sigName = "SIGILL";
       break;
+  }
+
+  if (bXAutoKeyRepeatOn_)
+  {
+    std::cout << "Trying to restore XAutoKeyRepeat" << std::endl;
+	Display* display;
+	  if ((display = XOpenDisplay(0)))
+    {
+			XAutoRepeatOn(display);
+		  XCloseDisplay(display);
+    }
   }
 
Index: code/trunk/src/core/SignalHandler.h
===================================================================
--- code/trunk/src/core/SignalHandler.h	(revision 1224)
+++ code/trunk/src/core/SignalHandler.h	(revision 1293)
@@ -86,4 +86,7 @@
     std::string appName;
     std::string fileName;
+
+    // used to turn on KeyAutoRepeat if OIS crashes
+    static bool bXAutoKeyRepeatOn_;
 };
 
Index: code/trunk/src/core/Tickable.cc
===================================================================
--- code/trunk/src/core/Tickable.cc	(revision 1224)
+++ code/trunk/src/core/Tickable.cc	(revision 1293)
@@ -40,3 +40,11 @@
         RegisterRootObject(Tickable);
     }
+
+    /**
+        @brief Constructor: Registers the object in the TickableReal-list
+    */
+    TickableReal::TickableReal()
+    {
+        RegisterRootObject(TickableReal);
+    }
 }
Index: code/trunk/src/core/Tickable.h
===================================================================
--- code/trunk/src/core/Tickable.h	(revision 1224)
+++ code/trunk/src/core/Tickable.h	(revision 1293)
@@ -62,4 +62,18 @@
     };
 
+    //! The Tickable interface provides a tick(dt) function, that gets called every frame.
+    class _CoreExport TickableReal : virtual public OrxonoxClass
+    {
+        public:
+            /**
+                @brief Gets called every frame.
+                @param dt The time since the last frame in seconds
+            */
+            virtual void tick(float dt) = 0;
+
+        protected:
+            TickableReal();
+    };
+
 }
 
