Index: /code/branches/input/src/core/CommandExecutor.h
===================================================================
--- /code/branches/input/src/core/CommandExecutor.h	(revision 1235)
+++ /code/branches/input/src/core/CommandExecutor.h	(revision 1236)
@@ -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/branches/input/src/core/InputBuffer.cc
===================================================================
--- /code/branches/input/src/core/InputBuffer.cc	(revision 1235)
+++ /code/branches/input/src/core/InputBuffer.cc	(revision 1236)
@@ -1,29 +1,29 @@
 /*
- *   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:
- *      Fabian 'x3n' Landau
- *   Co-authors:
- *      ...
- *
- */
+*   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:
+*      Fabian 'x3n' Landau
+*   Co-authors:
+*      Reto Grieder
+*
+*/
 
 #include "InputBuffer.h"
@@ -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)
+  {
+    RegisterObject(InputBuffer);
+    setConfigValues();
+    allowedChars_ = allowedChars;
+    buffer_ = "";
+    lastKey_ = KeyCode::Unassigned;
+    timeSinceKeyPressed_ = 0.0;
+    timeSinceKeyRepeated_ = 0.0;
+    keysToRepeat_ = 0;
+  }
+
+  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/branches/input/src/core/InputBuffer.h
===================================================================
--- /code/branches/input/src/core/InputBuffer.h	(revision 1235)
+++ /code/branches/input/src/core/InputBuffer.h	(revision 1236)
@@ -1,29 +1,29 @@
 /*
- *   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:
- *      Fabian 'x3n' Landau
- *   Co-authors:
- *      ...
- *
- */
+*   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:
+*      Fabian 'x3n' Landau
+*   Co-authors:
+*      ...
+*
+*/
 
 #ifndef _InputBuffer_H__
@@ -35,89 +35,90 @@
 #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 Tickable
+  {
+    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:
+    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_;
-    };
+    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/branches/input/src/core/InputHandler.cc
===================================================================
--- /code/branches/input/src/core/InputHandler.cc	(revision 1235)
+++ /code/branches/input/src/core/InputHandler.cc	(revision 1236)
@@ -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
@@ -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;
@@ -387,10 +385,10 @@
     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();
-      //}
+      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;
       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
+    executeBinding(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
+    executeBinding(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
+    executeBinding(bindingsKeyHold_[int(evt.key)]);
 
     return true;
@@ -440,7 +437,16 @@
   /**
     @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)
+  {
+    return true;
+  }
+
+  /**
+    @brief Event handler for the mouseWheelTurned Event.
+    @param e Mouse state information
+  */
+  bool KeyBinder::mouseWheelTurned(const MouseState &evt)
   {
     return true;
@@ -452,13 +458,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
+    executeBinding(bindingsMouseButtonPress_[int(id)]);
 
     return true;
@@ -470,13 +471,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
+    executeBinding(bindingsMouseButtonRelease_[int(id)]);
 
     return true;
@@ -488,72 +484,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
+    executeBinding(bindingsMouseButtonHold_[int(id)]);
+
+    return true;
+  }
+
+  bool KeyBinder::joyStickButtonPressed(const JoyStickState& state, int button)
+  {
+    // find the appropriate key binding
+    executeBinding(bindingsJoyStickButtonPress_[button]);
+
+    return true;
+  }
+
+  bool KeyBinder::joyStickButtonReleased(const JoyStickState& state, int button)
+  {
+    // find the appropriate key binding
+    executeBinding(bindingsJoyStickButtonRelease_[button]);
+
+    return true;
+  }
+
+  bool KeyBinder::joyStickButtonHeld(const JoyStickState& state, int button)
+  {
+    // find the appropriate key binding
+    executeBinding(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;
@@ -616,5 +592,5 @@
   //  @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));
@@ -627,5 +603,5 @@
   //  @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));
Index: /code/branches/input/src/core/InputHandler.h
===================================================================
--- /code/branches/input/src/core/InputHandler.h	(revision 1235)
+++ /code/branches/input/src/core/InputHandler.h	(revision 1236)
@@ -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
@@ -119,20 +85,21 @@
     bool executeBinding(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 mouseWheelTurned   (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 +119,9 @@
     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];
     //! Names of the mouse buttons as strings
     std::string mouseButtonNames_[numberOfMouseButtons_s];
@@ -163,9 +130,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];
@@ -190,7 +157,7 @@
 		//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);
 
Index: /code/branches/input/src/core/InputInterfaces.h
===================================================================
--- /code/branches/input/src/core/InputInterfaces.h	(revision 1236)
+++ /code/branches/input/src/core/InputInterfaces.h	(revision 1236)
@@ -0,0 +1,459 @@
+/*
+ *   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
+  {
+	  enum Enum
+	  {
+		  Unassigned    = OIS::KC_UNASSIGNED,  
+		  Escape        = OIS::KC_ESCAPE,      
+	    _1            = OIS::KC_1,           
+	    _2            = OIS::KC_2,           
+	    _3            = OIS::KC_3,           
+	    _4            = OIS::KC_4,           
+	    _5            = OIS::KC_5,           
+      _6            = OIS::KC_6,           
+	    _7            = OIS::KC_7,           
+	    _8            = OIS::KC_8,           
+	    _9            = OIS::KC_9,           
+	    _0            = 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
+	  };
+  }
+
+	/*using OIS::KC_UNASSIGNED;
+	using OIS::KC_ESCAPE;
+	using OIS::KC_1;
+	using OIS::KC_2;
+	using OIS::KC_3;
+	using OIS::KC_4;
+	using OIS::KC_5;
+	using OIS::KC_6;
+	using OIS::KC_7;
+	using OIS::KC_8;
+	using OIS::KC_9;
+	using OIS::KC_0;
+	using OIS::KC_MINUS;
+	using OIS::KC_EQUALS;
+	using OIS::KC_BACK;
+	using OIS::KC_TAB;
+	using OIS::KC_Q;
+	using OIS::KC_W;
+	using OIS::KC_E;
+	using OIS::KC_R;
+	using OIS::KC_T;
+	using OIS::KC_Y;
+	using OIS::KC_U;
+	using OIS::KC_I;
+	using OIS::KC_O;
+	using OIS::KC_P;
+	using OIS::KC_LBRACKET;
+	using OIS::KC_RBRACKET;
+	using OIS::KC_RETURN;
+	using OIS::KC_LCONTROL;
+	using OIS::KC_A;
+	using OIS::KC_S;
+	using OIS::KC_D;
+	using OIS::KC_F;
+	using OIS::KC_G;
+	using OIS::KC_H;
+	using OIS::KC_J;
+	using OIS::KC_K;
+	using OIS::KC_L;
+	using OIS::KC_SEMICOLON;
+	using OIS::KC_APOSTROPHE;
+	using OIS::KC_GRAVE;
+	using OIS::KC_LSHIFT;
+	using OIS::KC_BACKSLASH;
+	using OIS::KC_Z;
+	using OIS::KC_X;
+	using OIS::KC_C;
+	using OIS::KC_V;
+	using OIS::KC_B;
+	using OIS::KC_N;
+	using OIS::KC_M;
+	using OIS::KC_COMMA;
+	using OIS::KC_PERIOD;
+	using OIS::KC_SLASH;
+	using OIS::KC_RSHIFT;
+	using OIS::KC_MULTIPLY;
+	using OIS::KC_LMENU;
+	using OIS::KC_SPACE;
+	using OIS::KC_CAPITAL;
+	using OIS::KC_F1;
+	using OIS::KC_F2;
+	using OIS::KC_F3;
+	using OIS::KC_F4;
+	using OIS::KC_F5;
+	using OIS::KC_F6;
+	using OIS::KC_F7;
+	using OIS::KC_F8;
+	using OIS::KC_F9;
+	using OIS::KC_F10;
+	using OIS::KC_NUMLOCK;
+	using OIS::KC_SCROLL;
+	using OIS::KC_NUMPAD7;
+	using OIS::KC_NUMPAD8;
+	using OIS::KC_NUMPAD9;
+	using OIS::KC_SUBTRACT;
+	using OIS::KC_NUMPAD4;
+	using OIS::KC_NUMPAD5;
+	using OIS::KC_NUMPAD6;
+	using OIS::KC_ADD;
+	using OIS::KC_NUMPAD1;
+	using OIS::KC_NUMPAD2;
+	using OIS::KC_NUMPAD3;
+	using OIS::KC_NUMPAD0;
+	using OIS::KC_DECIMAL;
+	using OIS::KC_OEM_102;
+	using OIS::KC_F11;
+	using OIS::KC_F12;
+	using OIS::KC_F13;
+	using OIS::KC_F14;
+	using OIS::KC_F15;
+	using OIS::KC_KANA;
+	using OIS::KC_ABNT_C1;
+	using OIS::KC_CONVERT;
+	using OIS::KC_NOCONVERT;
+	using OIS::KC_YEN;
+	using OIS::KC_ABNT_C2;
+	using OIS::KC_NUMPADEQUALS;
+	using OIS::KC_PREVTRACK;
+	using OIS::KC_AT;
+	using OIS::KC_COLON;
+	using OIS::KC_UNDERLINE;
+	using OIS::KC_KANJI;
+	using OIS::KC_STOP;
+	using OIS::KC_AX;
+	using OIS::KC_UNLABELED;
+	using OIS::KC_NEXTTRACK;
+	using OIS::KC_NUMPADENTER;
+	using OIS::KC_RCONTROL;
+	using OIS::KC_MUTE;
+	using OIS::KC_CALCULATOR;
+	using OIS::KC_PLAYPAUSE;
+	using OIS::KC_MEDIASTOP;
+	using OIS::KC_VOLUMEDOWN;
+	using OIS::KC_VOLUMEUP;
+	using OIS::KC_WEBHOME;
+	using OIS::KC_NUMPADCOMMA;
+	using OIS::KC_DIVIDE;
+	using OIS::KC_SYSRQ;
+	using OIS::KC_RMENU;
+	using OIS::KC_PAUSE;
+	using OIS::KC_HOME;
+	using OIS::KC_UP;
+	using OIS::KC_PGUP;
+	using OIS::KC_LEFT;
+	using OIS::KC_RIGHT;
+	using OIS::KC_END;
+	using OIS::KC_DOWN;
+	using OIS::KC_PGDOWN;
+	using OIS::KC_INSERT;
+	using OIS::KC_DELETE;
+	using OIS::KC_LWIN;
+	using OIS::KC_RWIN;
+	using OIS::KC_APPS;
+	using OIS::KC_POWER;
+	using OIS::KC_SLEEP;
+	using OIS::KC_WAKE;
+	using OIS::KC_WEBSEARCH;
+	using OIS::KC_WEBFAVORITES;
+	using OIS::KC_WEBREFRESH;
+	using OIS::KC_WEBSTOP;
+	using OIS::KC_WEBFORWARD;
+	using OIS::KC_WEBBACK;
+	using OIS::KC_MYCOMPUTER;
+	using OIS::KC_MAIL;
+	using OIS::KC_MEDIASELECT;
+  }
+  typedef OIS::KeyCode KeyCode;*/
+
+  //typedef OIS::MouseButton MouseButton;
+  
+  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
+    };
+  }
+
+  /*using OIS::MB_Left;
+  using OIS::MB_Right;
+  using OIS::MB_Middle;
+  using OIS::MB_Button3;
+  using OIS::MB_Button4;
+  using OIS::MB_Button5;
+  using OIS::MB_Button6;
+  using OIS::MB_Button7;*/
+
+  namespace KeyboardModifier
+  {
+    enum Enum
+    {
+	    Shift = 0x0000001,
+	    Ctrl  = 0x0000010,
+	    Alt   = 0x0000100
+    };
+  }
+
+  class _CoreExport KeyboardState
+  {
+  public:
+  };
+
+  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), JoyStickID(ID) { }
+    JoyStickState() { clear(); }
+    int JoyStickID;
+  };
+
+  /**
+    @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 mouseWheelTurned   (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/branches/input/src/core/InputManager.cc
===================================================================
--- /code/branches/input/src/core/InputManager.cc	(revision 1235)
+++ /code/branches/input/src/core/InputManager.cc	(revision 1236)
@@ -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,9 +52,10 @@
   InputManager::InputManager() :
       inputSystem_(0), keyboard_(0), mouse_(0),
-      state_(IS_UNINIT), stateRequest_(IS_UNINIT)
+      state_(IS_UNINIT), stateRequest_(IS_UNINIT),
+      joySticksSize_(0)
   {
     RegisterObject(InputManager);
 
-    this->joySticks_.reserve(5);
+    //this->joySticks_.reserve(5);
     //this->activeJoyStickHandlers_.reserve(10);
     this->activeKeyHandlers_.reserve(10);
@@ -234,5 +235,5 @@
   bool InputManager::_initialiseJoySticks()
   {
-    if (joySticks_.size() > 0)
+    if (joySticksSize_ > 0)
     {
       CCOUT(2) << "Warning: Joy sticks already initialised, skipping." << std::endl;
@@ -265,4 +266,5 @@
       return false;
     }
+    joySticksSize_ = joySticks_.size();
     return success;
   }
@@ -336,12 +338,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();
@@ -382,7 +385,6 @@
           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"]);
+          for (unsigned int i = 0; i < joySticksSize_; i++)
+            activeJoyStickHandlers_[i].push_back(joyStickHandlers_["keybinder"]);
           break;
 
@@ -393,7 +395,7 @@
         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"]);
+          activeMouseHandlers_.push_back(mouseHandlers_["SpaceShip"]);
+          for (unsigned int i = 0; i < joySticksSize_; i++)
+            activeJoyStickHandlers_[i].push_back(joyStickHandlers_["keybinder"]);
 
           activeKeyHandlers_.push_back(keyHandlers_["buffer"]);
@@ -415,36 +417,20 @@
 
     // 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_.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 +443,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 != 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 +470,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 == 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 +502,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 wheel turned event
+    if (e.state.Z.rel != 0)
+    {
+      for (unsigned int i = 0; i < activeMouseHandlers_.size(); i++)
+        activeMouseHandlers_[i]->mouseWheelTurned(e.state);
+    }
 
     return true;
@@ -518,16 +527,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] != 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 +547,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] == id)
+      {
+        mouseButtonsDown_.erase(mouseButtonsDown_.begin() + iButton);
         break;
       }
@@ -552,5 +557,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 +567,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;
@@ -685,5 +714,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();
   }
 
@@ -1061,5 +1122,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 +1130,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 +1143,5 @@
       }
     }
-    _getSingleton().activeJoyStickHandlers_[joyStick].push_back((*handlerIt).second);
+    _getSingleton().activeJoyStickHandlers_[ID].push_back((*handlerIt).second);
     _getSingleton().stateRequest_ = IS_CUSTOM;
     return true;
@@ -1093,5 +1153,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 +1161,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 +1183,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 +1191,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/branches/input/src/core/InputManager.h
===================================================================
--- /code/branches/input/src/core/InputManager.h	(revision 1235)
+++ /code/branches/input/src/core/InputManager.h	(revision 1236)
@@ -43,11 +43,8 @@
 #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.
@@ -86,4 +83,9 @@
     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
@@ -132,6 +130,4 @@
     void _destroyMouse();
     void _destroyJoySticks();
-
-    //void _setNumberOfJoysticks(int size);
 
     void tick(float dt);
@@ -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/branches/input/src/orxonox/objects/SpaceShip.cc
===================================================================
--- /code/branches/input/src/orxonox/objects/SpaceShip.cc	(revision 1235)
+++ /code/branches/input/src/orxonox/objects/SpaceShip.cc	(revision 1236)
@@ -343,5 +343,5 @@
     }
 
-    bool SpaceShip::mouseMoved(const OIS::MouseEvent &e)
+    bool SpaceShip::mouseMoved(const MouseState& state)
     {
 /*
@@ -360,14 +360,14 @@
         if (this->bRMousePressed_)
         {
-            this->camNode_->roll(Degree(-e.state.X.rel * 0.10));
-            this->camNode_->yaw(Degree(e.state.Y.rel * 0.10));
-        }
-        else
-        {
-            float minDimension = e.state.height;
-            if (e.state.width < minDimension)
-                minDimension = e.state.width;
-
-            this->mouseX_ += e.state.X.rel;
+            this->camNode_->roll(Degree(-state.X.rel * 0.10));
+            this->camNode_->yaw(Degree(state.Y.rel * 0.10));
+        }
+        else
+        {
+            float minDimension = state.height;
+            if (state.width < minDimension)
+                minDimension = state.width;
+
+            this->mouseX_ += state.X.rel;
             if (this->mouseX_ < -minDimension)
                 this->mouseX_ = -minDimension;
@@ -375,5 +375,5 @@
                 this->mouseX_ = minDimension;
 
-            this->mouseY_ += e.state.Y.rel;
+            this->mouseY_ += state.Y.rel;
             if (this->mouseY_ < -minDimension)
                 this->mouseY_ = -minDimension;
@@ -403,9 +403,9 @@
     }
 
-    bool SpaceShip::mousePressed(const OIS::MouseEvent &e, OIS::MouseButtonID id)
-    {
-        if (id == OIS::MB_Left)
+    bool SpaceShip::mouseButtonPressed(const MouseState& state, MouseButton::Enum id)
+    {
+        if (id == MouseButton::Left)
             this->bLMousePressed_ = true;
-        else if (id == OIS::MB_Right)
+        else if (id == MouseButton::Right)
             this->bRMousePressed_ = true;
 
@@ -413,9 +413,9 @@
     }
 
-    bool SpaceShip::mouseReleased(const OIS::MouseEvent &e, OIS::MouseButtonID id)
-    {
-        if (id == OIS::MB_Left)
+    bool SpaceShip::mouseButtonReleased(const MouseState& state, MouseButton::Enum id)
+    {
+        if (id == MouseButton::Left)
             this->bLMousePressed_ = false;
-        else if (id == OIS::MB_Right)
+        else if (id == MouseButton::Right)
         {
             this->bRMousePressed_ = false;
@@ -453,6 +453,4 @@
             this->timeToReload_ = this->reloadTime_;
         }
-
-        OIS::Keyboard* mKeyboard = InputManager::getKeyboard();
 
 
@@ -522,21 +520,21 @@
         }
 
-        if (mKeyboard->isKeyDown(OIS::KC_UP) || mKeyboard->isKeyDown(OIS::KC_W))
+        if (InputManager::isKeyDown(KeyCode::Up) || InputManager::isKeyDown(KeyCode::W))
             this->acceleration_.x = this->translationAcceleration_;
-        else if(mKeyboard->isKeyDown(OIS::KC_DOWN) || mKeyboard->isKeyDown(OIS::KC_S))
+        else if(InputManager::isKeyDown(KeyCode::Down) || InputManager::isKeyDown(KeyCode::S))
             this->acceleration_.x = -this->translationAcceleration_;
         else
             this->acceleration_.x = 0;
 
-        if (mKeyboard->isKeyDown(OIS::KC_RIGHT) || mKeyboard->isKeyDown(OIS::KC_D))
+        if (InputManager::isKeyDown(KeyCode::Right) || InputManager::isKeyDown(KeyCode::D))
             this->acceleration_.y = -this->translationAcceleration_;
-        else if (mKeyboard->isKeyDown(OIS::KC_LEFT) || mKeyboard->isKeyDown(OIS::KC_A))
+        else if (InputManager::isKeyDown(KeyCode::Left) || InputManager::isKeyDown(KeyCode::A))
             this->acceleration_.y = this->translationAcceleration_;
         else
             this->acceleration_.y = 0;
 
-        if (mKeyboard->isKeyDown(OIS::KC_DELETE) || mKeyboard->isKeyDown(OIS::KC_Q))
+        if (InputManager::isKeyDown(KeyCode::Delete) || InputManager::isKeyDown(KeyCode::Q))
             this->momentum_ = Radian(-this->rotationAccelerationRadian_);
-        else if (mKeyboard->isKeyDown(OIS::KC_PGDOWN) || mKeyboard->isKeyDown(OIS::KC_E))
+        else if (InputManager::isKeyDown(KeyCode::PageDown) || InputManager::isKeyDown(KeyCode::E))
             this->momentum_ = Radian(this->rotationAccelerationRadian_);
         else
Index: /code/branches/input/src/orxonox/objects/SpaceShip.h
===================================================================
--- /code/branches/input/src/orxonox/objects/SpaceShip.h	(revision 1235)
+++ /code/branches/input/src/orxonox/objects/SpaceShip.h	(revision 1236)
@@ -34,5 +34,5 @@
 #include <OgrePrerequisites.h>
 
-#include "core/InputHandler.h"
+#include "core/InputInterfaces.h"
 #include "Model.h"
 #include "../tools/BillboardSet.h"
@@ -65,8 +65,9 @@
                 { SpaceShip::instance_s->setMaxSpeed(value); }
 
-            bool mouseMoved(const OIS::MouseEvent &e);
-            bool mousePressed(const OIS::MouseEvent &e, OIS::MouseButtonID id);
-            bool mouseReleased(const OIS::MouseEvent &e, OIS::MouseButtonID id);
-            bool mouseHeld(const OIS::MouseEvent &e, OIS::MouseButtonID id) { return true; }
+            bool mouseButtonPressed (const MouseState& state, MouseButton::Enum id);
+            bool mouseButtonReleased(const MouseState& state, MouseButton::Enum id);
+            bool mouseButtonHeld    (const MouseState& state, MouseButton::Enum id) { return true; }
+            bool mouseMoved         (const MouseState& state);
+            bool mouseWheelTurned   (const MouseState& state) { return true; }
 
 
Index: /code/branches/input/visual_studio/base_properties_debug.vsprops
===================================================================
--- /code/branches/input/visual_studio/base_properties_debug.vsprops	(revision 1235)
+++ /code/branches/input/visual_studio/base_properties_debug.vsprops	(revision 1236)
@@ -13,5 +13,5 @@
 		BasicRuntimeChecks="3"
 		RuntimeLibrary="3"
-		DebugInformationFormat="4"
+		DebugInformationFormat="3"
 	/>
 	<Tool
Index: /code/branches/input/visual_studio/vc8/core.vcproj
===================================================================
--- /code/branches/input/visual_studio/vc8/core.vcproj	(revision 1235)
+++ /code/branches/input/visual_studio/vc8/core.vcproj	(revision 1236)
@@ -351,4 +351,8 @@
 			</File>
 			<File
+				RelativePath="..\..\src\core\InputInterfaces.h"
+				>
+			</File>
+			<File
 				RelativePath="..\..\src\core\InputManager.h"
 				>
