Index: branches/preferences/src/lib/event/event_handler.cc
===================================================================
--- branches/preferences/src/lib/event/event_handler.cc	(revision 7247)
+++ branches/preferences/src/lib/event/event_handler.cc	(revision 7248)
@@ -88,10 +88,10 @@
  * this has to be called before the use of the event handler
 */
-void EventHandler::init(IniParser* iniParser)
+void EventHandler::init()
 {
   if (this->keyMapper == NULL)
   {
     this->keyMapper = new KeyMapper();
-    this->keyMapper->loadKeyBindings(iniParser);
+    this->keyMapper->loadKeyBindings();
   }
 }
Index: branches/preferences/src/lib/event/event_handler.h
===================================================================
--- branches/preferences/src/lib/event/event_handler.h	(revision 7247)
+++ branches/preferences/src/lib/event/event_handler.h	(revision 7248)
@@ -15,5 +15,4 @@
 // FORWARD DECLARATION
 class EventListener;
-class IniParser;
 
 //! The one Event Handler from Orxonox
@@ -24,5 +23,5 @@
   /** @returns a Pointer to the only object of this Class */
   inline static EventHandler* getInstance() { if (!singletonRef) singletonRef = new EventHandler();  return singletonRef; };
-  void init(IniParser* iniParser);
+  void init();
 
   /** @param state: to which the event handler shall change */
Index: branches/preferences/src/lib/event/key_mapper.cc
===================================================================
--- branches/preferences/src/lib/event/key_mapper.cc	(revision 7247)
+++ branches/preferences/src/lib/event/key_mapper.cc	(revision 7248)
@@ -25,4 +25,5 @@
 #include "globals.h"
 #include "parser/ini_parser/ini_parser.h"
+#include "util/preferences.h"
 #include "key_names.h"
 #include "debug.h"
@@ -145,5 +146,5 @@
 
   iniParser->firstVar();
-  while(iniParser->getCurrentName() != "")
+  while( iniParser->getCurrentName() != "" )
   {
     PRINTF(3)("Keys: Parsing %s, %s now.\n", iniParser->getCurrentName(), iniParser->getCurrentValue());
@@ -164,5 +165,5 @@
 
   iniParser->firstVar();
-  while(iniParser->getCurrentName() != "")
+  while( iniParser->getCurrentName() != "" )
   {
     PRINTF(3)("MISC: Parsing %s, %s now.\n", iniParser->getCurrentName(), iniParser->getCurrentValue());
@@ -170,4 +171,40 @@
     this->mapKeys(iniParser->getCurrentName(), index);
     iniParser->nextVar();
+  }
+}
+
+void KeyMapper::loadKeyBindings()
+{
+  if( !Preferences::getInstance()->sectionExists(CONFIG_SECTION_PLAYER "1"))
+  {
+    PRINTF(1)("Could not find key bindings " CONFIG_SECTION_PLAYER"1\n");
+    return;
+  }
+  int* index;
+
+  std::list<std::string> keys = Preferences::getInstance()->listKeys(CONFIG_SECTION_PLAYER "1");
+  for ( std::list<std::string>::const_iterator it = keys.begin(); it!=keys.end(); it++ )
+  {
+    PRINTF(0)("Keys: Parsing %s, %s now.\n", it->c_str(), Preferences::getInstance()->getString(CONFIG_SECTION_PLAYER "1", *it, "").c_str());
+    // map the name to an sdl index
+    index = nameToIndex (Preferences::getInstance()->getString(CONFIG_SECTION_PLAYER "1", *it, ""));
+    // map the index to a internal name
+    this->mapKeys(*it, index);
+  }
+
+
+  // PARSE MISC SECTION
+  if( !Preferences::getInstance()->sectionExists (CONFIG_SECTION_MISC_KEYS))
+  {
+    PRINTF(1)("Could not find key bindings " CONFIG_SECTION_MISC_KEYS "\n");
+    return;
+  }
+
+  keys = Preferences::getInstance()->listKeys(CONFIG_SECTION_MISC_KEYS);
+  for ( std::list<std::string>::const_iterator it = keys.begin(); it!=keys.end(); it++ )
+  {
+    PRINTF(3)("MISC: Parsing %s, %s now.\n", it->c_str(), Preferences::getInstance()->getString(CONFIG_SECTION_MISC_KEYS, *it, "").c_str());
+    index = nameToIndex (Preferences::getInstance()->getString(CONFIG_SECTION_MISC_KEYS, *it, ""));
+    this->mapKeys(*it, index);
   }
 }
Index: branches/preferences/src/lib/event/key_mapper.h
===================================================================
--- branches/preferences/src/lib/event/key_mapper.h	(revision 7247)
+++ branches/preferences/src/lib/event/key_mapper.h	(revision 7248)
@@ -29,5 +29,6 @@
   virtual ~KeyMapper();
 
-  void loadKeyBindings(const std::string& fileName = "" );
+  void loadKeyBindings(const std::string& fileName );
+  void loadKeyBindings();
   void loadKeyBindings(IniParser* iniParser);
 
Index: branches/preferences/src/lib/util/preferences.cc
===================================================================
--- branches/preferences/src/lib/util/preferences.cc	(revision 7247)
+++ branches/preferences/src/lib/util/preferences.cc	(revision 7248)
@@ -67,4 +67,25 @@
 
       break;
+    }
+  }
+
+  return false;
+}
+
+/**
+ * Check if this section exists
+ * @param section name of the section
+ * @param name name of the item to check
+ * @return true if the item exists
+ */
+bool Preferences::sectionExists( const std::string& section )
+{
+  std::list<prefSection>::const_iterator it = data.begin();
+
+  for ( ; it!=data.end(); it++)
+  {
+    if ( it->sectionName == section )
+    {
+      return true;
     }
   }
@@ -285,3 +306,32 @@
 }
 
-
+/**
+ * list all keys in section
+ * @param section section
+ * @return list of keys
+ */
+std::list< std::string > Preferences::listKeys( const std::string section )
+{
+  std::list<std::string> lst;
+  
+  std::list<prefSection>::const_iterator it = data.begin();
+
+  for ( ; it!=data.end(); it++)
+  {
+    if ( it->sectionName == section )
+    {
+      std::list<prefItem>::const_iterator it2 = it->items.begin();
+
+      for ( ; it2!=it->items.end(); it2++)
+      {
+        lst.push_back( it2->name );
+      }
+
+      break;
+    }
+  }
+
+  return lst;
+}
+
+
Index: branches/preferences/src/lib/util/preferences.h
===================================================================
--- branches/preferences/src/lib/util/preferences.h	(revision 7247)
+++ branches/preferences/src/lib/util/preferences.h	(revision 7248)
@@ -36,4 +36,5 @@
 
    //check if this entry exists
+   bool sectionExists(const std::string& section );
    bool exists(const std::string& section, const std::string& name);
 
@@ -52,6 +53,7 @@
    bool save();
 
-
    void debug();
+   
+   std::list<std::string> listKeys( const std::string section );
 
 
