Index: code/branches/input/bin/keybindings.ini
===================================================================
--- code/branches/input/bin/keybindings.ini	(revision 1240)
+++ code/branches/input/bin/keybindings.ini	(revision 1259)
@@ -24,5 +24,5 @@
 R_6=
 H_6=
-P_7=
+P_7="exec disco.txt"
 R_7=
 H_7=
@@ -30,5 +30,5 @@
 R_8=
 H_8=
-P_9=
+P_9="disco.txt"
 R_9=
 H_9=
Index: code/branches/input/src/core/InputBuffer.cc
===================================================================
--- code/branches/input/src/core/InputBuffer.cc	(revision 1240)
+++ code/branches/input/src/core/InputBuffer.cc	(revision 1259)
@@ -37,14 +37,14 @@
 namespace orxonox
 {
-  InputBuffer::InputBuffer(const std::string allowedChars)
+  InputBuffer::InputBuffer(const std::string allowedChars) :
+    buffer_(""),
+    allowedChars_(allowedChars),
+    lastKey_(KeyCode::Unassigned),
+    timeSinceKeyPressed_(0.0f),
+    timeSinceKeyRepeated_(0.0f),
+    keysToRepeat_(0)
   {
     RegisterObject(InputBuffer);
     setConfigValues();
-    allowedChars_ = allowedChars;
-    buffer_ = "";
-    lastKey_ = KeyCode::Unassigned;
-    timeSinceKeyPressed_ = 0.0;
-    timeSinceKeyRepeated_ = 0.0;
-    keysToRepeat_ = 0;
   }
 
Index: code/branches/input/src/core/InputBuffer.h
===================================================================
--- code/branches/input/src/core/InputBuffer.h	(revision 1240)
+++ code/branches/input/src/core/InputBuffer.h	(revision 1259)
@@ -98,5 +98,5 @@
     { return this->buffer_; }
 
-  private:
+  private:  // functions
     bool charIsAllowed(const char& input);
 
@@ -108,4 +108,5 @@
     void tick(float dt);
 
+  private: // variables
     std::string buffer_;
     std::list<InputBufferListenerTuple> listeners_;
Index: code/branches/input/src/core/InputHandler.cc
===================================================================
--- code/branches/input/src/core/InputHandler.cc	(revision 1240)
+++ code/branches/input/src/core/InputHandler.cc	(revision 1259)
@@ -229,7 +229,7 @@
 
     std::string mouseButtonNames[] = {
-    "MouseLeft", "MouseRight", "MouseMiddle",
-    "MouseButton3", "MouseButton4", "MouseButton5",
-    "MouseButton6", "MouseButton7" };
+      "MouseLeft", "MouseRight", "MouseMiddle",
+      "MouseButton3", "MouseButton4", "MouseButton5",
+      "MouseButton6", "MouseButton7" };
     for (int i = 0; i < numberOfMouseButtons_s; i++)
       mouseButtonNames_[i] = mouseButtonNames[i];
@@ -381,5 +381,5 @@
   }
 
-  bool KeyBinder::executeBinding(KeyBinding& binding)
+  bool KeyBinder::executeSimpleBinding(KeyBinding& binding)
   {
     if (binding.commandStr != "")
@@ -406,5 +406,5 @@
   {
     // find the appropriate key binding
-    executeBinding(bindingsKeyPress_[int(evt.key)]);
+    executeSimpleBinding(bindingsKeyPress_[int(evt.key)]);
 
     return true;
@@ -418,5 +418,5 @@
   {
     // find the appropriate key binding
-    executeBinding(bindingsKeyRelease_[int(evt.key)]);
+    executeSimpleBinding(bindingsKeyRelease_[int(evt.key)]);
 
     return true;
@@ -430,5 +430,5 @@
   {
     // find the appropriate key binding
-    executeBinding(bindingsKeyHold_[int(evt.key)]);
+    executeSimpleBinding(bindingsKeyHold_[int(evt.key)]);
 
     return true;
@@ -441,12 +441,26 @@
   bool KeyBinder::mouseMoved(const MouseState &evt)
   {
-    return true;
-  }
-
-  /**
-    @brief Event handler for the mouseWheelTurned Event.
+    /*if (bindingMouseMoved_.commandStr != "")
+    {
+      if (bindingMouseMoved_.commandStr != bindingMouseMoved_.evaluation.getCommandString())
+      {
+        // key binding has changed, reevaluate the command string.
+        bindingMouseMoved_.evaluation = CommandExecutor::evaluate(bindingMouseMoved_.commandStr);
+        bindingMouseMoved_.commandStr = bindingMouseMoved_.evaluation.getCommandString();
+      }
+      COUT(3) << "Executing command: " << bindingMouseMoved_.commandStr << std::endl;
+
+      bindingMouseMoved_.evaluation.setEvaluatedParameter(
+      CommandExecutor::execute(bindingMouseMoved_.commandStr);
+    }*/
+
+    return true;
+  }
+
+  /**
+    @brief Event handler for the mouseScrolled Event.
     @param e Mouse state information
   */
-  bool KeyBinder::mouseWheelTurned(const MouseState &evt)
+  bool KeyBinder::mouseScrolled(const MouseState &evt)
   {
     return true;
@@ -461,5 +475,5 @@
   {
     // find the appropriate key binding
-    executeBinding(bindingsMouseButtonPress_[int(id)]);
+    executeSimpleBinding(bindingsMouseButtonPress_[int(id)]);
 
     return true;
@@ -474,5 +488,5 @@
   {
     // find the appropriate key binding
-    executeBinding(bindingsMouseButtonRelease_[int(id)]);
+    executeSimpleBinding(bindingsMouseButtonRelease_[int(id)]);
 
     return true;
@@ -487,5 +501,5 @@
   {
     // find the appropriate key binding
-    executeBinding(bindingsMouseButtonHold_[int(id)]);
+    executeSimpleBinding(bindingsMouseButtonHold_[int(id)]);
 
     return true;
@@ -495,5 +509,5 @@
   {
     // find the appropriate key binding
-    executeBinding(bindingsJoyStickButtonPress_[button]);
+    executeSimpleBinding(bindingsJoyStickButtonPress_[button]);
 
     return true;
@@ -503,5 +517,5 @@
   {
     // find the appropriate key binding
-    executeBinding(bindingsJoyStickButtonRelease_[button]);
+    executeSimpleBinding(bindingsJoyStickButtonRelease_[button]);
 
     return true;
@@ -511,5 +525,5 @@
   {
     // find the appropriate key binding
-    executeBinding(bindingsJoyStickButtonHold_[button]);
+    executeSimpleBinding(bindingsJoyStickButtonHold_[button]);
 
     return true;
Index: code/branches/input/src/core/InputHandler.h
===================================================================
--- code/branches/input/src/core/InputHandler.h	(revision 1240)
+++ code/branches/input/src/core/InputHandler.h	(revision 1259)
@@ -79,9 +79,7 @@
     void setConfigValues();
 
-    std::string testtest;
-
   private: // functions
 
-    bool executeBinding(KeyBinding &binding);
+    bool executeSimpleBinding(KeyBinding &binding);
 
     bool keyPressed (const KeyEvent& evt);
@@ -93,5 +91,5 @@
     bool mouseButtonHeld    (const MouseState& state, MouseButton::Enum id);
     bool mouseMoved         (const MouseState& state);
-    bool mouseWheelTurned   (const MouseState& state);
+    bool mouseScrolled      (const MouseState& state);
 
     bool joyStickButtonPressed (const JoyStickState& state, int button);
@@ -124,4 +122,8 @@
     //! 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_;
     //! Names of the mouse buttons as strings
     std::string mouseButtonNames_[numberOfMouseButtons_s];
Index: code/branches/input/src/core/InputInterfaces.h
===================================================================
--- code/branches/input/src/core/InputInterfaces.h	(revision 1240)
+++ code/branches/input/src/core/InputInterfaces.h	(revision 1259)
@@ -48,14 +48,14 @@
       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,           
+      NumRow1       = OIS::KC_1,           
+      NumRow2       = OIS::KC_2,           
+      NumRow3       = OIS::KC_3,           
+      NumRow4       = OIS::KC_4,           
+      NumRow5       = OIS::KC_5,           
+      NumRow6       = OIS::KC_6,           
+      NumRow7       = OIS::KC_7,           
+      NumRow8       = OIS::KC_8,           
+      NumRow9       = OIS::KC_9,           
+      NumRow0       = OIS::KC_0,           
       Minus         = OIS::KC_MINUS,           // - on main keyboard
       Equals        = OIS::KC_EQUALS,      
@@ -244,7 +244,7 @@
   {
   public:
-    JoyStickState(const OIS::JoyStickState& state, int ID) : OIS::JoyStickState(state), JoyStickID(ID) { }
+    JoyStickState(const OIS::JoyStickState& state, int ID) : OIS::JoyStickState(state), mJoyStickID(ID) { }
     JoyStickState() { clear(); }
-    int JoyStickID;
+    int mJoyStickID;
   };
 
@@ -272,5 +272,5 @@
     virtual bool mouseButtonHeld    (const MouseState& state, MouseButton::Enum id) = 0;
     virtual bool mouseMoved         (const MouseState& state) = 0;
-    virtual bool mouseWheelTurned   (const MouseState& state) = 0;
+    virtual bool mouseScrolled      (const MouseState& state) = 0;
   };
 
Index: code/branches/input/src/core/InputManager.cc
===================================================================
--- code/branches/input/src/core/InputManager.cc	(revision 1240)
+++ code/branches/input/src/core/InputManager.cc	(revision 1259)
@@ -52,13 +52,9 @@
   InputManager::InputManager() :
       inputSystem_(0), keyboard_(0), mouse_(0),
+      joySticksSize_(0),
       state_(IS_UNINIT), stateRequest_(IS_UNINIT),
-      joySticksSize_(0)
+      keyboardModifiers_(0)
   {
     RegisterObject(InputManager);
-
-    //this->joySticks_.reserve(5);
-    //this->activeJoyStickHandlers_.reserve(10);
-    this->activeKeyHandlers_.reserve(10);
-    this->activeMouseHandlers_.reserve(10);
   }
 
@@ -88,6 +84,6 @@
     @param windowHeight The height of the render window
   */
-  bool InputManager::_initialise(const size_t windowHnd, const int windowWidth, const int windowHeight,
-        const bool createKeyboard, const bool createMouse, const bool createJoySticks)
+  bool InputManager::_initialise(const size_t windowHnd, int windowWidth, int windowHeight,
+        bool createKeyboard, bool createMouse, bool createJoySticks)
   {
     if (state_ == IS_UNINIT)
@@ -146,4 +142,5 @@
     addKeyHandler(binder, "keybinder");
     addMouseHandler(binder, "keybinder");
+    addJoyStickHandler(binder, "keybinder");
 
     // Read all the key bindings and assign them
@@ -267,4 +264,6 @@
     }
     joySticksSize_ = joySticks_.size();
+    activeJoyStickHandlers_.resize(joySticksSize_);
+    joyStickButtonsDown_.resize(joySticksSize_);
     return success;
   }
@@ -375,5 +374,6 @@
         activeKeyHandlers_.clear();
         activeMouseHandlers_.clear();
-        activeJoyStickHandlers_.clear();
+        for (unsigned int i = 0; i < joySticksSize_; i++)
+          activeJoyStickHandlers_[i].clear();
 
         switch (stateRequest_)
@@ -414,4 +414,6 @@
     if (keyboard_)
       keyboard_->capture();
+    for (unsigned  int i = 0; i < joySticksSize_; i++)
+      joySticks_[i]->capture();
 
 
@@ -428,5 +430,5 @@
     // call all the handlers for the held joy stick button events
     for (unsigned int iJoyStick  = 0; iJoyStick < joySticksSize_; iJoyStick++)
-      for (unsigned int iButton   = 0; iButton   < joyStickButtonsDown_.size(); iButton++)
+      for (unsigned int iButton   = 0; iButton   < joyStickButtonsDown_[iJoyStick].size(); iButton++)
         for (unsigned int iHandler = 0; iHandler  < activeJoyStickHandlers_[iJoyStick].size(); iHandler++)
           activeJoyStickHandlers_[iJoyStick][iHandler]->joyStickButtonHeld(
@@ -509,9 +511,9 @@
     }
 
-    // check for mouse wheel turned event
+    // check for mouse scrolled event
     if (e.state.Z.rel != 0)
     {
       for (unsigned int i = 0; i < activeMouseHandlers_.size(); i++)
-        activeMouseHandlers_[i]->mouseWheelTurned(e.state);
+        activeMouseHandlers_[i]->mouseScrolled(e.state);
     }
 
@@ -674,6 +676,6 @@
   // ################################
 
-  bool InputManager::initialise(const size_t windowHnd, const int windowWidth, const int windowHeight,
-    const bool createKeyboard, const bool createMouse, const bool createJoySticks)
+  bool InputManager::initialise(const size_t windowHnd, int windowWidth, int windowHeight,
+    bool createKeyboard, bool createMouse, bool createJoySticks)
   {
     return _getSingleton()._initialise(windowHnd, windowWidth, windowHeight,
Index: code/branches/input/src/core/InputManager.h
===================================================================
--- code/branches/input/src/core/InputManager.h	(revision 1240)
+++ code/branches/input/src/core/InputManager.h	(revision 1259)
@@ -39,5 +39,5 @@
 
 #include <map>
-#include <list>
+#include <vector>
 
 #include "ois/OIS.h"
@@ -69,6 +69,6 @@
 
   public: // static functions
-    static bool initialise(const size_t windowHnd, const int windowWidth, const int windowHeight,
-          const bool createKeyboard = true, const bool createMouse = true, const bool createJoySticks = false);
+    static bool initialise(const size_t windowHnd, int windowWidth, int windowHeight,
+          bool createKeyboard = true, bool createMouse = true, bool createJoySticks = false);
     static bool initialiseKeyboard();
     static bool initialiseMouse();
@@ -121,5 +121,5 @@
 
     // Intenal methods
-    bool _initialise(const size_t, const int, const int, const bool, const bool, const bool);
+    bool _initialise(const size_t, int, int, bool, bool, bool);
     bool _initialiseKeyboard();
     bool _initialiseMouse();
@@ -169,5 +169,5 @@
 
     std::vector<Key>                            keysDown_;
-    std::vector<MouseButton::Enum>            mouseButtonsDown_;
+    std::vector<MouseButton::Enum>              mouseButtonsDown_;
     std::vector<std::vector<int> >              joyStickButtonsDown_;
 
Index: code/branches/input/src/core/SignalHandler.cc
===================================================================
--- code/branches/input/src/core/SignalHandler.cc	(revision 1240)
+++ code/branches/input/src/core/SignalHandler.cc	(revision 1259)
@@ -65,14 +65,14 @@
 
   // prepare for restoring XAutoKeyRepeat
-    Display* display;
-	if ((display = XOpenDisplay(0)))
-  {
-	    XKeyboardState oldState;
-		XGetKeyboardControl(display, &oldState);
-		if (oldState.global_auto_repeat == AutoRepeatModeOn)
-          bXAutoKeyRepeatOn_ = true;
-		else
-		  bXAutoKeyRepeatOn_ = false;
-		XCloseDisplay(display);
+  Display* display;
+  if ((display = XOpenDisplay(0)))
+  {
+    XKeyboardState oldState;
+    XGetKeyboardControl(display, &oldState);
+    if (oldState.global_auto_repeat == AutoRepeatModeOn)
+      bXAutoKeyRepeatOn_ = true;
+    else
+      bXAutoKeyRepeatOn_ = false;
+    XCloseDisplay(display);
   }
   else
Index: code/branches/input/src/orxonox/Orxonox.cc
===================================================================
--- code/branches/input/src/orxonox/Orxonox.cc	(revision 1240)
+++ code/branches/input/src/orxonox/Orxonox.cc	(revision 1259)
@@ -401,5 +401,5 @@
   {
     if (!InputManager::initialise(ogre_->getWindowHandle(),
-          ogre_->getWindowWidth(), ogre_->getWindowHeight()))
+          ogre_->getWindowWidth(), ogre_->getWindowHeight(), true, true, true))
       abortImmediateForce();
     InputManager::setInputState(InputManager::IS_NORMAL);
Index: code/branches/input/src/orxonox/objects/SpaceShip.h
===================================================================
--- code/branches/input/src/orxonox/objects/SpaceShip.h	(revision 1240)
+++ code/branches/input/src/orxonox/objects/SpaceShip.h	(revision 1259)
@@ -69,5 +69,5 @@
             bool mouseButtonHeld    (const MouseState& state, MouseButton::Enum id) { return true; }
             bool mouseMoved         (const MouseState& state);
-            bool mouseWheelTurned   (const MouseState& state) { return true; }
+            bool mouseScrolled      (const MouseState& state) { return true; }
 
 
Index: code/branches/input/visual_studio/vc8/ois.vcproj
===================================================================
--- code/branches/input/visual_studio/vc8/ois.vcproj	(revision 1240)
+++ code/branches/input/visual_studio/vc8/ois.vcproj	(revision 1259)
@@ -560,4 +560,128 @@
 				</File>
 			</Filter>
+			<Filter
+				Name="linux"
+				>
+				<File
+					RelativePath="..\..\src\ois\linux\EventHelpers.cpp"
+					>
+					<FileConfiguration
+						Name="Release|Win32"
+						ExcludedFromBuild="true"
+						>
+						<Tool
+							Name="VCCLCompilerTool"
+						/>
+					</FileConfiguration>
+					<FileConfiguration
+						Name="Debug|Win32"
+						ExcludedFromBuild="true"
+						>
+						<Tool
+							Name="VCCLCompilerTool"
+						/>
+					</FileConfiguration>
+				</File>
+				<File
+					RelativePath="..\..\src\ois\linux\LinuxForceFeedback.cpp"
+					>
+					<FileConfiguration
+						Name="Release|Win32"
+						ExcludedFromBuild="true"
+						>
+						<Tool
+							Name="VCCLCompilerTool"
+						/>
+					</FileConfiguration>
+					<FileConfiguration
+						Name="Debug|Win32"
+						ExcludedFromBuild="true"
+						>
+						<Tool
+							Name="VCCLCompilerTool"
+						/>
+					</FileConfiguration>
+				</File>
+				<File
+					RelativePath="..\..\src\ois\linux\LinuxInputManager.cpp"
+					>
+					<FileConfiguration
+						Name="Release|Win32"
+						ExcludedFromBuild="true"
+						>
+						<Tool
+							Name="VCCLCompilerTool"
+						/>
+					</FileConfiguration>
+					<FileConfiguration
+						Name="Debug|Win32"
+						ExcludedFromBuild="true"
+						>
+						<Tool
+							Name="VCCLCompilerTool"
+						/>
+					</FileConfiguration>
+				</File>
+				<File
+					RelativePath="..\..\src\ois\linux\LinuxJoyStickEvents.cpp"
+					>
+					<FileConfiguration
+						Name="Release|Win32"
+						ExcludedFromBuild="true"
+						>
+						<Tool
+							Name="VCCLCompilerTool"
+						/>
+					</FileConfiguration>
+					<FileConfiguration
+						Name="Debug|Win32"
+						ExcludedFromBuild="true"
+						>
+						<Tool
+							Name="VCCLCompilerTool"
+						/>
+					</FileConfiguration>
+				</File>
+				<File
+					RelativePath="..\..\src\ois\linux\LinuxKeyboard.cpp"
+					>
+					<FileConfiguration
+						Name="Release|Win32"
+						ExcludedFromBuild="true"
+						>
+						<Tool
+							Name="VCCLCompilerTool"
+						/>
+					</FileConfiguration>
+					<FileConfiguration
+						Name="Debug|Win32"
+						ExcludedFromBuild="true"
+						>
+						<Tool
+							Name="VCCLCompilerTool"
+						/>
+					</FileConfiguration>
+				</File>
+				<File
+					RelativePath="..\..\src\ois\linux\LinuxMouse.cpp"
+					>
+					<FileConfiguration
+						Name="Release|Win32"
+						ExcludedFromBuild="true"
+						>
+						<Tool
+							Name="VCCLCompilerTool"
+						/>
+					</FileConfiguration>
+					<FileConfiguration
+						Name="Debug|Win32"
+						ExcludedFromBuild="true"
+						>
+						<Tool
+							Name="VCCLCompilerTool"
+						/>
+					</FileConfiguration>
+				</File>
+			</Filter>
 		</Filter>
 		<Filter
@@ -650,4 +774,36 @@
 				<File
 					RelativePath="..\..\src\ois\OISInterface.h"
+					>
+				</File>
+			</Filter>
+			<Filter
+				Name="linux"
+				>
+				<File
+					RelativePath="..\..\src\ois\linux\EventHelpers.h"
+					>
+				</File>
+				<File
+					RelativePath="..\..\src\ois\linux\LinuxForceFeedback.h"
+					>
+				</File>
+				<File
+					RelativePath="..\..\src\ois\linux\LinuxInputManager.h"
+					>
+				</File>
+				<File
+					RelativePath="..\..\src\ois\linux\LinuxJoyStickEvents.h"
+					>
+				</File>
+				<File
+					RelativePath="..\..\src\ois\linux\LinuxKeyboard.h"
+					>
+				</File>
+				<File
+					RelativePath="..\..\src\ois\linux\LinuxMouse.h"
+					>
+				</File>
+				<File
+					RelativePath="..\..\src\ois\linux\LinuxPrereqs.h"
 					>
 				</File>
