Index: /orxonox/trunk/src/Makefile.am
===================================================================
--- /orxonox/trunk/src/Makefile.am	(revision 4385)
+++ /orxonox/trunk/src/Makefile.am	(revision 4386)
@@ -59,4 +59,5 @@
 		 util/event/event_handler.cc \
 		 util/event/event_listener.cc \
+		 util/event/key_mapper.cc \
 		 util/object_manager.cc \
 		 util/garbage_collector.cc \
@@ -124,4 +125,5 @@
 		 util/event/event_listener.h \
 		 util/event/event_handler.h \
+		 util/event/key_mapper.h \
 		 util/object_manager.h \
 		 util/garbage_collector.h \
Index: /orxonox/trunk/src/Makefile.in
===================================================================
--- /orxonox/trunk/src/Makefile.in	(revision 4385)
+++ /orxonox/trunk/src/Makefile.in	(revision 4386)
@@ -59,6 +59,7 @@
 	animation_player.$(OBJEXT) event.$(OBJEXT) \
 	event_handler.$(OBJEXT) event_listener.$(OBJEXT) \
-	object_manager.$(OBJEXT) garbage_collector.$(OBJEXT) \
-	list.$(OBJEXT) resource_manager.$(OBJEXT) factory.$(OBJEXT) \
+	key_mapper.$(OBJEXT) object_manager.$(OBJEXT) \
+	garbage_collector.$(OBJEXT) list.$(OBJEXT) \
+	resource_manager.$(OBJEXT) factory.$(OBJEXT) \
 	load_param.$(OBJEXT) state.$(OBJEXT) story_entity.$(OBJEXT) \
 	campaign.$(OBJEXT) world.$(OBJEXT) world_entity.$(OBJEXT) \
@@ -98,5 +99,6 @@
 @AMDEP_TRUE@	./$(DEPDIR)/graphics_engine.Po \
 @AMDEP_TRUE@	./$(DEPDIR)/helper_parent.Po \
-@AMDEP_TRUE@	./$(DEPDIR)/ini_parser.Po ./$(DEPDIR)/keynames.Po \
+@AMDEP_TRUE@	./$(DEPDIR)/ini_parser.Po \
+@AMDEP_TRUE@	./$(DEPDIR)/key_mapper.Po ./$(DEPDIR)/keynames.Po \
 @AMDEP_TRUE@	./$(DEPDIR)/light.Po ./$(DEPDIR)/list.Po \
 @AMDEP_TRUE@	./$(DEPDIR)/load_param.Po ./$(DEPDIR)/material.Po \
@@ -272,4 +274,5 @@
 		 util/event/event_handler.cc \
 		 util/event/event_listener.cc \
+		 util/event/key_mapper.cc \
 		 util/object_manager.cc \
 		 util/garbage_collector.cc \
@@ -337,4 +340,5 @@
 		 util/event/event_listener.h \
 		 util/event/event_handler.h \
+		 util/event/key_mapper.h \
 		 util/object_manager.h \
 		 util/garbage_collector.h \
@@ -504,4 +508,5 @@
 @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/helper_parent.Po@am__quote@
 @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/ini_parser.Po@am__quote@
+@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/key_mapper.Po@am__quote@
 @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/keynames.Po@am__quote@
 @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/light.Po@am__quote@
@@ -718,4 +723,20 @@
 @AMDEP_TRUE@@am__fastdepCXX_FALSE@	$(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@
 @am__fastdepCXX_FALSE@	$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -c -o event_listener.obj `if test -f 'util/event/event_listener.cc'; then $(CYGPATH_W) 'util/event/event_listener.cc'; else $(CYGPATH_W) '$(srcdir)/util/event/event_listener.cc'; fi`
+
+key_mapper.o: util/event/key_mapper.cc
+@am__fastdepCXX_TRUE@	if $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -MT key_mapper.o -MD -MP -MF "$(DEPDIR)/key_mapper.Tpo" -c -o key_mapper.o `test -f 'util/event/key_mapper.cc' || echo '$(srcdir)/'`util/event/key_mapper.cc; \
+@am__fastdepCXX_TRUE@	then mv -f "$(DEPDIR)/key_mapper.Tpo" "$(DEPDIR)/key_mapper.Po"; else rm -f "$(DEPDIR)/key_mapper.Tpo"; exit 1; fi
+@AMDEP_TRUE@@am__fastdepCXX_FALSE@	source='util/event/key_mapper.cc' object='key_mapper.o' libtool=no @AMDEPBACKSLASH@
+@AMDEP_TRUE@@am__fastdepCXX_FALSE@	depfile='$(DEPDIR)/key_mapper.Po' tmpdepfile='$(DEPDIR)/key_mapper.TPo' @AMDEPBACKSLASH@
+@AMDEP_TRUE@@am__fastdepCXX_FALSE@	$(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+@am__fastdepCXX_FALSE@	$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -c -o key_mapper.o `test -f 'util/event/key_mapper.cc' || echo '$(srcdir)/'`util/event/key_mapper.cc
+
+key_mapper.obj: util/event/key_mapper.cc
+@am__fastdepCXX_TRUE@	if $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -MT key_mapper.obj -MD -MP -MF "$(DEPDIR)/key_mapper.Tpo" -c -o key_mapper.obj `if test -f 'util/event/key_mapper.cc'; then $(CYGPATH_W) 'util/event/key_mapper.cc'; else $(CYGPATH_W) '$(srcdir)/util/event/key_mapper.cc'; fi`; \
+@am__fastdepCXX_TRUE@	then mv -f "$(DEPDIR)/key_mapper.Tpo" "$(DEPDIR)/key_mapper.Po"; else rm -f "$(DEPDIR)/key_mapper.Tpo"; exit 1; fi
+@AMDEP_TRUE@@am__fastdepCXX_FALSE@	source='util/event/key_mapper.cc' object='key_mapper.obj' libtool=no @AMDEPBACKSLASH@
+@AMDEP_TRUE@@am__fastdepCXX_FALSE@	depfile='$(DEPDIR)/key_mapper.Po' tmpdepfile='$(DEPDIR)/key_mapper.TPo' @AMDEPBACKSLASH@
+@AMDEP_TRUE@@am__fastdepCXX_FALSE@	$(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+@am__fastdepCXX_FALSE@	$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -c -o key_mapper.obj `if test -f 'util/event/key_mapper.cc'; then $(CYGPATH_W) 'util/event/key_mapper.cc'; else $(CYGPATH_W) '$(srcdir)/util/event/key_mapper.cc'; fi`
 
 object_manager.o: util/object_manager.cc
Index: /orxonox/trunk/src/command_node.cc
===================================================================
--- /orxonox/trunk/src/command_node.cc	(revision 4385)
+++ /orxonox/trunk/src/command_node.cc	(revision 4386)
@@ -271,5 +271,4 @@
 	  cmd.bUp = true;
 	  if( strlen (cmd.cmd) > 0) relay(&cmd);
-	  printf("mouse activity: %i \n", event.key.keysym.sym );
 	  break;
 	case SDL_MOUSEBUTTONDOWN:
Index: /orxonox/trunk/src/util/event/event_handler.cc
===================================================================
--- /orxonox/trunk/src/util/event/event_handler.cc	(revision 4385)
+++ /orxonox/trunk/src/util/event/event_handler.cc	(revision 4386)
@@ -22,6 +22,4 @@
 #include "event.h"
 
-#include "ini_parser.h"
-#include "keynames.h"
 #include "compiler.h"
 #include "debug.h"
Index: /orxonox/trunk/src/util/event/event_handler.h
===================================================================
--- /orxonox/trunk/src/util/event/event_handler.h	(revision 4385)
+++ /orxonox/trunk/src/util/event/event_handler.h	(revision 4386)
@@ -16,14 +16,5 @@
 
 
-//! Key aliasing structure
-/**
-   This structure contains the key aliasing information, e.g. the command strings that
-   have been bound to the keys.
-*/
-typedef struct
-{
-  char keys[N_STD_KEYS][CMD_LENGHT];
-  char buttons[N_BUTTONS][CMD_LENGHT];
-} KeyBindings;
+
 
 
@@ -50,5 +41,4 @@
  private:
   static EventHandler* singletonRef;
-  KeyBindings* keyAliases;
   EventListener*** listeners;                         //!< a list of registered listeners
   elState state;
Index: /orxonox/trunk/src/util/event/key_mapper.cc
===================================================================
--- /orxonox/trunk/src/util/event/key_mapper.cc	(revision 4385)
+++ /orxonox/trunk/src/util/event/key_mapper.cc	(revision 4386)
@@ -16,7 +16,28 @@
 #define DEBUG_SPECIAL_MODULE DEBUG_MODULE_EVENT
 
-#include "event.h"
+#include "key_mapper.h"
+
+#include "ini_parser.h"
+#include "keynames.h"
 
 using namespace std;
+
+
+
+int KeyMapper::PEV_UP = -1;
+int KeyMapper::PEV_DOWN = -1;
+int KeyMapper::PEV_LEFT = -1;
+int KeyMapper::PEV_RIGHT = -1;
+int KeyMapper::PEV_STRAFE_LEFT = -1;
+int KeyMapper::PEV_STRAFE_RIGHT = -1;
+
+int KeyMapper::PEV_FIRE1 = -1;
+int KeyMapper::PEV_FIRE2 = -1;
+
+int KeyMapper::PEV_VIEW1 = -1;
+int KeyMapper::PEV_VIEW2 = -1;
+int KeyMapper::PEV_VIEW3 = -1;
+int KeyMapper::PEV_VIEW4 = -1;
+
 
 
@@ -28,5 +49,5 @@
 {
    this->setClassID(CL_KEY_MAPPER, "KeyMapper"); 
-
+   this->keyAliases = NULL;
 }
 
@@ -41,5 +62,5 @@
 }
 
-
+\
 /**
    \brief loads new key bindings from a file
@@ -115,15 +136,5 @@
   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;
-	}
-
+      index = nameToIndex (valuebuf);     
 
       switch( index[0])
@@ -144,2 +155,22 @@
     }
 }
+
+
+
+int* KeyMapper::nameToIndex (char* name)
+{
+  coord[0] = -1;
+  coord[1] = -1;
+  int c;
+  if( (c = keynameToSDLK (name)) != -1)
+    {
+      coord[1] = c;
+      coord[0] = 0;
+    }
+  if( (c = buttonnameToSDLB (name)) != -1)
+    {
+      coord[1] = c;
+      coord[0] = 1;
+    }
+  return coord;
+}
Index: /orxonox/trunk/src/util/event/key_mapper.h
===================================================================
--- /orxonox/trunk/src/util/event/key_mapper.h	(revision 4385)
+++ /orxonox/trunk/src/util/event/key_mapper.h	(revision 4386)
@@ -11,4 +11,16 @@
 #include "base_object.h"
 #include "event_def.h"
+
+
+//! Key aliasing structure
+/**
+   This structure contains the key aliasing information, e.g. the command strings that
+   have been bound to the keys.
+*/
+typedef struct
+{
+  char keys[N_STD_KEYS][CMD_LENGHT];
+  char buttons[N_BUTTONS][CMD_LENGHT];
+} KeyBindings;
 
 
@@ -44,4 +56,5 @@
  private:
   KeyBindings* keyAliases;
+  Sint32 coord[2];
 };
 
