Index: /orxonox/trunk/src/util/event/event_handler.cc
===================================================================
--- /orxonox/trunk/src/util/event/event_handler.cc	(revision 4368)
+++ /orxonox/trunk/src/util/event/event_handler.cc	(revision 4369)
@@ -74,107 +74,4 @@
 }
 
-
-/**
-   \brief loads new key bindings from a file
-   \param filename: The path and name of the file to load the bindings from
-*/
-void EventHandler::loadKeyBindings (const char* fileName)
-{
-  FILE* stream;
-  
-  PRINTF(4)("Loading key bindings from %s\n", fileName);
-  
-  // remove old bindings if present
-  if( this->keyAliases != NULL)
-    {
-      free (this->keyAliases);
-      this->keyAliases = NULL;
-    }
-  
-  // create parser
-  IniParser parser(fileName);
-  if( parser.getSection (CONFIG_SECTION_PLAYER "1") == -1)
-    {
-      PRINTF(1)("Could not find key bindings " CONFIG_SECTION_PLAYER"1 in %s\n", fileName);
-      return;
-    }
-  // allocate empty lookup table
-  this->keyAliases = (KeyBindings*) calloc (1, sizeof (KeyBindings));
-  
-  char namebuf[256];
-  char valuebuf[256];
-  memset (namebuf, 0, 256);
-  memset (valuebuf, 0, 256);
-  int* index;
-  
-  while( parser.nextVar (namebuf, valuebuf) != -1)
-    {
-      //index = nameToIndex (valuebuf);
-      int c;
-      if( (c = keynameToSDLK (valuebuf)) != -1)
-	{
-	  index[1] = c; index[0] = 0;
-	}
-      if( (c = buttonnameToSDLB (valuebuf)) != -1)
-	{
-	  index[1] = c; index[0] = 1;
-	}
-
-      switch( index[0])
-	{
-	case 0:
-	  PRINTF(4)("Key binding %d(%s) set to %s\n", index[1], SDLKToKeyname( index[1]), namebuf);
-	  strcpy (this->keyAliases->keys[index[1]], namebuf);
-	  break;
-	case 1:
-	  PRINTF(4)("Button binding %d(%s) set to %s\n", index[1], SDLBToButtonname( index[1]), namebuf);
-	  strcpy (this->keyAliases->buttons[index[1]], namebuf);
-	  break;
-	default:
-	  break;
-	}
-      memset (namebuf, 0, 256);
-      memset (valuebuf, 0, 256);
-    }
-
-
-  // PARSE MISC SECTION
-  if( parser.getSection (CONFIG_SECTION_MISC_KEYS) == -1)
-    {
-      PRINTF(1)("Could not find key bindings in %s\n", fileName);
-      return;
-    }
-
-  while( parser.nextVar (namebuf, valuebuf) != -1)
-    {
-      //index = nameToIndex (valuebuf);     
-      int c;
-      if( (c = keynameToSDLK (valuebuf)) != -1)
-	{
-	  index[1] = c; index[0] = 0;
-	}
-      if( (c = buttonnameToSDLB (valuebuf)) != -1)
-	{
-	  index[1] = c; index[0] = 1;
-	}
-
-
-      switch( index[0])
-	{
-	case 0:
-	  PRINTF(4)("Key binding %d(%s) set to %s\n", index[1], SDLKToKeyname( index[1]), namebuf);
-	  strcpy (keyAliases->keys[index[1]], namebuf);
-	  break;
-	case 1:
-	  PRINTF(4)("Button binding %d(%s) set to %s\n", index[1], SDLBToButtonname( index[1]), namebuf);
-	  strcpy (keyAliases->buttons[index[1]], namebuf);
-	  break;
-	default:
-	  break;
-	}
-      memset (namebuf, 0, 256);
-      memset (valuebuf, 0, 256);
-    }
-}
 
 
Index: /orxonox/trunk/src/util/event/event_handler.h
===================================================================
--- /orxonox/trunk/src/util/event/event_handler.h	(revision 4368)
+++ /orxonox/trunk/src/util/event/event_handler.h	(revision 4369)
@@ -40,6 +40,4 @@
   void unsubscribeListener(int eventType, elState state);
   void flush(elState state);
-  
-  void loadKeyBindings(const char* fileName);
 
   void tick(float t);
Index: /orxonox/trunk/src/util/event/key_mapper.cc
===================================================================
--- /orxonox/trunk/src/util/event/key_mapper.cc	(revision 4368)
+++ /orxonox/trunk/src/util/event/key_mapper.cc	(revision 4369)
@@ -40,2 +40,106 @@
   // delete what has to be deleted here
 }
+
+
+/**
+   \brief loads new key bindings from a file
+   \param filename: The path and name of the file to load the bindings from
+*/
+void KeyMapper::loadKeyBindings (const char* fileName)
+{
+  FILE* stream;
+  
+  PRINTF(4)("Loading key bindings from %s\n", fileName);
+  
+  // remove old bindings if present
+  if( this->keyAliases != NULL)
+    {
+      free (this->keyAliases);
+      this->keyAliases = NULL;
+    }
+  
+  // create parser
+  IniParser parser(fileName);
+  if( parser.getSection (CONFIG_SECTION_PLAYER "1") == -1)
+    {
+      PRINTF(1)("Could not find key bindings " CONFIG_SECTION_PLAYER"1 in %s\n", fileName);
+      return;
+    }
+  // allocate empty lookup table
+  this->keyAliases = (KeyBindings*) calloc (1, sizeof (KeyBindings));
+  
+  char namebuf[256];
+  char valuebuf[256];
+  memset (namebuf, 0, 256);
+  memset (valuebuf, 0, 256);
+  int* index;
+  
+  while( parser.nextVar (namebuf, valuebuf) != -1)
+    {
+      //index = nameToIndex (valuebuf);
+      int c;
+      if( (c = keynameToSDLK (valuebuf)) != -1)
+	{
+	  index[1] = c; index[0] = 0;
+	}
+      if( (c = buttonnameToSDLB (valuebuf)) != -1)
+	{
+	  index[1] = c; index[0] = 1;
+	}
+
+      switch( index[0])
+	{
+	case 0:
+	  PRINTF(4)("Key binding %d(%s) set to %s\n", index[1], SDLKToKeyname( index[1]), namebuf);
+	  strcpy (this->keyAliases->keys[index[1]], namebuf);
+	  break;
+	case 1:
+	  PRINTF(4)("Button binding %d(%s) set to %s\n", index[1], SDLBToButtonname( index[1]), namebuf);
+	  strcpy (this->keyAliases->buttons[index[1]], namebuf);
+	  break;
+	default:
+	  break;
+	}
+      memset (namebuf, 0, 256);
+      memset (valuebuf, 0, 256);
+    }
+
+
+  // PARSE MISC SECTION
+  if( parser.getSection (CONFIG_SECTION_MISC_KEYS) == -1)
+    {
+      PRINTF(1)("Could not find key bindings in %s\n", fileName);
+      return;
+    }
+
+  while( parser.nextVar (namebuf, valuebuf) != -1)
+    {
+      //index = nameToIndex (valuebuf);     
+      int c;
+      if( (c = keynameToSDLK (valuebuf)) != -1)
+	{
+	  index[1] = c; index[0] = 0;
+	}
+      if( (c = buttonnameToSDLB (valuebuf)) != -1)
+	{
+	  index[1] = c; index[0] = 1;
+	}
+
+
+      switch( index[0])
+	{
+	case 0:
+	  PRINTF(4)("Key binding %d(%s) set to %s\n", index[1], SDLKToKeyname( index[1]), namebuf);
+	  strcpy (keyAliases->keys[index[1]], namebuf);
+	  break;
+	case 1:
+	  PRINTF(4)("Button binding %d(%s) set to %s\n", index[1], SDLBToButtonname( index[1]), namebuf);
+	  strcpy (keyAliases->buttons[index[1]], namebuf);
+	  break;
+	default:
+	  break;
+	}
+      memset (namebuf, 0, 256);
+      memset (valuebuf, 0, 256);
+    }
+}
