Index: code/branches/input/src/core/CommandExecutor.cc
===================================================================
--- code/branches/input/src/core/CommandExecutor.cc	(revision 1304)
+++ code/branches/input/src/core/CommandExecutor.cc	(revision 1323)
@@ -31,4 +31,5 @@
 #include "util/String.h"
 #include "util/Convert.h"
+#include "util/SubString.h"
 #include "Identifier.h"
 #include "Language.h"
@@ -173,5 +174,5 @@
     }
 
-    KeybindMode CommandEvaluation::getKeybindMode()
+    KeybindMode::Enum CommandEvaluation::getKeybindMode()
     {
         if (this->state_ == CS_Shortcut_Params || this->state_ == CS_Shortcut_Finished)
@@ -198,5 +199,5 @@
         }
         // FIXME: Had to insert a return statement
-        return (KeybindMode)0;
+        return (KeybindMode::Enum)0;
     }
 
Index: code/branches/input/src/core/CommandExecutor.h
===================================================================
--- code/branches/input/src/core/CommandExecutor.h	(revision 1304)
+++ code/branches/input/src/core/CommandExecutor.h	(revision 1323)
@@ -70,6 +70,4 @@
     std::string read(const std::string& filename);
 
-    enum KeybindMode {}; // temporary
-
     ///////////////////////
     // CommandEvaluation //
@@ -82,5 +80,5 @@
             CommandEvaluation();
 
-            KeybindMode getKeybindMode();
+            KeybindMode::Enum getKeybindMode();
             bool isValid() const;
 
@@ -89,5 +87,5 @@
             inline std::string getAdditionalParameter() const
                 { return (this->additionalParameter_ != "") ? (" " + this->additionalParameter_) : ""; }
-            inline std::string getCommandString() const { return this->processedCommand_; }
+            inline Executor* getExecutor() { return 0; }
 
             void setEvaluatedParameter(unsigned int index, MultiTypeMath param);
Index: code/branches/input/src/core/CorePrereqs.h
===================================================================
--- code/branches/input/src/core/CorePrereqs.h	(revision 1304)
+++ code/branches/input/src/core/CorePrereqs.h	(revision 1323)
@@ -78,4 +78,15 @@
 #endif
 
+  namespace KeybindMode
+  {
+    enum Enum
+    {
+      None,
+      OnPress,
+      OnHold,
+      OnRelease
+    };
+  };
+
   typedef std::string LanguageEntryLabel;
 
Index: code/branches/input/src/core/Executor.h
===================================================================
--- code/branches/input/src/core/Executor.h	(revision 1304)
+++ code/branches/input/src/core/Executor.h	(revision 1323)
@@ -233,4 +233,6 @@
             MultiTypeMath defaultValue_[MAX_FUNCTOR_ARGUMENTS];
             bool bAddedDefaultValue_[MAX_FUNCTOR_ARGUMENTS];
+            KeybindMode::Enum keybindMode_;
+            int axisParameter_;
 
         private:
Index: code/branches/input/src/core/InputBuffer.cc
===================================================================
--- code/branches/input/src/core/InputBuffer.cc	(revision 1304)
+++ code/branches/input/src/core/InputBuffer.cc	(revision 1323)
@@ -173,4 +173,8 @@
   }
 
+  /**
+  * This tick() function is called by the InputManager if the InputBuffer is active.
+  * @param dt Delta time
+  */
   void InputBuffer::tick(float dt)
   {
Index: code/branches/input/src/core/InputBuffer.h
===================================================================
--- code/branches/input/src/core/InputBuffer.h	(revision 1304)
+++ code/branches/input/src/core/InputBuffer.h	(revision 1323)
@@ -43,5 +43,5 @@
   {};
 
-  class _CoreExport InputBuffer : public KeyHandler, public TickableReal
+  class _CoreExport InputBuffer : public KeyHandler, public OrxonoxClass
   {
     struct InputBufferListenerTuple
Index: code/branches/input/src/core/InputHandler.cc
===================================================================
--- code/branches/input/src/core/InputHandler.cc	(revision 1304)
+++ code/branches/input/src/core/InputHandler.cc	(revision 1323)
@@ -34,8 +34,11 @@
 #include "InputHandler.h"
 #include "util/Convert.h"
+#include "util/SubString.h"
+#include "util/String.h"
 #include "Debug.h"
 #include "ConfigValueIncludes.h"
 #include "CoreIncludes.h"
 #include "CommandExecutor.h"
+#include "Executor.h"
 
 namespace orxonox
@@ -51,190 +54,214 @@
   {
     RegisterObject(KeyBinder);
-    clearBindings();
-
+    clearBindings(true);
+
+    // keys
     std::string keyNames[] = {
-    "UNASSIGNED",
-    "ESCAPE",
-    "1",
-    "2",
-    "3",
-    "4",
-    "5",
-    "6",
-    "7",
-    "8",
-    "9",
-    "0",
-    "MINUS",
-    "EQUALS",
-    "BACK",
-    "TAB",
-    "Q",
-    "W",
-    "E",
-    "R",
-    "T",
-    "Y",
-    "U",
-    "I",
-    "O",
-    "P",
-    "LBRACKET",
-    "RBRACKET",
-    "RETURN",
-    "LCONTROL",
-    "A",
-    "S",
-    "D",
-    "F",
-    "G",
-    "H",
-    "J",
-    "K",
-    "L",
-    "SEMICOLON",
-    "APOSTROPHE",
-    "GRAVE",
-    "LSHIFT",
-    "BACKSLASH",
-    "Z",
-    "X",
-    "C",
-    "V",
-    "B",
-    "N",
-    "M",
-    "COMMA",
-    "PERIOD",
-    "SLASH",
-    "RSHIFT",
-    "MULTIPLY",
-    "LMENU",
-    "SPACE",
-    "CAPITAL",
-    "F1",
-    "F2",
-    "F3",
-    "F4",
-    "F5",
-    "F6",
-    "F7",
-    "F8",
-    "F9",
-    "F10",
-    "NUMLOCK",
-    "SCROLL",
-    "NUMPAD7",
-    "NUMPAD8",
-    "NUMPAD9",
-    "SUBTRACT",
-    "NUMPAD4",
-    "NUMPAD5",
-    "NUMPAD6",
-    "ADD",
-    "NUMPAD1",
-    "NUMPAD2",
-    "NUMPAD3",
-    "NUMPAD0",
-    "DECIMAL",
-    "","",
-    "OEM_102",
-    "F11",
-    "F12",
-    "","","","","","","","","","","",
-    "F13",
-    "F14",
-    "F15",
-    "","","","","","","","","","",
-    "KANA",
-    "","",
-    "ABNT_C1",
-    "","","","","",
-    "CONVERT",
-    "",
-    "NOCONVERT",
-    "",
-    "YEN",
-    "ABNT_C2",
-    "","","","","","","","","","","","","","",
-    "NUMPADEQUALS",
-    "","",
-    "PREVTRACK",
-    "AT",
-    "COLON",
-    "UNDERLINE",
-    "KANJI",
-    "STOP",
-    "AX",
-    "UNLABELED",
-    "NEXTTRACK",
-    "","",
-    "NUMPADENTER",
-    "RCONTROL",
-    "","",
-    "MUTE",
-    "CALCULATOR",
-    "PLAYPAUSE",
-    "",
-    "MEDIASTOP",
-    "","","","","","","","","",
-    "VOLUMEDOWN",
-    "",
-    "VOLUMEUP",
-    "",
-    "WEBHOME",
-    "NUMPADCOMMA",
-    "",
-    "DIVIDE",
-    "",
-    "SYSRQ",
-    "RMENU",
-    "","","","","","","","","","","","",
-    "PAUSE",
-    "",
-    "HOME",
-    "UP",
-    "PGUP",
-    "",
-    "LEFT",
-    "",
-    "RIGHT",
-    "",
-    "END",
-    "DOWN",
-    "PGDOWN",
-    "INSERT",
-    "DELETE",
-    "","","","","","","",
-    "LWIN",
-    "RWIN",
-    "APPS",
-    "POWER",
-    "SLEEP",
-    "","","",
-    "WAKE",
-    "",
-    "WEBSEARCH",
-    "WEBFAVORITES",
-    "WEBREFRESH",
-    "WEBSTOP",
-    "WEBFORWARD",
-    "WEBBACK",
-    "MYCOMPUTER",
-    "MAIL",
-    "MEDIASELECT"
+      "UNASSIGNED",
+      "ESCAPE",
+      "1",
+      "2",
+      "3",
+      "4",
+      "5",
+      "6",
+      "7",
+      "8",
+      "9",
+      "0",
+      "MINUS",
+      "EQUALS",
+      "BACK",
+      "TAB",
+      "Q",
+      "W",
+      "E",
+      "R",
+      "T",
+      "Y",
+      "U",
+      "I",
+      "O",
+      "P",
+      "LBRACKET",
+      "RBRACKET",
+      "RETURN",
+      "LCONTROL",
+      "A",
+      "S",
+      "D",
+      "F",
+      "G",
+      "H",
+      "J",
+      "K",
+      "L",
+      "SEMICOLON",
+      "APOSTROPHE",
+      "GRAVE",
+      "LSHIFT",
+      "BACKSLASH",
+      "Z",
+      "X",
+      "C",
+      "V",
+      "B",
+      "N",
+      "M",
+      "COMMA",
+      "PERIOD",
+      "SLASH",
+      "RSHIFT",
+      "MULTIPLY",
+      "LMENU",
+      "SPACE",
+      "CAPITAL",
+      "F1",
+      "F2",
+      "F3",
+      "F4",
+      "F5",
+      "F6",
+      "F7",
+      "F8",
+      "F9",
+      "F10",
+      "NUMLOCK",
+      "SCROLL",
+      "NUMPAD7",
+      "NUMPAD8",
+      "NUMPAD9",
+      "SUBTRACT",
+      "NUMPAD4",
+      "NUMPAD5",
+      "NUMPAD6",
+      "ADD",
+      "NUMPAD1",
+      "NUMPAD2",
+      "NUMPAD3",
+      "NUMPAD0",
+      "DECIMAL",
+      "","",
+      "OEM_102",
+      "F11",
+      "F12",
+      "","","","","","","","","","","",
+      "F13",
+      "F14",
+      "F15",
+      "","","","","","","","","","",
+      "KANA",
+      "","",
+      "ABNT_C1",
+      "","","","","",
+      "CONVERT",
+      "",
+      "NOCONVERT",
+      "",
+      "YEN",
+      "ABNT_C2",
+      "","","","","","","","","","","","","","",
+      "NUMPADEQUALS",
+      "","",
+      "PREVTRACK",
+      "AT",
+      "COLON",
+      "UNDERLINE",
+      "KANJI",
+      "STOP",
+      "AX",
+      "UNLABELED",
+      "NEXTTRACK",
+      "","",
+      "NUMPADENTER",
+      "RCONTROL",
+      "","",
+      "MUTE",
+      "CALCULATOR",
+      "PLAYPAUSE",
+      "",
+      "MEDIASTOP",
+      "","","","","","","","","",
+      "VOLUMEDOWN",
+      "",
+      "VOLUMEUP",
+      "",
+      "WEBHOME",
+      "NUMPADCOMMA",
+      "",
+      "DIVIDE",
+      "",
+      "SYSRQ",
+      "RMENU",
+      "","","","","","","","","","","","",
+      "PAUSE",
+      "",
+      "HOME",
+      "UP",
+      "PGUP",
+      "",
+      "LEFT",
+      "",
+      "RIGHT",
+      "",
+      "END",
+      "DOWN",
+      "PGDOWN",
+      "INSERT",
+      "DELETE",
+      "","","","","","","",
+      "LWIN",
+      "RWIN",
+      "APPS",
+      "POWER",
+      "SLEEP",
+      "","","",
+      "WAKE",
+      "",
+      "WEBSEARCH",
+      "WEBFAVORITES",
+      "WEBREFRESH",
+      "WEBSTOP",
+      "WEBFORWARD",
+      "WEBBACK",
+      "MYCOMPUTER",
+      "MAIL",
+      "MEDIASELECT"
     };
-    for (int i = 0; i < numberOfKeys_s; i++)
-      keyNames_[i] = keyNames[i];
-
+    for (int i = 0; i < nKeys_s; i++)
+      namesKeys_[i] = "Key" + keyNames[i];
+
+    // mouse buttons
     std::string mouseButtonNames[] = {
       "MouseLeft", "MouseRight", "MouseMiddle",
       "MouseButton3", "MouseButton4", "MouseButton5",
       "MouseButton6", "MouseButton7" };
-    for (int i = 0; i < numberOfMouseButtons_s; i++)
-      mouseButtonNames_[i] = mouseButtonNames[i];
-
-    for (int i = 0; i < numberOfJoyStickButtons_s; i++)
-      joyStickButtonNames_[i] = "JoyStick" + getConvertedValue<int, std::string>(i);
+    for (int i = 0; i < nMouseButtons_s; i++)
+      namesMouseButtons_[i] = mouseButtonNames[i];
+
+    // joy stick buttons
+    for (int i = 0; i < 32; i++)
+      namesJoyStickButtons_[i] = "JoyButton" + getConvertedValue<int, std::string>(i);
+    for (int i = 32; i < nJoyStickButtons_s; i += 4)
+    {
+		  namesJoyStickButtons_[i + 0] = "JoyPOV" + getConvertedValue<int, std::string>((i - 32)/4 + 1) + "North";
+		  namesJoyStickButtons_[i + 1] = "JoyPOV" + getConvertedValue<int, std::string>((i - 32)/4 + 1) + "South";
+		  namesJoyStickButtons_[i + 2] = "JoyPOV" + getConvertedValue<int, std::string>((i - 32)/4 + 1) + "East";
+		  namesJoyStickButtons_[i + 3] = "JoyPOV" + getConvertedValue<int, std::string>((i - 32)/4 + 1) + "West";
+    }
+
+    // half axes
+    std::string rawNames[nHalfAxes_s/2];
+    rawNames[0] = "MouseX";
+    rawNames[1] = "MouseY";
+    rawNames[2] = "MouseWheel1";
+    rawNames[3] = "MouseWheel2";
+    for (unsigned int i = 4; i < nHalfAxes_s/2; i++)
+      rawNames[i] = "JoyAxis" + getConvertedValue<int, std::string>(i - 3);
+    for (unsigned int i = 0; i < nHalfAxes_s/2; i++)
+    {
+      namesHalfAxes_[i * 2 + 0] = rawNames[i] + "Pos";
+      namesHalfAxes_[i * 2 + 1] = rawNames[i] + "Neg";
+    }
   }
 
@@ -244,4 +271,6 @@
   KeyBinder::~KeyBinder()
   {
+    // almost no destructors required because most of the arrays are static.
+    clearBindings(); // does some destruction work
   }
 
@@ -251,81 +280,211 @@
   void KeyBinder::setConfigValues()
   {
-    ConfigValueContainer* cont;
-    std::string modes[] = {"P_", "R_", "H_"};
-
+    bool success = true;
     // keys
-    for (int i = 0; i < numberOfKeys_s; i++)
-    {
-      for (int j = 0; j < 3; j++)
-      {
-        cont = getIdentifier()->getConfigValueContainer(modes[j] + keyNames_[i]);
-        if (!cont)
-        {
-          cont = new ConfigValueContainer(CFT_Keybindings, getIdentifier(), modes[j] + keyNames_[i], "");
-          getIdentifier()->addConfigValueContainer(modes[j] + keyNames_[i], cont);
-        }
-        switch (j)
-        {
-          case 0:
-            cont->getValue(&bindingsKeyPress_[i].commandStr);
-            break;
-          case 1:
-            cont->getValue(&bindingsKeyRelease_[i].commandStr);
-            break;
-          case 2:
-            cont->getValue(&bindingsKeyHold_[i].commandStr);
-        }
-      }
-    }
-
+    success |= readBindings(namesKeys_, bindingStringsKeys_, bindingsKeys_, nKeys_s);
     // mouse buttons
-    for (int i = 0; i < numberOfMouseButtons_s; i++)
-    {
-      for (int j = 0; j < 3; j++)
-      {
-        cont = getIdentifier()->getConfigValueContainer(modes[j] + mouseButtonNames_[i]);
-        if (!cont)
-        {
-          cont = new ConfigValueContainer(CFT_Keybindings, getIdentifier(), modes[j] + mouseButtonNames_[i], "");
-          getIdentifier()->addConfigValueContainer(modes[j] + mouseButtonNames_[i], cont);
-        }
-        switch (j)
-        {
-          case 0:
-            cont->getValue(&bindingsMouseButtonPress_[i].commandStr);
-            break;
-          case 1:
-            cont->getValue(&bindingsMouseButtonRelease_[i].commandStr);
-            break;
-          case 2:
-            cont->getValue(&bindingsMouseButtonHold_[i].commandStr);
-        }
-      }
-    }
-
+    success |= readBindings(namesMouseButtons_, bindingStringsMouseButtons_, bindingsMouseButtons_, nMouseButtons_s);
     // joy stick buttons
-    for (int i = 0; i < numberOfJoyStickButtons_s; i++)
-    {
-      for (int j = 0; j < 3; j++)
-      {
-        cont = getIdentifier()->getConfigValueContainer(modes[j] + joyStickButtonNames_[i]);
-        if (!cont)
-        {
-          cont = new ConfigValueContainer(CFT_Keybindings, getIdentifier(), modes[j] + joyStickButtonNames_[i], "");
-          getIdentifier()->addConfigValueContainer(modes[j] + joyStickButtonNames_[i], cont);
-        }
-        switch (j)
-        {
-          case 0:
-            cont->getValue(&bindingsJoyStickButtonPress_[i].commandStr);
-            break;
-          case 1:
-            cont->getValue(&bindingsJoyStickButtonRelease_[i].commandStr);
-            break;
-          case 2:
-            cont->getValue(&bindingsJoyStickButtonHold_[i].commandStr);
-        }
-      }
-    }
+    success |= readBindings(namesJoyStickButtons_, bindingStringsJoyStickButtons_,
+        bindingsJoyStickButtons_, nJoyStickButtons_s);
+    // half axes
+    success |= readBindings(namesHalfAxes_, bindingStringsHalfAxes_, bindingsHalfAxes_, nHalfAxes_s);
+    
+    // TODO: what happens if parsing didn't succeed in all parts? nothing?
+  }
+
+  bool KeyBinder::readBindings(std::string* names, std::string* bindingStrings,
+      KeyBindingBundle* bindings, unsigned int size)
+  {
+    for (unsigned int i = 0; i < size; i++)
+    {
+      // config value stuff
+      ConfigValueContainer* cont = getIdentifier()->getConfigValueContainer(names[i]);
+      if (!cont)
+      {
+        cont = new ConfigValueContainer(CFT_Keybindings, getIdentifier(), names[i], "");
+        getIdentifier()->addConfigValueContainer(names[i], cont);
+      }
+      std::string old = bindingStrings[i];
+      cont->getValue(&bindingStrings[i]);
+
+      // keybinder stuff
+      if (old != bindingStrings[i])
+      {
+        // binding has changed
+        if (bindingStrings[i] == "")
+        {
+          // empty binding, occurs at least the first time since init value is " "
+          bindings[i].OnPress.clear();
+          bindings[i].OnRelease.clear();
+          bindings[i].OnHold.clear();
+        }
+        else
+        {
+          // actually parse the command(s)
+          SubString commands(bindingStrings[i], "|", SubString::WhiteSpaces, false,
+              '\\', false, '"', false, '(', ')', false, '\0');
+          bindings[i].OnHold.nCommands = 0;
+          bindings[i].OnHold.commands = new SimpleCommand[64];
+          bindings[i].OnPress.nCommands = 0;
+          bindings[i].OnPress.commands = new SimpleCommand[64];
+          bindings[i].OnRelease.nCommands = 0;
+          bindings[i].OnRelease.commands = new SimpleCommand[64];
+          for (unsigned int iCommand = 0; iCommand < commands.size(); iCommand++)
+          {
+            if (commands[iCommand] != "")
+            {
+              SubString tokens(commands[iCommand], " ", SubString::WhiteSpaces, false,
+                  '\\', false, '"', false, '(', ')', false, '\0');
+              
+              unsigned int iToken = 0;
+
+              // first argument can be OnPress, OnHold OnRelease or nothing
+              KeybindMode::Enum mode = KeybindMode::None;
+              if (getLowercase(tokens[iToken]) == "onpress")
+                mode = KeybindMode::OnPress,   iToken++;
+              if (getLowercase(tokens[iToken]) == "onrelease")
+                mode = KeybindMode::OnRelease, iToken++;
+              if (getLowercase(tokens[iToken]) == "onhold")
+                mode = KeybindMode::OnHold,    iToken++;
+
+              if (iToken == tokens.size())
+                continue;
+
+              SimpleCommand* cmd = new SimpleCommand();
+
+              // second argument can be the amplitude for the case it as an axis command
+              // default amplitude is 1.0f
+              if (getLowercase(tokens[iToken]) == "axisamp")
+              {
+                iToken++;
+                float value;
+                if (iToken == tokens.size() || !convertValue(&value, tokens[iToken]))
+                {
+                  CCOUT(2) << "Error while parsing key binding " << names[i]
+                      << ". Numeric expression expected afer 'AxisAmp', switching to default value" << std::endl;
+                  if (iToken == tokens.size())
+                  {
+                    delete cmd;
+                    continue;
+                  }
+                  cmd->axisModifier = 1.0f;
+                }
+                else
+                  cmd->axisModifier = value;
+                iToken++;
+              }
+              else
+                cmd->axisModifier = 1.0f;
+
+              // no more arguments expected except for the actual command
+              if (iToken == tokens.size())
+              { // no command given
+                delete cmd;
+                continue;
+              }
+              while (iToken != tokens.size())
+                cmd->commandStr += tokens[iToken++] + " ";
+
+              // check whether we exceed 64 commands...
+              if (bindings[i].OnHold.nCommands == 64 || bindings[i].OnPress.nCommands == 64
+                  || bindings[i].OnRelease.nCommands == 64)
+              {
+                CCOUT(2) << "Error while parsing key binding " << names[i]
+                    << ". You shouldn't assign more than 64 key bindings to one key "
+                    << "just to test the parser" << std::endl;
+              }
+
+              // evaluate the command
+              cmd->axisCommand = 0;
+              CommandEvaluation& eval = CommandExecutor::evaluate(cmd->commandStr);
+              // TOOD: check for axis command
+              if (false)
+              {
+                cmd->axisCommand->commandStr = cmd->commandStr;
+                cmd->commandStr = "";
+                cmd->axisCommand->evaluation = eval;
+                // add command to the buffer if not yet existing
+                for (unsigned int iAxisCmd = 0; iAxisCmd < axisCommands_.size(); iAxisCmd++)
+                {
+                  if (getLowercase(axisCommands_[iAxisCmd]->commandStr) == getLowercase(cmd->commandStr))
+                  {
+                    // already in list
+                    cmd->axisCommand = axisCommands_[iAxisCmd];
+                    break;
+                  }
+                }
+                if (cmd->axisCommand == 0)
+                {
+                  cmd->axisCommand = new AxisCommand();
+                  axisCommands_.push_back(cmd->axisCommand);
+                }
+                // TODO: check for relative/absolute command
+                cmd->axisCommand->bRelative = false;
+
+                // axis commands are always OnHold
+                *(bindings[i].OnHold.commands + bindings[i].OnHold.nCommands++) = *cmd;
+              }
+              else
+              {
+                cmd->evaluation = eval;
+
+                // TODO: determine whether the command is OnHold, OnPress or OnRelease
+                switch (mode)
+                {
+                case KeybindMode::None:
+                  *(bindings[i].OnPress.commands + bindings[i].OnPress.nCommands++) = *cmd;
+                  break;
+                case KeybindMode::OnPress:
+                  *(bindings[i].OnPress.commands + bindings[i].OnPress.nCommands++) = *cmd;
+                  break;
+                case KeybindMode::OnHold:
+                  *(bindings[i].OnHold.commands + bindings[i].OnHold.nCommands++) = *cmd;
+                  break;
+                case KeybindMode::OnRelease:
+                  *(bindings[i].OnRelease.commands + bindings[i].OnRelease.nCommands++) = *cmd;
+                  break;                      
+                }
+              }
+            }
+          }
+
+          // redimension arrays with simple commands
+          SimpleCommand* sCmd = bindings[i].OnHold.commands;
+          if (bindings[i].OnHold.nCommands)
+          {
+            bindings[i].OnHold.commands = new SimpleCommand[bindings[i].OnHold.nCommands];
+            for (unsigned int iCmd = 0; iCmd < bindings[i].OnHold.nCommands; iCmd++)
+              bindings[i].OnHold.commands[iCmd] = sCmd[iCmd];
+          }
+          else
+            bindings[i].OnHold.commands = 0;
+          delete[] sCmd;
+
+          sCmd = bindings[i].OnPress.commands;
+          if (bindings[i].OnPress.nCommands)
+          {
+            bindings[i].OnPress.commands = new SimpleCommand[bindings[i].OnPress.nCommands];
+            for (unsigned int iCmd = 0; iCmd < bindings[i].OnPress.nCommands; iCmd++)
+              bindings[i].OnPress.commands[iCmd] = sCmd[iCmd];
+          }
+          else
+            bindings[i].OnPress.commands = 0;
+          delete[] sCmd;
+
+          sCmd = bindings[i].OnRelease.commands;
+          if (bindings[i].OnRelease.nCommands)
+          {
+            bindings[i].OnRelease.commands = new SimpleCommand[bindings[i].OnRelease.nCommands];
+            for (unsigned int iCmd = 0; iCmd < bindings[i].OnRelease.nCommands; iCmd++)
+              bindings[i].OnRelease.commands[iCmd] = sCmd[iCmd];
+          }
+          else
+            bindings[i].OnRelease.commands = 0;
+          delete[] sCmd;
+        }
+      }
+    }
+    return true;
   }
 
@@ -333,24 +492,45 @@
     @brief Overwrites all bindings with ""
   */
-  void KeyBinder::clearBindings()
-  {
-    for (int i = 0; i < numberOfKeys_s; i++)
-    {
-      bindingsKeyPress_  [i].commandStr = "";
-      bindingsKeyRelease_[i].commandStr = "";
-      bindingsKeyHold_   [i].commandStr = "";
-    }
-    for (int i = 0; i < numberOfMouseButtons_s; i++)
-    {
-      bindingsMouseButtonPress_  [i].commandStr = "";
-      bindingsMouseButtonRelease_[i].commandStr = "";
-      bindingsMouseButtonHold_   [i].commandStr = "";
-    }
-    for (int i = 0; i < numberOfJoyStickButtons_s; i++)
-    {
-      bindingsJoyStickButtonPress_  [i].commandStr = "";
-      bindingsJoyStickButtonRelease_[i].commandStr = "";
-      bindingsJoyStickButtonHold_   [i].commandStr = "";
-    }
+  void KeyBinder::clearBindings(bool bInit)
+  {
+    for (int i = 0; i < nKeys_s; i++)
+    {
+      clearBundle(bindingsKeys_[i], bInit);
+      bindingStringsKeys_[i] = " ";
+    }
+    for (int i = 0; i < nMouseButtons_s; i++)
+    {
+      clearBundle(bindingsMouseButtons_[i], bInit);
+      bindingStringsMouseButtons_[i] = " ";
+    }
+    for (int i = 0; i < nJoyStickButtons_s; i++)
+    {
+      clearBundle(bindingsJoyStickButtons_[i], bInit);
+      bindingStringsJoyStickButtons_[i] = " ";
+    }
+    for (int i = 0; i < nHalfAxes_s; i++)
+    {
+      clearBundle(bindingsHalfAxes_[i], bInit);
+      bindingStringsHalfAxes_[i] = " ";
+    }
+    for (unsigned int i = 0; i < axisCommands_.size(); i++)
+      delete axisCommands_[i];
+    axisCommands_.clear();
+  }
+
+  void KeyBinder::clearBundle(KeyBindingBundle& bundle, bool bInit)
+  {
+    if (!bInit)
+    {
+      if (bundle.OnHold.nCommands)
+        delete[] bundle.OnHold.commands;
+      if (bundle.OnPress.nCommands)
+        delete[] bundle.OnPress.commands;
+      if (bundle.OnRelease.nCommands)
+        delete[] bundle.OnRelease.commands;
+    }
+    bundle.OnPress.nCommands = 0;
+    bundle.OnHold.nCommands = 0;
+    bundle.OnRelease.nCommands = 0;
   }
 
@@ -361,38 +541,98 @@
   bool KeyBinder::loadBindings()
   {
-    COUT(ORX_DEBUG) << "KeyBinder: Loading key bindings..." << std::endl;
+    COUT(3) << "KeyBinder: Loading key bindings..." << std::endl;
+
+    // clear half axes
+    for (unsigned int i = 0; i < nHalfAxes_s; i++)
+    {
+      halfAxes_[i].hasChanged = false;
+      halfAxes_[i].abs = 0.0f;
+      halfAxes_[i].rel = 0.0f;
+      halfAxes_[i].wasDown = false;
+      halfAxes_[i].threshold = 0.01f;
+    }
 
     ConfigFileManager::getSingleton()->setFile(CFT_Keybindings, "keybindings.ini");
+    clearBindings();
     setConfigValues();
 
-    // 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();
-      }
-    }
-
-    COUT(ORX_DEBUG) << "KeyBinder: Loading key bindings done." << std::endl;
-    return true;
-  }
-
-  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(ORX_DEBUG) << "Keybinding: Executing command: " << binding.commandStr << std::endl;
-      CommandExecutor::execute(binding.commandStr);
-    }
-
+    COUT(3) << "KeyBinder: Loading key bindings done." << std::endl;
+    return true;
+  }
+
+  void KeyBinder::tick(float dt)
+  {
+    // we have to process all the analog input since there is e.g. no 'mouseDoesntMove' event.
+    for (unsigned int i = 0; i < nHalfAxes_s; i++)
+    {
+      if (!halfAxes_[i].hasChanged)
+      {
+        if (!halfAxes_[i].wasDown && halfAxes_[i].abs > halfAxes_[i].threshold)
+        {
+          halfAxes_[i].wasDown = true;
+          if (bindingsHalfAxes_[i].OnPress.nCommands)
+            executeBinding(bindingsHalfAxes_[i].OnPress, halfAxes_[i].rel, halfAxes_[i].abs);
+        }
+        else if (halfAxes_[i].wasDown && halfAxes_[i].abs < halfAxes_[i].threshold)
+        {
+          halfAxes_[i].wasDown = false;
+          if (bindingsHalfAxes_[i].OnRelease.nCommands)
+            executeBinding(bindingsHalfAxes_[i].OnRelease, halfAxes_[i].rel, halfAxes_[i].abs);
+        }
+        if (halfAxes_[i].wasDown)
+        {
+          executeBinding(bindingsHalfAxes_[i].OnHold, halfAxes_[i].rel, halfAxes_[i].abs);
+        }
+        halfAxes_[i].hasChanged = false;
+      }
+    }
+
+    // execute all buffered bindings (addional parameter)
+    for (unsigned int i = 0; i < axisCommands_.size(); i++)
+    {
+      if (axisCommands_[i]->nValuesAdded > 0)
+      {
+        axisCommands_[i]->evaluation.setEvaluatedParameter(0, axisCommands_[i]->value);
+        // reset
+        axisCommands_[i]->nValuesAdded = 0;
+        axisCommands_[i]->value = 0.0f;
+      }
+    }
+  }
+
+  bool KeyBinder::executeBinding(KeyBinding& binding, float axisRel, float axisAbs)
+  {
+    // execute all the parsed commands in the string
+    for (unsigned int iCommand = 0; iCommand < binding.nCommands; iCommand++)
+    {
+      SimpleCommand& command = binding.commands[iCommand];
+      if (command.axisCommand)
+      {
+        AxisCommand& axisCommand = *command.axisCommand;
+        // command has an additional parameter
+        if (command.axisCommand->bRelative)
+        {
+          // we have to calculate a relative movement.
+          // amplitude says how much one keystroke is
+          axisCommand.value += command.axisModifier * axisRel;
+        }
+        else
+        {
+          // we have to calculate absolute position of the axis.
+          // for a key this simply is 1, but multiplied by a user defined factor
+          // since there might be another axis that is affected, we have to wait and
+          // store the result in a temporary place
+          axisCommand.value =
+              (axisCommand.value * (axisCommand.nValuesAdded++) + command.axisModifier * axisAbs)
+              / axisCommand.nValuesAdded;
+        }
+      }
+      else
+      {
+        // simple command, just execute directly
+        // TODO: calculate whether this a Press, Release or Hold event
+        CommandExecutor::execute(command.evaluation);
+      }
+    }
     return true;
   }
@@ -406,5 +646,5 @@
   {
     // find the appropriate key binding
-    executeSimpleBinding(bindingsKeyPress_[int(evt.key)]);
+    executeBinding(bindingsKeys_[int(evt.key)].OnPress, 1.0, 1.0);
 
     return true;
@@ -418,5 +658,5 @@
   {
     // find the appropriate key binding
-    executeSimpleBinding(bindingsKeyRelease_[int(evt.key)]);
+    executeBinding(bindingsKeys_[int(evt.key)].OnRelease, 1.0, 1.0);
 
     return true;
@@ -430,5 +670,5 @@
   {
     // find the appropriate key binding
-    executeSimpleBinding(bindingsKeyHold_[int(evt.key)]);
+    executeBinding(bindingsKeys_[int(evt.key)].OnHold, 1.0, 1.0);
 
     return true;
@@ -439,19 +679,114 @@
     @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);
-    }*/
+  bool KeyBinder::mouseMoved(IntVector2 abs, IntVector2 rel, IntVector2 clippingSize)
+  {
+    halfAxes_[0].hasChanged = true;
+    halfAxes_[1].hasChanged = true;
+    halfAxes_[2].hasChanged = true;
+    halfAxes_[3].hasChanged = true;
+    // translate absolute mouse position into joystick like behaviour
+    if (clippingSize.x > clippingSize.y)
+    {
+      int margin = (clippingSize.x - clippingSize.y) / 2;
+      if (abs.x - margin > clippingSize.y)
+      {
+        halfAxes_[0].abs = 1.0f;
+        halfAxes_[1].abs = 0.0f;
+      }
+      else if (abs.x < margin)
+      {
+        halfAxes_[0].abs = 0.0f;
+        halfAxes_[1].abs = 1.0f;
+      }
+      else
+      {
+        float temp = ((float)abs.x) / clippingSize.y * 2 - 1;
+        if (temp > 0)
+        {
+          halfAxes_[0].abs = temp;
+          halfAxes_[1].abs = 0.0f;
+        }
+        else
+        {
+          halfAxes_[0].abs = 0.0f;
+          halfAxes_[1].abs = -temp;
+        }
+      }
+
+      float temp = -((float)abs.y) / clippingSize.y * 2 + 1;
+      if (temp > 0)
+      {
+        halfAxes_[2].abs = temp;
+        halfAxes_[3].abs = 0.0;
+      }
+      else
+      {
+        halfAxes_[2].abs = 0.0;
+        halfAxes_[3].abs = -temp;
+      }
+    }
+    else
+    {
+      float temp = ((float)abs.x) / clippingSize.x * 2 - 1;
+      if (temp > 0)
+      {
+        halfAxes_[0].abs = temp;
+        halfAxes_[1].abs = 0.0;
+      }
+      else
+      {
+        halfAxes_[0].abs = 0.0;
+        halfAxes_[1].abs = -temp;
+      }
+
+      int margin = (clippingSize.y - clippingSize.x) / 2;
+      if (abs.y - margin > clippingSize.x)
+      {
+        halfAxes_[2].abs = 0.0;
+        halfAxes_[3].abs = 1.0;
+      }
+      else if (abs.y < margin)
+      {
+        halfAxes_[2].abs = 1.0;
+        halfAxes_[3].abs = 0.0;
+      }
+      else
+      {
+        float temp = -((float)abs.y) / clippingSize.x * 2 + 1;
+        if (temp > 0)
+        {
+          halfAxes_[2].abs = temp;
+          halfAxes_[3].abs = 0.0;
+        }
+        else
+        {
+          halfAxes_[2].abs = 0.0;
+          halfAxes_[3].abs = -temp;
+        }
+      }
+    }
+    
+    // relative movements
+    if (rel.x > 0)
+    {
+      halfAxes_[0].rel = rel.x;
+      halfAxes_[1].rel = 0.0;
+    }
+    else
+    {
+      halfAxes_[0].rel = 0.0;
+      halfAxes_[1].rel = rel.x;
+    }
+
+    if (rel.y /*!*/ < /*!*/ 0)
+    {
+      halfAxes_[0].rel = -rel.y;
+      halfAxes_[1].rel = 0.0;
+    }
+    else
+    {
+      halfAxes_[0].rel = 0.0;
+      halfAxes_[1].rel = -rel.y;
+    }
 
     return true;
@@ -462,6 +797,7 @@
     @param e Mouse state information
   */
-  bool KeyBinder::mouseScrolled(const MouseState &evt)
-  {
+  bool KeyBinder::mouseScrolled(int abs, int rel)
+  {
+    // TODO: obvious...
     return true;
   }
@@ -472,8 +808,8 @@
     @param id The ID of the mouse button
   */
-  bool KeyBinder::mouseButtonPressed(const MouseState& state, MouseButton::Enum id)
+  bool KeyBinder::mouseButtonPressed(MouseButton::Enum id)
   {
     // find the appropriate key binding
-    executeSimpleBinding(bindingsMouseButtonPress_[int(id)]);
+    executeBinding(bindingsMouseButtons_[int(id)].OnPress, 1.0, 1.0);
 
     return true;
@@ -485,8 +821,8 @@
     @param id The ID of the mouse button
   */
-  bool KeyBinder::mouseButtonReleased(const MouseState& state, MouseButton::Enum id)
+  bool KeyBinder::mouseButtonReleased(MouseButton::Enum id)
   {
     // find the appropriate key binding
-    executeSimpleBinding(bindingsMouseButtonRelease_[int(id)]);
+    executeBinding(bindingsMouseButtons_[int(id)].OnRelease, 1.0, 1.0);
 
     return true;
@@ -498,56 +834,52 @@
     @param id The ID of the mouse button
   */
-  bool KeyBinder::mouseButtonHeld(const MouseState& state, MouseButton::Enum id)
+  bool KeyBinder::mouseButtonHeld(MouseButton::Enum id)
   {
     // find the appropriate key binding
-    executeSimpleBinding(bindingsMouseButtonHold_[int(id)]);
-
-    return true;
-  }
-
-  bool KeyBinder::joyStickButtonPressed(const JoyStickState& state, int button)
+    executeBinding(bindingsMouseButtons_[int(id)].OnHold, 1.0, 1.0);
+
+    return true;
+  }
+
+  bool KeyBinder::joyStickButtonPressed(int joyStickID, int button)
   {
     // find the appropriate key binding
-    executeSimpleBinding(bindingsJoyStickButtonPress_[button]);
-
-    return true;
-  }
-
-  bool KeyBinder::joyStickButtonReleased(const JoyStickState& state, int button)
+    executeBinding(bindingsJoyStickButtons_[button].OnPress, 1.0, 1.0);
+
+    return true;
+  }
+
+  bool KeyBinder::joyStickButtonReleased(int joyStickID, int button)
   {
     // find the appropriate key binding
-    executeSimpleBinding(bindingsJoyStickButtonRelease_[button]);
-
-    return true;
-  }
-
-  bool KeyBinder::joyStickButtonHeld(const JoyStickState& state, int button)
+    executeBinding(bindingsJoyStickButtons_[button].OnRelease, 1.0, 1.0);
+
+    return true;
+  }
+
+  bool KeyBinder::joyStickButtonHeld(int joyStickID, 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;
-  }
-
+    executeBinding(bindingsJoyStickButtons_[button].OnHold, 1.0, 1.0);
+
+    return true;
+  }
+
+  bool KeyBinder::joyStickAxisMoved(int joyStickID, int axis, int value)
+  {
+    // TODO: check whether 16 bit integer as general axis value is a good idea (works under windows)
+    halfAxes_[8 + axis].hasChanged = true;
+    if (value >= 0)
+    {
+      halfAxes_[8 + axis].abs = ((float)value)/0x1000;
+      halfAxes_[8 + axis].hasChanged = true;
+    }
+    else
+    {
+      halfAxes_[8 + axis + 1].abs = -((float)value)/0x1000;
+      halfAxes_[8 + axis + 1].hasChanged = true;
+    }
+    return true;
+  }
 
 
Index: code/branches/input/src/core/InputHandler.h
===================================================================
--- code/branches/input/src/core/InputHandler.h	(revision 1304)
+++ code/branches/input/src/core/InputHandler.h	(revision 1323)
@@ -40,4 +40,5 @@
 
 #include "ois/OIS.h"
+#include "util/Math.h"
 #include "OrxonoxClass.h"
 #include "CommandExecutor.h"
@@ -46,21 +47,47 @@
 namespace orxonox
 {
-  namespace KeybindSetting
-  {
-    enum KeybindSetting
-    {
-      None,
-      OnPress,
-      OnRelease,
-      Continuous,
-    };
-  }
-
-  struct _CoreExport KeyBinding
+  struct _CoreExport AxisCommand
   {
     std::string commandStr;
     CommandEvaluation evaluation;
-  };
- 
+    bool bRelative;
+    float value;
+    unsigned int nValuesAdded;
+  };
+
+  struct _CoreExport SimpleCommand
+  {
+    // for simple binding; direct
+    std::string commandStr;
+    CommandEvaluation evaluation;
+
+    // axis binding; buffered
+    AxisCommand* axisCommand;
+    float axisModifier;
+  };
+
+  struct _CoreExport KeyBinding
+  {
+    void clear() { commands = 0; nCommands = 0; }
+    SimpleCommand* commands;
+    unsigned int nCommands;
+  };
+
+  struct _CoreExport KeyBindingBundle
+  {
+    KeyBinding OnPress;
+    KeyBinding OnRelease;
+    KeyBinding OnHold;
+  };
+
+  struct _CoreExport HalfAxis
+  {
+    float rel;
+    float abs;
+    float threshold;
+    bool wasDown;
+    bool hasChanged;
+  };
+
 
   /**
@@ -75,11 +102,14 @@
 
     bool loadBindings();
-    void clearBindings();
+    void clearBindings(bool bInit = false);
 
     void setConfigValues();
 
   private: // functions
-
-    bool executeSimpleBinding(KeyBinding &binding);
+    bool readBindings(std::string* names, std::string* bindingStrings, KeyBindingBundle* bindings, unsigned int size);
+    bool executeBinding(KeyBinding& binding, float axisRel, float axisAbs);
+    void clearBundle(KeyBindingBundle& bundle, bool bInit);
+
+    void tick(float dt);
 
     bool keyPressed (const KeyEvent& evt);
@@ -87,57 +117,68 @@
     bool keyHeld    (const KeyEvent& evt);
 
-    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 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) ;
+    bool mouseButtonPressed (MouseButton::Enum id);
+    bool mouseButtonReleased(MouseButton::Enum id);
+    bool mouseButtonHeld    (MouseButton::Enum id);
+    bool mouseMoved         (IntVector2 abs, IntVector2 rel, IntVector2 clippingSize);
+    bool mouseScrolled      (int abs, int rel);
+
+    bool joyStickButtonPressed (int joyStickID, int button);
+    bool joyStickButtonReleased(int joyStickID, int button);
+    bool joyStickButtonHeld    (int joyStickID, int button);
+    bool joyStickAxisMoved     (int joyStickID, int axis, int value)  ;
 
   private: // variables
-
     //! denotes the number of different keys there are in OIS.
-    static const int numberOfKeys_s = 0xEE;
-    //! Array of input events for every pressed key
-    KeyBinding bindingsKeyPress_  [numberOfKeys_s];
-    //! Array of input events for every released key
-    KeyBinding bindingsKeyRelease_[numberOfKeys_s];
-    //! Array of input events for every held key
-    KeyBinding bindingsKeyHold_   [numberOfKeys_s];
+    static const unsigned int nKeys_s = 0xEE;
+    //! Actual key bindings as bundle for Press, Hold and Release
+    KeyBindingBundle bindingsKeys_ [nKeys_s];
     //! Names of the keys as strings
-    std::string keyNames_[numberOfKeys_s];
+    std::string namesKeys_         [nKeys_s];
+    //! The configured string values
+    std::string bindingStringsKeys_[nKeys_s];
 
     //! denotes the number of different mouse buttons there are in OIS.
-    static const int numberOfMouseButtons_s = 8;
-    //! Array of input events for every pressed mouse button
-    KeyBinding bindingsMouseButtonPress_  [numberOfMouseButtons_s];
-    //! Array of input events for every released mouse button
-    KeyBinding bindingsMouseButtonRelease_[numberOfMouseButtons_s];
-    //! Array of input events for every held mouse button
-    KeyBinding bindingsMouseButtonHold_   [numberOfMouseButtons_s];
-    //! Key binding for mouse moved event
-    KeyBinding bindingMouseMoved_;
-    //! Key binding for mouse scrolled event
-    KeyBinding bindingMouseScrolled_;
+    static const unsigned int nMouseButtons_s = 8;
+    //! Actual key bindings as bundle for Press, Hold and Release
+    KeyBindingBundle bindingsMouseButtons_ [nMouseButtons_s];
     //! Names of the mouse buttons as strings
-    std::string mouseButtonNames_[numberOfMouseButtons_s];
+    std::string namesMouseButtons_         [nMouseButtons_s];
+    //! The configured string values
+    std::string bindingStringsMouseButtons_[nMouseButtons_s];
 
     //! denotes the number of different joy stick buttons there are in OIS.
-    static const int numberOfJoyStickButtons_s = 32;
-    //! Array of input events for every pressed joy stick button
-    KeyBinding bindingsJoyStickButtonPress_  [numberOfJoyStickButtons_s];
-    //! Array of input events for every released joy stick button
-    KeyBinding bindingsJoyStickButtonRelease_[numberOfJoyStickButtons_s];
-    //! Array of input events for every held joy stick button
-    KeyBinding bindingsJoyStickButtonHold_   [numberOfJoyStickButtons_s];
+    static const unsigned int nJoyStickButtons_s = 32 + 4 * 4; // 32 buttons and 4 POVs with 4 buttons
+    //! Actual key bindings as bundle for Press, Hold and Release
+    KeyBindingBundle bindingsJoyStickButtons_ [nJoyStickButtons_s];
     //! Names of the joy stick buttons as strings
-    std::string joyStickButtonNames_[numberOfJoyStickButtons_s];
-
+    std::string namesJoyStickButtons_         [nJoyStickButtons_s];
+    //! The configured string values
+    std::string bindingStringsJoyStickButtons_[nJoyStickButtons_s];
+
+    //! denotes the number of half axes (every axis twice) there can be.
+    static const unsigned int nHalfAxes_s = 56;
+    /**
+    * Array with all the half axes for mouse and joy sticks.
+    * Bear in mind that the positions are fixed and that the first entry is the
+    * positive one and the second is negative.
+    * Sequence is as follows:
+    *  0 -  3: Mouse x and y
+    *  4 -  7: Mouse scroll wheels 1 and 2 (2 not yet supported)
+    *  8 - 23: joy stick (slider) axes 1 to 8
+    * 24 - 55: joy stick axes 1 - 16
+    */
+    HalfAxis halfAxes_[nHalfAxes_s];
+    //! Actual key bindings as bundle for Press, Hold and Release
+    KeyBindingBundle bindingsHalfAxes_ [nHalfAxes_s];
+    //! Names of the half axes
+    std::string namesHalfAxes_         [nHalfAxes_s];
+    //! The configured string values
+    std::string bindingStringsHalfAxes_[nHalfAxes_s];
+
+    /**
+    * Commands that have additional parameters (axes) are executed at the end of
+    * the tick() so that all values can be buffered for single execution.
+    */
+    std::vector<AxisCommand*> axisCommands_;
   };
 
Index: code/branches/input/src/core/InputInterfaces.h
===================================================================
--- code/branches/input/src/core/InputInterfaces.h	(revision 1304)
+++ code/branches/input/src/core/InputInterfaces.h	(revision 1323)
@@ -38,4 +38,5 @@
 
 #include "ois/OIS.h"
+#include "util/Math.h"
 
 namespace orxonox
@@ -239,7 +240,7 @@
   };
 
-  typedef OIS::MouseState MouseState;
-
-  class _CoreExport JoyStickState : OIS::JoyStickState
+  //typedef OIS::MouseState MouseState;
+
+  /*class _CoreExport JoyStickState
   {
   public:
@@ -247,4 +248,16 @@
     JoyStickState() { clear(); }
     int mJoyStickID;
+		JoyStickState() { clear(); }
+
+		std::vector<bool> mButtons;
+		int axes[16];
+		std::vector<Vector3> mVectors;
+  };*/
+
+  class _CoreExport InputTickable
+  {
+  public:
+    virtual ~InputTickable() { }
+    virtual void tick(float dt) = 0;
   };
 
@@ -252,5 +265,5 @@
     @brief Interface class used for key input listeners.
   */
-  class _CoreExport KeyHandler
+  class _CoreExport KeyHandler : virtual public InputTickable
   {
   public:
@@ -264,13 +277,13 @@
     @brief Interface class used for mouse input listeners.
   */
-  class _CoreExport MouseHandler 
+  class _CoreExport MouseHandler : virtual public InputTickable
   {
   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;
+    virtual bool mouseButtonPressed (MouseButton::Enum id) = 0;
+    virtual bool mouseButtonReleased(MouseButton::Enum id) = 0;
+    virtual bool mouseButtonHeld    (MouseButton::Enum id) = 0;
+    virtual bool mouseMoved         (IntVector2 abs, IntVector2 rel, IntVector2 clippingSize) = 0;
+    virtual bool mouseScrolled      (int abs, int rel)     = 0;
   };
 
@@ -279,15 +292,13 @@
     @brief Interface class used for joy stick input listeners.
   */
-  class _CoreExport JoyStickHandler
+  class _CoreExport JoyStickHandler : virtual public InputTickable
   {
   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;}
+    virtual bool joyStickButtonPressed (int joyStickID, int button) = 0;
+    virtual bool joyStickButtonReleased(int joyStickID, int button) = 0;
+    virtual bool joyStickButtonHeld    (int joyStickID, int button) = 0;
+    virtual bool joyStickAxisMoved     (int joyStickID, int axis, int value) = 0;
+    //virtual bool joyStickVector3Moved  (int joyStickID, int index /*, fill list*/) {return true;}
   };
 
Index: code/branches/input/src/core/InputManager.cc
===================================================================
--- code/branches/input/src/core/InputManager.cc	(revision 1304)
+++ code/branches/input/src/core/InputManager.cc	(revision 1323)
@@ -267,4 +267,6 @@
     activeJoyStickHandlers_.resize(joySticksSize_);
     joyStickButtonsDown_.resize(joySticksSize_);
+    povStates_.resize(joySticksSize_);
+    sliderStates_.resize(joySticksSize_);
     return success;
   }
@@ -348,4 +350,22 @@
     }
     CCOUT(ORX_DEBUG) << "Joy sticks destroyed." << std::endl;
+  }
+
+  void InputManager::_updateTickables()
+  {
+    // we can use a set to have a list of unique pointers (an object can implement all 3 handlers)
+    std::set<InputTickable*> tempSet;
+    for (unsigned int iHandler = 0; iHandler < activeKeyHandlers_.size(); iHandler++)
+      tempSet.insert(activeKeyHandlers_[iHandler]);
+    for (unsigned int iHandler = 0; iHandler < activeMouseHandlers_.size(); iHandler++)
+      tempSet.insert(activeMouseHandlers_[iHandler]);
+    for (unsigned int iJoyStick  = 0; iJoyStick < joySticksSize_; iJoyStick++)
+      for (unsigned int iHandler = 0; iHandler  < activeJoyStickHandlers_[iJoyStick].size(); iHandler++)
+        tempSet.insert(activeJoyStickHandlers_[iJoyStick][iHandler]);
+
+    // copy the content of the set back to the actual vector
+    activeHandlers_.clear();
+    for (std::set<InputTickable*>::const_iterator itHandler = tempSet.begin(); itHandler != tempSet.end(); itHandler++)
+      activeHandlers_.push_back(*itHandler);
   }
 
@@ -389,5 +409,5 @@
 
         case IS_GUI:
-          // FIXME: do stuff
+          // TODO: do stuff
           break;
 
@@ -426,5 +446,5 @@
     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]);
+        activeMouseHandlers_[iHandler]->mouseButtonHeld(mouseButtonsDown_[iButton]);
 
     // call all the handlers for the held joy stick button events
@@ -432,6 +452,10 @@
       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]);
+          activeJoyStickHandlers_[iJoyStick][iHandler]->joyStickButtonHeld(iJoyStick, joyStickButtonsDown_[iJoyStick][iButton]);
+
+
+    // call the ticks
+    for (unsigned int iHandler = 0; iHandler < activeHandlers_.size(); iHandler++)
+      activeHandlers_[iHandler]->tick(dt);
   }
 
@@ -508,5 +532,6 @@
     {
       for (unsigned int i = 0; i < activeMouseHandlers_.size(); i++)
-        activeMouseHandlers_[i]->mouseMoved(e.state);
+        activeMouseHandlers_[i]->mouseMoved(IntVector2(e.state.X.abs, e.state.Y.abs),
+            IntVector2(e.state.X.rel, e.state.Y.rel), IntVector2(e.state.width, e.state.height));
     }
 
@@ -515,5 +540,5 @@
     {
       for (unsigned int i = 0; i < activeMouseHandlers_.size(); i++)
-        activeMouseHandlers_[i]->mouseScrolled(e.state);
+        activeMouseHandlers_[i]->mouseScrolled(e.state.Z.abs, e.state.Z.rel);
     }
 
@@ -536,5 +561,5 @@
 
     for (unsigned int i = 0; i < activeMouseHandlers_.size(); i++)
-      activeMouseHandlers_[i]->mouseButtonPressed(e.state, (MouseButton::Enum)id);
+      activeMouseHandlers_[i]->mouseButtonPressed((MouseButton::Enum)id);
 
     return true;
@@ -559,5 +584,5 @@
 
     for (unsigned int i = 0; i < activeMouseHandlers_.size(); i++)
-      activeMouseHandlers_[i]->mouseButtonReleased(e.state, (MouseButton::Enum)id);
+      activeMouseHandlers_[i]->mouseButtonReleased((MouseButton::Enum)id);
 
     return true;
@@ -584,5 +609,5 @@
 
     for (unsigned int iHandler = 0; iHandler < activeJoyStickHandlers_[iJoyStick].size(); iHandler++)
-      activeJoyStickHandlers_[iJoyStick][iHandler]->joyStickButtonPressed(JoyStickState(arg.state, iJoyStick), button);
+      activeJoyStickHandlers_[iJoyStick][iHandler]->joyStickButtonPressed(iJoyStick, button);
 
     return true;
@@ -609,5 +634,5 @@
 
     for (unsigned int iHandler = 0; iHandler < activeJoyStickHandlers_[iJoyStick].size(); iHandler++)
-      activeJoyStickHandlers_[iJoyStick][iHandler]->joyStickButtonReleased(JoyStickState(arg.state, iJoyStick), button);
+      activeJoyStickHandlers_[iJoyStick][iHandler]->joyStickButtonReleased(iJoyStick, button);
 
     return true;
@@ -616,4 +641,5 @@
   bool InputManager::axisMoved(const OIS::JoyStickEvent &arg, int axis)
   {
+    //CCOUT(3) << arg.state.mAxes[axis].abs << std::endl;
     // use the device to identify which one called the method
     OIS::JoyStick* joyStick = (OIS::JoyStick*)arg.device;
@@ -622,6 +648,7 @@
       iJoyStick++;
 
+    // keep in mind that the first 8 axes are reserved for the sliders
     for (unsigned int iHandler = 0; iHandler < activeJoyStickHandlers_[iJoyStick].size(); iHandler++)
-      activeJoyStickHandlers_[iJoyStick][iHandler]->joyStickAxisMoved(JoyStickState(arg.state, iJoyStick), axis);
+      activeJoyStickHandlers_[iJoyStick][iHandler]->joyStickAxisMoved(iJoyStick, axis + 8, arg.state.mAxes[axis].abs);
 
     return true;
@@ -630,4 +657,5 @@
   bool InputManager::sliderMoved(const OIS::JoyStickEvent &arg, int id)
   {
+    //CCOUT(3) << arg.state.mSliders[id].abX << "\t |" << arg.state.mSliders[id].abY << std::endl;
     // use the device to identify which one called the method
     OIS::JoyStick* joyStick = (OIS::JoyStick*)arg.device;
@@ -636,6 +664,18 @@
       iJoyStick++;
 
-    for (unsigned int iHandler = 0; iHandler < activeJoyStickHandlers_[iJoyStick].size(); iHandler++)
-      activeJoyStickHandlers_[iJoyStick][iHandler]->joyStickSliderMoved(JoyStickState(arg.state, iJoyStick), id);
+    if (sliderStates_[iJoyStick].sliderStates[id].x != arg.state.mSliders[id].abX)
+    {
+      // slider X axis changed
+      sliderStates_[iJoyStick].sliderStates[id].x = arg.state.mSliders[id].abX;
+      for (unsigned int iHandler = 0; iHandler < activeJoyStickHandlers_[iJoyStick].size(); iHandler++)
+        activeJoyStickHandlers_[iJoyStick][iHandler]->joyStickAxisMoved(iJoyStick, id * 2, arg.state.mSliders[id].abX);
+    }
+    else if (sliderStates_[iJoyStick].sliderStates[id].y != arg.state.mSliders[id].abY)
+    {
+      // slider Y axis changed
+      sliderStates_[iJoyStick].sliderStates[id].y = arg.state.mSliders[id].abY;
+      for (unsigned int iHandler = 0; iHandler < activeJoyStickHandlers_[iJoyStick].size(); iHandler++)
+        activeJoyStickHandlers_[iJoyStick][iHandler]->joyStickAxisMoved(iJoyStick, id * 2 + 1, arg.state.mSliders[id].abY);
+    }
 
     return true;
@@ -650,11 +690,30 @@
       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)
+    // translate the POV into 8 simple buttons
+    int lastState = povStates_[iJoyStick][id];
+    if (lastState & OIS::Pov::North)
+      buttonReleased(arg, 32 + id * 4 + 0);
+    if (lastState & OIS::Pov::South)
+      buttonReleased(arg, 32 + id * 4 + 1);
+    if (lastState & OIS::Pov::East)
+      buttonReleased(arg, 32 + id * 4 + 2);
+    if (lastState & OIS::Pov::West)
+      buttonReleased(arg, 32 + id * 4 + 3);
+    
+    povStates_[iJoyStick].povStates[id] = arg.state.mPOV[id].direction;
+    int currentState = povStates_[iJoyStick][id];
+    if (currentState & OIS::Pov::North)
+      buttonPressed(arg, 32 + id * 4 + 0);
+    if (currentState & OIS::Pov::South)
+      buttonPressed(arg, 32 + id * 4 + 1);
+    if (currentState & OIS::Pov::East)
+      buttonPressed(arg, 32 + id * 4 + 2);
+    if (currentState & OIS::Pov::West)
+      buttonPressed(arg, 32 + id * 4 + 3);
+
+    return true;
+  }
+
+  /*bool InputManager::vector3Moved(const OIS::JoyStickEvent &arg, int id)
   {
     // use the device to identify which one called the method
@@ -668,5 +727,5 @@
 
     return true;
-  }
+  }*/
 
 
@@ -735,5 +794,5 @@
   }
 
-  const MouseState InputManager::getMouseState()
+  /*const MouseState InputManager::getMouseState()
   {
     if (_getSingleton().mouse_)
@@ -741,7 +800,7 @@
     else
       return MouseState();
-  }
-
-  const JoyStickState InputManager::getJoyStickState(unsigned int ID)
+  }*/
+
+  /*const JoyStickState InputManager::getJoyStickState(unsigned int ID)
   {
     if (ID < _getSingleton().joySticksSize_)
@@ -749,5 +808,5 @@
     else
       return JoyStickState();
-  }
+  }*/
 
 
@@ -882,5 +941,4 @@
       if ((*it) == (*mapIt).second)
       {
-        _getSingleton().stateRequest_ = IS_CUSTOM;
         return true;
       }
@@ -888,4 +946,5 @@
     _getSingleton().activeKeyHandlers_.push_back((*mapIt).second);
     _getSingleton().stateRequest_ = IS_CUSTOM;
+    _getSingleton()._updateTickables();
     return true;
   }
@@ -910,8 +969,8 @@
         _getSingleton().activeKeyHandlers_.erase(it);
         _getSingleton().stateRequest_ = IS_CUSTOM;
+        _getSingleton()._updateTickables();
         return true;
       }
     }
-    _getSingleton().stateRequest_ = IS_CUSTOM;
     return true;
   }
@@ -1010,5 +1069,4 @@
       if ((*it) == (*mapIt).second)
       {
-        _getSingleton().stateRequest_ = IS_CUSTOM;
         return true;
       }
@@ -1016,4 +1074,5 @@
     _getSingleton().activeMouseHandlers_.push_back((*mapIt).second);
     _getSingleton().stateRequest_ = IS_CUSTOM;
+    _getSingleton()._updateTickables();
     return true;
   }
@@ -1038,8 +1097,8 @@
         _getSingleton().activeMouseHandlers_.erase(it);
         _getSingleton().stateRequest_ = IS_CUSTOM;
+        _getSingleton()._updateTickables();
         return true;
       }
     }
-    _getSingleton().stateRequest_ = IS_CUSTOM;
     return true;
   }
@@ -1147,5 +1206,4 @@
       if ((*it) == (*handlerIt).second)
       {
-        _getSingleton().stateRequest_ = IS_CUSTOM;
         return true;
       }
@@ -1153,4 +1211,5 @@
     _getSingleton().activeJoyStickHandlers_[ID].push_back((*handlerIt).second);
     _getSingleton().stateRequest_ = IS_CUSTOM;
+    _getSingleton()._updateTickables();
     return true;
   }
@@ -1180,4 +1239,5 @@
         _getSingleton().activeJoyStickHandlers_[ID].erase(it);
         _getSingleton().stateRequest_ = IS_CUSTOM;
+        _getSingleton()._updateTickables();
         return true;
       }
Index: code/branches/input/src/core/InputManager.h
===================================================================
--- code/branches/input/src/core/InputManager.h	(revision 1304)
+++ code/branches/input/src/core/InputManager.h	(revision 1323)
@@ -42,4 +42,5 @@
 
 #include "ois/OIS.h"
+#include "util/Math.h"
 #include "Tickable.h"
 #include "InputInterfaces.h"
@@ -47,4 +48,23 @@
 namespace orxonox
 {
+  /**
+  * Helper class to realise a vector<int[4]>
+  */
+  class POVStates
+  {
+  public:
+    int operator[](unsigned int index) { return povStates[index]; }
+    int povStates[4];
+  };
+
+  /**
+  * Helper class to realise a vector< {int[4], int[4]} >
+  */
+  class SliderStates
+  {
+  public:
+    IntVector2 sliderStates[4];
+  };
+
   /**
     @brief Captures and distributes mouse and keyboard input.
@@ -85,6 +105,6 @@
     static bool isModifierDown(KeyboardModifier::Enum modifier);
     static bool isKeyDown(KeyCode::Enum key);
-    static const MouseState getMouseState();
-    static const JoyStickState getJoyStickState(unsigned int ID);
+    //static const MouseState getMouseState();
+    //static const JoyStickState getJoyStickState(unsigned int ID);
 
     static void setWindowExtents(const int width, const int height);
@@ -130,4 +150,6 @@
     void _destroyMouse();
     void _destroyJoySticks();
+
+    void _updateTickables();
 
     void tick(float dt);
@@ -144,5 +166,5 @@
     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 vector3Moved  (const OIS::JoyStickEvent &arg, int id);
 
     static InputManager& _getSingleton();
@@ -160,4 +182,9 @@
     unsigned int keyboardModifiers_;
 
+    //! Keeps track of the joy stick POV states
+    std::vector<POVStates>                      povStates_;
+    //! Keeps track of the possibly two slider axes
+    std::vector<SliderStates>                   sliderStates_;
+
     std::map<std::string, KeyHandler*>          keyHandlers_;
     std::map<std::string, MouseHandler*>        mouseHandlers_;
@@ -167,4 +194,5 @@
     std::vector<MouseHandler*>                  activeMouseHandlers_;
     std::vector<std::vector<JoyStickHandler*> > activeJoyStickHandlers_;
+    std::vector<InputTickable*>                 activeHandlers_;
 
     std::vector<Key>                            keysDown_;
Index: code/branches/input/src/core/SignalHandler.cc
===================================================================
--- code/branches/input/src/core/SignalHandler.cc	(revision 1304)
+++ code/branches/input/src/core/SignalHandler.cc	(revision 1323)
@@ -150,9 +150,9 @@
   {
     std::cout << "Trying to restore XAutoKeyRepeat" << std::endl;
-	Display* display;
-	  if ((display = XOpenDisplay(0)))
-    {
-			XAutoRepeatOn(display);
-		  XCloseDisplay(display);
+    Display* display;
+    if ((display = XOpenDisplay(0)))
+    {
+      XAutoRepeatOn(display);
+      XCloseDisplay(display);
     }
   }
@@ -320,7 +320,7 @@
 
   std::string timeString = "\n\n\n\n"
-	                   "=======================================================\n"
-	                   "= time: " + std::string(ctime(&now)) +
-			   "=======================================================\n";
+                     "=======================================================\n"
+                     "= time: " + std::string(ctime(&now)) +
+         "=======================================================\n";
   bt.insert(0, timeString);
 
Index: code/branches/input/src/orxonox/objects/SpaceShip.cc
===================================================================
--- code/branches/input/src/orxonox/objects/SpaceShip.cc	(revision 1304)
+++ code/branches/input/src/orxonox/objects/SpaceShip.cc	(revision 1323)
@@ -38,7 +38,5 @@
 
 #include "CameraHandler.h"
-#include "tinyxml/tinyxml.h"
-#include "ois/OIS.h"
-#include "util/Convert.h"
+//#include "util/Convert.h"
 #include "util/Math.h"
 #include "core/CoreIncludes.h"
@@ -219,57 +217,4 @@
     }
 
-    void SpaceShip::loadParams(TiXmlElement* xmlElem)
-    {
-        Model::loadParams(xmlElem);
-        this->create();
-        this->getFocus();
-/*
-        if (xmlElem->Attribute("forward") && xmlElem->Attribute("rotateupdown") && xmlElem->Attribute("rotaterightleft") && xmlElem->Attribute("looprightleft"))
-        {
-            std::string forwardStr = xmlElem->Attribute("forward");
-            std::string rotateupdownStr = xmlElem->Attribute("rotateupdown");
-            std::string rotaterightleftStr = xmlElem->Attribute("rotaterightleft");
-            std::string looprightleftStr = xmlElem->Attribute("looprightleft");
-
-            String2Number<float>(this->maxSpeedForward_, forwardStr);
-            String2Number<float>(this->maxSpeedRotateUpDown_, rotateupdownStr);
-            String2Number<float>(this->maxSpeedRotateRightLeft_, rotaterightleftStr);
-            String2Number<float>(this->maxSpeedLoopRightLeft_, looprightleftStr);
-
-            COUT(4) << "Loader: Initialized spaceship steering with values " << maxSpeedForward_ << " " << maxSpeedRotateUpDown_ << " " << maxSpeedRotateRightLeft_ << " " << maxSpeedLoopRightLeft_ << " " << std::endl;
-      }
-*/
-        if (xmlElem->Attribute("maxSpeed") && xmlElem->Attribute("maxSideAndBackSpeed") && xmlElem->Attribute("maxRotation") && xmlElem->Attribute("transAcc") && xmlElem->Attribute("rotAcc") && xmlElem->Attribute("transDamp") && xmlElem->Attribute("rotDamp"))
-        {
-
-            std::string msStr = xmlElem->Attribute("maxSpeed");
-            std::string msabsStr = xmlElem->Attribute("maxSideAndBackSpeed");
-            std::string mrStr = xmlElem->Attribute("maxRotation");
-            std::string taStr = xmlElem->Attribute("transAcc");
-            std::string raStr = xmlElem->Attribute("rotAcc");
-            std::string tdStr = xmlElem->Attribute("transDamp");
-            std::string rdStr = xmlElem->Attribute("rotDamp");
-
-            convertValue<std::string, float>(&this->maxSpeed_, msStr);
-            convertValue<std::string, float>(&this->maxSideAndBackSpeed_, msabsStr);
-            convertValue<std::string, float>(&this->maxRotation_, mrStr);
-            convertValue<std::string, float>(&this->translationAcceleration_, taStr);
-            convertValue<std::string, float>(&this->rotationAcceleration_, raStr);
-            convertValue<std::string, float>(&this->translationDamping_, tdStr);
-            convertValue<std::string, float>(&this->rotationDamping_, rdStr);
-
-            this->maxRotationRadian_ = Radian(this->maxRotation_);
-            this->rotationAccelerationRadian_ = Radian(this->rotationAcceleration_);
-            this->rotationDampingRadian_ = Radian(this->rotationDamping_);
-
-            COUT(4) << "Loader: Initialized SpaceShip" << std::endl;
-        }
-
-        if (xmlElem->Attribute("camera"))
-        {
-            this->setCamera();
-        }
-    }
-
     void SpaceShip::setCamera(const std::string& camera)
     {
@@ -351,5 +296,5 @@
     }
 
-    bool SpaceShip::mouseMoved(const MouseState& state)
+    bool SpaceShip::mouseMoved(IntVector2 abs, IntVector2 rel, IntVector2 clippingSize)
     {
 /*
@@ -368,14 +313,14 @@
         if (this->bRMousePressed_)
         {
-            this->camNode_->roll(Degree(-state.X.rel * 0.10));
-            this->camNode_->yaw(Degree(state.Y.rel * 0.10));
+            this->camNode_->roll(Degree(-rel.x * 0.10));
+            this->camNode_->yaw(Degree(rel.y * 0.10));
         }
         else
         {
-            float minDimension = state.height;
-            if (state.width < minDimension)
-                minDimension = state.width;
-
-            this->mouseX_ += state.X.rel;
+            float minDimension = clippingSize.y;
+            if (clippingSize.x < minDimension)
+                minDimension = clippingSize.x;
+
+            this->mouseX_ += rel.x;
             if (this->mouseX_ < -minDimension)
                 this->mouseX_ = -minDimension;
@@ -383,5 +328,5 @@
                 this->mouseX_ = minDimension;
 
-            this->mouseY_ += state.Y.rel;
+            this->mouseY_ += rel.y;
             if (this->mouseY_ < -minDimension)
                 this->mouseY_ = -minDimension;
@@ -411,5 +356,5 @@
     }
 
-    bool SpaceShip::mouseButtonPressed(const MouseState& state, MouseButton::Enum id)
+    bool SpaceShip::mouseButtonPressed(MouseButton::Enum id)
     {
         if (id == MouseButton::Left)
@@ -421,5 +366,5 @@
     }
 
-    bool SpaceShip::mouseButtonReleased(const MouseState& state, MouseButton::Enum id)
+    bool SpaceShip::mouseButtonReleased(MouseButton::Enum id)
     {
         if (id == MouseButton::Left)
@@ -564,227 +509,5 @@
         else
             this->tt_->setRate(0);
-
-/*
-        if (mKeyboard->isKeyDown(OIS::KC_UP) || mKeyboard->isKeyDown(OIS::KC_W))
-            this->moveForward(speed);
-        else
-            this->moveForward(0);
-
-        if(mKeyboard->isKeyDown(OIS::KC_DOWN) || mKeyboard->isKeyDown(OIS::KC_S))
-            this->brakeForward(speed);
-        else
-            this->brakeForward(speed/10);
-
-        if (mKeyboard->isKeyDown(OIS::KC_RIGHT) || mKeyboard->isKeyDown(OIS::KC_D))
-            this->loopRight(loop);
-        else
-            this->loopRight(0);
-
-        if (mKeyboard->isKeyDown(OIS::KC_LEFT) || mKeyboard->isKeyDown(OIS::KC_A))
-            this->loopLeft(loop);
-        else
-            this->loopLeft(0);
-
-        if(moved)
-        {
-            if (mouseY<=0)
-                this->rotateUp(-mouseY*rotate);
-            if (mouseY>0)
-                this->rotateDown(mouseY*rotate);
-            if (mouseX>0)
-                this->rotateRight(mouseX*rotate);
-            if (mouseX<=0)
-                this->rotateLeft(-mouseX*rotate);
-
-            mouseY = 0;
-            mouseX = 0;
-            moved = false;
-        }*/
-/*        else
-        {
-            this->rotateUp(0);
-            this->rotateDown(0);
-            this->rotateRight(0);
-            this->rotateLeft(0);
-        }*/
-/*
-        if(moveForward_ > 0)
-        {
-            accelerationForward_ = moveForward_;
-            if(speedForward_ < maxSpeedForward_)
-                speedForward_ += accelerationForward_*dt;
-            if(speedForward_ > maxSpeedForward_)
-                speedForward_ = maxSpeedForward_;
-        }
-
-        if(moveForward_ <= 0)
-        {
-            accelerationForward_ = -brakeForward_;
-            if(speedForward_ > 0)
-                speedForward_ += accelerationForward_*dt;
-            if(speedForward_ < 0)
-                speedForward_ = 0;
-        }
-
-        if(rotateUp_ > 0)
-        {
-            accelerationRotateUpDown_ = rotateUp_;
-            if(speedRotateUpDown_ < maxSpeedRotateUpDown_)
-                speedRotateUpDown_ += accelerationRotateUpDown_*dt;
-            if(speedRotateUpDown_ > maxSpeedRotateUpDown_)
-            speedRotateUpDown_ = maxSpeedRotateUpDown_;
-        }
-
-        if(rotateDown_ > 0)
-        {
-            accelerationRotateUpDown_ = rotateDown_;
-            if(speedRotateUpDown_ > -maxSpeedRotateUpDown_)
-                speedRotateUpDown_ -= accelerationRotateUpDown_*dt;
-            if(speedRotateUpDown_ < -maxSpeedRotateUpDown_)
-                speedRotateUpDown_ = -maxSpeedRotateUpDown_;
-        }
-
-        if(rotateUp_ == 0 && rotateDown_ == 0)
-        {
-            accelerationRotateUpDown_ = brakeRotate_;
-            if(speedRotateUpDown_ > 0)
-                speedRotateUpDown_ -= accelerationRotateUpDown_*dt;
-            if(speedRotateUpDown_ < 0)
-                speedRotateUpDown_ += accelerationRotateUpDown_*dt;
-            if(fabs(speedRotateUpDown_) < accelerationRotateUpDown_*dt)
-                speedRotateUpDown_ = 0;
-        }
-
-        if(rotateRight_ > 0)
-        {
-            accelerationRotateRightLeft_ = rotateRight_;
-            if(speedRotateRightLeft_ > -maxSpeedRotateRightLeft_)
-                speedRotateRightLeft_ -= accelerationRotateRightLeft_*dt;
-            if(speedRotateRightLeft_ < -maxSpeedRotateRightLeft_)
-                speedRotateRightLeft_ = -maxSpeedRotateRightLeft_;
-        }
-
-        if(rotateLeft_ > 0)
-        {
-            accelerationRotateRightLeft_ = rotateLeft_;
-            if(speedRotateRightLeft_ < maxSpeedRotateRightLeft_)
-                speedRotateRightLeft_ += accelerationRotateRightLeft_*dt;
-            if(speedRotateRightLeft_ > maxSpeedRotateRightLeft_)
-                speedRotateRightLeft_ = maxSpeedRotateRightLeft_;
-        }
-
-        if(rotateRight_ == 0 && rotateLeft_ == 0)
-        {
-            accelerationRotateRightLeft_ = brakeRotate_;
-            if(speedRotateRightLeft_ > 0)
-                speedRotateRightLeft_ -= accelerationRotateRightLeft_*dt;
-            if(speedRotateRightLeft_ < 0)
-                speedRotateRightLeft_ += accelerationRotateRightLeft_*dt;
-            if(fabs(speedRotateRightLeft_) < accelerationRotateRightLeft_*dt)
-                speedRotateRightLeft_ = 0;
-        }
-
-        if(loopRight_ > 0)
-        {
-            accelerationLoopRightLeft_ = loopRight_;
-            if(speedLoopRightLeft_ < maxSpeedLoopRightLeft_)
-                speedLoopRightLeft_ += accelerationLoopRightLeft_*dt;
-            if(speedLoopRightLeft_ > maxSpeedLoopRightLeft_)
-                speedLoopRightLeft_ = maxSpeedLoopRightLeft_;
-        }
-
-        if(loopLeft_ > 0)
-        {
-            accelerationLoopRightLeft_ = loopLeft_;
-            if(speedLoopRightLeft_ > -maxSpeedLoopRightLeft_)
-                speedLoopRightLeft_ -= accelerationLoopRightLeft_*dt;
-            if(speedLoopRightLeft_ < -maxSpeedLoopRightLeft_)
-                speedLoopRightLeft_ = -maxSpeedLoopRightLeft_;
-        }
-
-        if(loopLeft_ == 0 && loopRight_ == 0)
-        {
-            accelerationLoopRightLeft_ = brakeLoop_;
-            if(speedLoopRightLeft_ > 0)
-                speedLoopRightLeft_ -= accelerationLoopRightLeft_*dt;
-            if(speedLoopRightLeft_ < 0)
-                speedLoopRightLeft_ += accelerationLoopRightLeft_*dt;
-            if(fabs(speedLoopRightLeft_) < accelerationLoopRightLeft_*dt)
-                speedLoopRightLeft_ = 0;
-        }
-
-        Vector3 transVector = Vector3::ZERO;
-*/
-/*
-        transVector.z = 1;
-        this->translate(transVector*speedForward_*dt, Ogre::Node::TS_LOCAL);
-        this->pitch(Degree(speedRotateUpDown_*dt), Ogre::Node::TS_LOCAL);
-        this->yaw(Degree(speedRotateRightLeft_*dt), Ogre::Node::TS_LOCAL);
-        this->roll(Degree(speedLoopRightLeft_*dt), Ogre::Node::TS_LOCAL);
-*/
-/*
-        transVector.x = 1;
-        this->translate(transVector*speedForward_*dt, Ogre::Node::TS_LOCAL);
-        this->yaw(Degree(speedRotateUpDown_*dt), Ogre::Node::TS_LOCAL);
-        this->roll(Degree(speedRotateRightLeft_*dt), Ogre::Node::TS_LOCAL);
-        this->pitch(Degree(speedLoopRightLeft_*dt), Ogre::Node::TS_LOCAL);
-*/
-    }
-/*
-    void SpaceShip::moveForward(float moveForward) {
-        moveForward_ = moveForward;
-    }
-
-    void SpaceShip::rotateUp(float rotateUp) {
-        rotateUp_ = rotateUp;
-    }
-
-    void SpaceShip::rotateDown(float rotateDown) {
-        rotateDown_ = rotateDown;
-    }
-
-    void SpaceShip::rotateLeft(float rotateLeft) {
-        rotateLeft_ = rotateLeft;
-    }
-
-    void SpaceShip::rotateRight(float rotateRight) {
-        rotateRight_ = rotateRight;
-    }
-
-    void SpaceShip::loopLeft(float loopLeft) {
-        loopLeft_ = loopLeft;
-    }
-
-    void SpaceShip::loopRight(float loopRight) {
-        loopRight_ = loopRight;
-    }
-
-    void SpaceShip::brakeForward(float brakeForward) {
-        brakeForward_ = brakeForward;
-    }
-
-    void SpaceShip::brakeRotate(float brakeRotate) {
-        brakeRotate_ = brakeRotate;
-    }
-
-    void SpaceShip::brakeLoop(float brakeLoop) {
-        brakeLoop_ = brakeLoop;
-    }
-
-    void SpaceShip::maxSpeedForward(float maxSpeedForward) {
-        maxSpeedForward_ = maxSpeedForward;
-    }
-
-    void SpaceShip::maxSpeedRotateUpDown(float maxSpeedRotateUpDown) {
-        maxSpeedRotateUpDown_ = maxSpeedRotateUpDown;
-    }
-
-    void SpaceShip::maxSpeedRotateRightLeft(float maxSpeedRotateRightLeft) {
-        maxSpeedRotateRightLeft_ = maxSpeedRotateRightLeft;
-    }
-
-    void SpaceShip::maxSpeedLoopRightLeft(float maxSpeedLoopRightLeft) {
-        maxSpeedLoopRightLeft_ = maxSpeedLoopRightLeft;
-    }
-*/
+    }
+
 }
Index: code/branches/input/src/orxonox/objects/SpaceShip.h
===================================================================
--- code/branches/input/src/orxonox/objects/SpaceShip.h	(revision 1304)
+++ code/branches/input/src/orxonox/objects/SpaceShip.h	(revision 1323)
@@ -50,5 +50,4 @@
             void init();
             void setConfigValues();
-            virtual void loadParams(TiXmlElement* xmlElem);
             virtual void XMLPort(Element& xmlelement, XMLPort::Mode mode);
             virtual void tick(float dt);
@@ -68,9 +67,9 @@
                 { SpaceShip::instance_s->setMaxSpeed(value); }
 
-            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 mouseScrolled      (const MouseState& state) { return true; }
+            bool mouseButtonPressed (MouseButton::Enum id);
+            bool mouseButtonReleased(MouseButton::Enum id);
+            bool mouseButtonHeld    (MouseButton::Enum id) { return true; }
+            bool mouseMoved         (IntVector2 abs, IntVector2 rel, IntVector2 clippingSize);
+            bool mouseScrolled      (int abs, int rel) { return true; }
 
 
Index: code/branches/input/src/util/Math.h
===================================================================
--- code/branches/input/src/util/Math.h	(revision 1304)
+++ code/branches/input/src/util/Math.h	(revision 1323)
@@ -147,3 +147,12 @@
 }
 
+class _UtilExport IntVector2
+{
+public:
+  IntVector2() : x(0), y(0) { }
+  IntVector2(int _x, int _y) : x(_x), y(_y) { }
+  int x;
+  int y;
+};
+
 #endif /* _Util_Math_H__ */
Index: code/branches/input/src/util/SubString.cc
===================================================================
--- code/branches/input/src/util/SubString.cc	(revision 1304)
+++ code/branches/input/src/util/SubString.cc	(revision 1323)
@@ -67,8 +67,8 @@
 SubString::SubString(const std::string& string,
                      const std::string& delimiters, const std::string& delimiterNeighbours, bool emptyEntries,
-                     char escapeChar, bool removeExcapeChar, char safemode_char, bool removeSafemodeChar,
+                     char escapeChar, bool removeEscapeChar, char safemode_char, bool removeSafemodeChar,
                      char openparenthesis_char, char closeparenthesis_char, bool removeParenthesisChars, char comment_char)
 {
-  SubString::splitLine(this->strings, this->bInSafemode, string, delimiters, delimiterNeighbours, emptyEntries, escapeChar, removeExcapeChar, safemode_char, removeSafemodeChar, openparenthesis_char, closeparenthesis_char, removeParenthesisChars, comment_char);
+  SubString::splitLine(this->strings, this->bInSafemode, string, delimiters, delimiterNeighbours, emptyEntries, escapeChar, removeEscapeChar, safemode_char, removeSafemodeChar, openparenthesis_char, closeparenthesis_char, removeParenthesisChars, comment_char);
 }
 
Index: code/branches/input/src/util/SubString.h
===================================================================
--- code/branches/input/src/util/SubString.h	(revision 1304)
+++ code/branches/input/src/util/SubString.h	(revision 1323)
@@ -89,5 +89,5 @@
   SubString(const std::string& string,
             const std::string& delimiters, const std::string& delimiterNeighbours = "", bool emptyEntries=false,
-            char escapeChar ='\\', bool removeExcapeChar = true, char safemode_char = '"', bool removeSafemodeChar = true,
+            char escapeChar ='\\', bool removeEscapeChar = true, char safemode_char = '"', bool removeSafemodeChar = true,
             char openparenthesis_char = '(', char closeparenthesis_char = ')',  bool removeParenthesisChars = true, char comment_char = '\0');
   SubString(unsigned int argc, const char** argv);
