Index: /orxonox/trunk/src/Makefile.am
===================================================================
--- /orxonox/trunk/src/Makefile.am	(revision 4456)
+++ /orxonox/trunk/src/Makefile.am	(revision 4457)
@@ -29,9 +29,4 @@
 		 util/animation/animation3d.cc \
 		 util/animation/animation_player.cc \
-		 util/event/event.cc \
-		 util/event/event_handler.cc \
-		 util/event/event_listener.cc \
-		 util/event/key_mapper.cc \
-		 util/event/key_names.cc \
 		 util/object_manager.cc \
 		 util/garbage_collector.cc \
@@ -61,4 +56,9 @@
 		 lib/coord/null_parent.cc \
 		 lib/coord/helper_parent.cc \
+		 lib/event/event.cc \
+		 lib/event/event_handler.cc \
+		 lib/event/event_listener.cc \
+		 lib/event/key_mapper.cc \
+		 lib/event/key_names.cc \
 		 lib/graphics/graphics_engine.cc \
 		 lib/graphics/light.cc \
@@ -90,10 +90,4 @@
 		 util/animation/animation3d.h \
 		 util/animation/animation_player.h \
-		 util/event/event.h \
-		 util/event/event_def.h \
-		 util/event/event_listener.h \
-		 util/event/event_handler.h \
-		 util/event/key_mapper.h \
-		 util/event/key_names.h \
 		 util/object_manager.h \
 		 util/garbage_collector.h \
@@ -133,4 +127,10 @@
 		 lib/coord/null_parent.h \
 		 lib/coord/helper_parent.h \
+		 lib/event/event.h \
+		 lib/event/event_def.h \
+		 lib/event/event_listener.h \
+		 lib/event/event_handler.h \
+		 lib/event/key_mapper.h \
+		 lib/event/key_names.h \
 		 lib/graphics/graphics_engine.h \
 		 lib/graphics/light.h \
Index: /orxonox/trunk/src/Makefile.in
===================================================================
--- /orxonox/trunk/src/Makefile.in	(revision 4456)
+++ /orxonox/trunk/src/Makefile.in	(revision 4457)
@@ -56,9 +56,7 @@
 	track_manager.$(OBJEXT) track_node.$(OBJEXT) \
 	pilot_node.$(OBJEXT) animation.$(OBJEXT) animation3d.$(OBJEXT) \
-	animation_player.$(OBJEXT) event.$(OBJEXT) \
-	event_handler.$(OBJEXT) event_listener.$(OBJEXT) \
-	key_mapper.$(OBJEXT) key_names.$(OBJEXT) \
-	object_manager.$(OBJEXT) garbage_collector.$(OBJEXT) \
-	list.$(OBJEXT) resource_manager.$(OBJEXT) factory.$(OBJEXT) \
+	animation_player.$(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) \
@@ -68,5 +66,7 @@
 	character_attributes.$(OBJEXT) test_gun.$(OBJEXT) \
 	test_bullet.$(OBJEXT) test_entity.$(OBJEXT) p_node.$(OBJEXT) \
-	null_parent.$(OBJEXT) helper_parent.$(OBJEXT) \
+	null_parent.$(OBJEXT) helper_parent.$(OBJEXT) event.$(OBJEXT) \
+	event_handler.$(OBJEXT) event_listener.$(OBJEXT) \
+	key_mapper.$(OBJEXT) key_names.$(OBJEXT) \
 	graphics_engine.$(OBJEXT) light.$(OBJEXT) \
 	text_engine.$(OBJEXT) array.$(OBJEXT) objModel.$(OBJEXT) \
@@ -265,9 +265,4 @@
 		 util/animation/animation3d.cc \
 		 util/animation/animation_player.cc \
-		 util/event/event.cc \
-		 util/event/event_handler.cc \
-		 util/event/event_listener.cc \
-		 util/event/key_mapper.cc \
-		 util/event/key_names.cc \
 		 util/object_manager.cc \
 		 util/garbage_collector.cc \
@@ -297,4 +292,9 @@
 		 lib/coord/null_parent.cc \
 		 lib/coord/helper_parent.cc \
+		 lib/event/event.cc \
+		 lib/event/event_handler.cc \
+		 lib/event/event_listener.cc \
+		 lib/event/key_mapper.cc \
+		 lib/event/key_names.cc \
 		 lib/graphics/graphics_engine.cc \
 		 lib/graphics/light.cc \
@@ -326,10 +326,4 @@
 		 util/animation/animation3d.h \
 		 util/animation/animation_player.h \
-		 util/event/event.h \
-		 util/event/event_def.h \
-		 util/event/event_listener.h \
-		 util/event/event_handler.h \
-		 util/event/key_mapper.h \
-		 util/event/key_names.h \
 		 util/object_manager.h \
 		 util/garbage_collector.h \
@@ -369,4 +363,10 @@
 		 lib/coord/null_parent.h \
 		 lib/coord/helper_parent.h \
+		 lib/event/event.h \
+		 lib/event/event_def.h \
+		 lib/event/event_listener.h \
+		 lib/event/event_handler.h \
+		 lib/event/key_mapper.h \
+		 lib/event/key_names.h \
 		 lib/graphics/graphics_engine.h \
 		 lib/graphics/light.h \
@@ -659,84 +659,4 @@
 @am__fastdepCXX_FALSE@	$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -c -o animation_player.obj `if test -f 'util/animation/animation_player.cc'; then $(CYGPATH_W) 'util/animation/animation_player.cc'; else $(CYGPATH_W) '$(srcdir)/util/animation/animation_player.cc'; fi`
 
-event.o: util/event/event.cc
-@am__fastdepCXX_TRUE@	if $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -MT event.o -MD -MP -MF "$(DEPDIR)/event.Tpo" -c -o event.o `test -f 'util/event/event.cc' || echo '$(srcdir)/'`util/event/event.cc; \
-@am__fastdepCXX_TRUE@	then mv -f "$(DEPDIR)/event.Tpo" "$(DEPDIR)/event.Po"; else rm -f "$(DEPDIR)/event.Tpo"; exit 1; fi
-@AMDEP_TRUE@@am__fastdepCXX_FALSE@	source='util/event/event.cc' object='event.o' libtool=no @AMDEPBACKSLASH@
-@AMDEP_TRUE@@am__fastdepCXX_FALSE@	depfile='$(DEPDIR)/event.Po' tmpdepfile='$(DEPDIR)/event.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 event.o `test -f 'util/event/event.cc' || echo '$(srcdir)/'`util/event/event.cc
-
-event.obj: util/event/event.cc
-@am__fastdepCXX_TRUE@	if $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -MT event.obj -MD -MP -MF "$(DEPDIR)/event.Tpo" -c -o event.obj `if test -f 'util/event/event.cc'; then $(CYGPATH_W) 'util/event/event.cc'; else $(CYGPATH_W) '$(srcdir)/util/event/event.cc'; fi`; \
-@am__fastdepCXX_TRUE@	then mv -f "$(DEPDIR)/event.Tpo" "$(DEPDIR)/event.Po"; else rm -f "$(DEPDIR)/event.Tpo"; exit 1; fi
-@AMDEP_TRUE@@am__fastdepCXX_FALSE@	source='util/event/event.cc' object='event.obj' libtool=no @AMDEPBACKSLASH@
-@AMDEP_TRUE@@am__fastdepCXX_FALSE@	depfile='$(DEPDIR)/event.Po' tmpdepfile='$(DEPDIR)/event.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 event.obj `if test -f 'util/event/event.cc'; then $(CYGPATH_W) 'util/event/event.cc'; else $(CYGPATH_W) '$(srcdir)/util/event/event.cc'; fi`
-
-event_handler.o: util/event/event_handler.cc
-@am__fastdepCXX_TRUE@	if $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -MT event_handler.o -MD -MP -MF "$(DEPDIR)/event_handler.Tpo" -c -o event_handler.o `test -f 'util/event/event_handler.cc' || echo '$(srcdir)/'`util/event/event_handler.cc; \
-@am__fastdepCXX_TRUE@	then mv -f "$(DEPDIR)/event_handler.Tpo" "$(DEPDIR)/event_handler.Po"; else rm -f "$(DEPDIR)/event_handler.Tpo"; exit 1; fi
-@AMDEP_TRUE@@am__fastdepCXX_FALSE@	source='util/event/event_handler.cc' object='event_handler.o' libtool=no @AMDEPBACKSLASH@
-@AMDEP_TRUE@@am__fastdepCXX_FALSE@	depfile='$(DEPDIR)/event_handler.Po' tmpdepfile='$(DEPDIR)/event_handler.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 event_handler.o `test -f 'util/event/event_handler.cc' || echo '$(srcdir)/'`util/event/event_handler.cc
-
-event_handler.obj: util/event/event_handler.cc
-@am__fastdepCXX_TRUE@	if $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -MT event_handler.obj -MD -MP -MF "$(DEPDIR)/event_handler.Tpo" -c -o event_handler.obj `if test -f 'util/event/event_handler.cc'; then $(CYGPATH_W) 'util/event/event_handler.cc'; else $(CYGPATH_W) '$(srcdir)/util/event/event_handler.cc'; fi`; \
-@am__fastdepCXX_TRUE@	then mv -f "$(DEPDIR)/event_handler.Tpo" "$(DEPDIR)/event_handler.Po"; else rm -f "$(DEPDIR)/event_handler.Tpo"; exit 1; fi
-@AMDEP_TRUE@@am__fastdepCXX_FALSE@	source='util/event/event_handler.cc' object='event_handler.obj' libtool=no @AMDEPBACKSLASH@
-@AMDEP_TRUE@@am__fastdepCXX_FALSE@	depfile='$(DEPDIR)/event_handler.Po' tmpdepfile='$(DEPDIR)/event_handler.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 event_handler.obj `if test -f 'util/event/event_handler.cc'; then $(CYGPATH_W) 'util/event/event_handler.cc'; else $(CYGPATH_W) '$(srcdir)/util/event/event_handler.cc'; fi`
-
-event_listener.o: util/event/event_listener.cc
-@am__fastdepCXX_TRUE@	if $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -MT event_listener.o -MD -MP -MF "$(DEPDIR)/event_listener.Tpo" -c -o event_listener.o `test -f 'util/event/event_listener.cc' || echo '$(srcdir)/'`util/event/event_listener.cc; \
-@am__fastdepCXX_TRUE@	then mv -f "$(DEPDIR)/event_listener.Tpo" "$(DEPDIR)/event_listener.Po"; else rm -f "$(DEPDIR)/event_listener.Tpo"; exit 1; fi
-@AMDEP_TRUE@@am__fastdepCXX_FALSE@	source='util/event/event_listener.cc' object='event_listener.o' libtool=no @AMDEPBACKSLASH@
-@AMDEP_TRUE@@am__fastdepCXX_FALSE@	depfile='$(DEPDIR)/event_listener.Po' tmpdepfile='$(DEPDIR)/event_listener.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 event_listener.o `test -f 'util/event/event_listener.cc' || echo '$(srcdir)/'`util/event/event_listener.cc
-
-event_listener.obj: util/event/event_listener.cc
-@am__fastdepCXX_TRUE@	if $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -MT event_listener.obj -MD -MP -MF "$(DEPDIR)/event_listener.Tpo" -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`; \
-@am__fastdepCXX_TRUE@	then mv -f "$(DEPDIR)/event_listener.Tpo" "$(DEPDIR)/event_listener.Po"; else rm -f "$(DEPDIR)/event_listener.Tpo"; exit 1; fi
-@AMDEP_TRUE@@am__fastdepCXX_FALSE@	source='util/event/event_listener.cc' object='event_listener.obj' libtool=no @AMDEPBACKSLASH@
-@AMDEP_TRUE@@am__fastdepCXX_FALSE@	depfile='$(DEPDIR)/event_listener.Po' tmpdepfile='$(DEPDIR)/event_listener.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 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`
-
-key_names.o: util/event/key_names.cc
-@am__fastdepCXX_TRUE@	if $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -MT key_names.o -MD -MP -MF "$(DEPDIR)/key_names.Tpo" -c -o key_names.o `test -f 'util/event/key_names.cc' || echo '$(srcdir)/'`util/event/key_names.cc; \
-@am__fastdepCXX_TRUE@	then mv -f "$(DEPDIR)/key_names.Tpo" "$(DEPDIR)/key_names.Po"; else rm -f "$(DEPDIR)/key_names.Tpo"; exit 1; fi
-@AMDEP_TRUE@@am__fastdepCXX_FALSE@	source='util/event/key_names.cc' object='key_names.o' libtool=no @AMDEPBACKSLASH@
-@AMDEP_TRUE@@am__fastdepCXX_FALSE@	depfile='$(DEPDIR)/key_names.Po' tmpdepfile='$(DEPDIR)/key_names.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_names.o `test -f 'util/event/key_names.cc' || echo '$(srcdir)/'`util/event/key_names.cc
-
-key_names.obj: util/event/key_names.cc
-@am__fastdepCXX_TRUE@	if $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -MT key_names.obj -MD -MP -MF "$(DEPDIR)/key_names.Tpo" -c -o key_names.obj `if test -f 'util/event/key_names.cc'; then $(CYGPATH_W) 'util/event/key_names.cc'; else $(CYGPATH_W) '$(srcdir)/util/event/key_names.cc'; fi`; \
-@am__fastdepCXX_TRUE@	then mv -f "$(DEPDIR)/key_names.Tpo" "$(DEPDIR)/key_names.Po"; else rm -f "$(DEPDIR)/key_names.Tpo"; exit 1; fi
-@AMDEP_TRUE@@am__fastdepCXX_FALSE@	source='util/event/key_names.cc' object='key_names.obj' libtool=no @AMDEPBACKSLASH@
-@AMDEP_TRUE@@am__fastdepCXX_FALSE@	depfile='$(DEPDIR)/key_names.Po' tmpdepfile='$(DEPDIR)/key_names.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_names.obj `if test -f 'util/event/key_names.cc'; then $(CYGPATH_W) 'util/event/key_names.cc'; else $(CYGPATH_W) '$(srcdir)/util/event/key_names.cc'; fi`
-
 object_manager.o: util/object_manager.cc
 @am__fastdepCXX_TRUE@	if $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -MT object_manager.o -MD -MP -MF "$(DEPDIR)/object_manager.Tpo" -c -o object_manager.o `test -f 'util/object_manager.cc' || echo '$(srcdir)/'`util/object_manager.cc; \
@@ -1170,4 +1090,84 @@
 @AMDEP_TRUE@@am__fastdepCXX_FALSE@	$(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@
 @am__fastdepCXX_FALSE@	$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -c -o helper_parent.obj `if test -f 'lib/coord/helper_parent.cc'; then $(CYGPATH_W) 'lib/coord/helper_parent.cc'; else $(CYGPATH_W) '$(srcdir)/lib/coord/helper_parent.cc'; fi`
+
+event.o: lib/event/event.cc
+@am__fastdepCXX_TRUE@	if $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -MT event.o -MD -MP -MF "$(DEPDIR)/event.Tpo" -c -o event.o `test -f 'lib/event/event.cc' || echo '$(srcdir)/'`lib/event/event.cc; \
+@am__fastdepCXX_TRUE@	then mv -f "$(DEPDIR)/event.Tpo" "$(DEPDIR)/event.Po"; else rm -f "$(DEPDIR)/event.Tpo"; exit 1; fi
+@AMDEP_TRUE@@am__fastdepCXX_FALSE@	source='lib/event/event.cc' object='event.o' libtool=no @AMDEPBACKSLASH@
+@AMDEP_TRUE@@am__fastdepCXX_FALSE@	depfile='$(DEPDIR)/event.Po' tmpdepfile='$(DEPDIR)/event.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 event.o `test -f 'lib/event/event.cc' || echo '$(srcdir)/'`lib/event/event.cc
+
+event.obj: lib/event/event.cc
+@am__fastdepCXX_TRUE@	if $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -MT event.obj -MD -MP -MF "$(DEPDIR)/event.Tpo" -c -o event.obj `if test -f 'lib/event/event.cc'; then $(CYGPATH_W) 'lib/event/event.cc'; else $(CYGPATH_W) '$(srcdir)/lib/event/event.cc'; fi`; \
+@am__fastdepCXX_TRUE@	then mv -f "$(DEPDIR)/event.Tpo" "$(DEPDIR)/event.Po"; else rm -f "$(DEPDIR)/event.Tpo"; exit 1; fi
+@AMDEP_TRUE@@am__fastdepCXX_FALSE@	source='lib/event/event.cc' object='event.obj' libtool=no @AMDEPBACKSLASH@
+@AMDEP_TRUE@@am__fastdepCXX_FALSE@	depfile='$(DEPDIR)/event.Po' tmpdepfile='$(DEPDIR)/event.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 event.obj `if test -f 'lib/event/event.cc'; then $(CYGPATH_W) 'lib/event/event.cc'; else $(CYGPATH_W) '$(srcdir)/lib/event/event.cc'; fi`
+
+event_handler.o: lib/event/event_handler.cc
+@am__fastdepCXX_TRUE@	if $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -MT event_handler.o -MD -MP -MF "$(DEPDIR)/event_handler.Tpo" -c -o event_handler.o `test -f 'lib/event/event_handler.cc' || echo '$(srcdir)/'`lib/event/event_handler.cc; \
+@am__fastdepCXX_TRUE@	then mv -f "$(DEPDIR)/event_handler.Tpo" "$(DEPDIR)/event_handler.Po"; else rm -f "$(DEPDIR)/event_handler.Tpo"; exit 1; fi
+@AMDEP_TRUE@@am__fastdepCXX_FALSE@	source='lib/event/event_handler.cc' object='event_handler.o' libtool=no @AMDEPBACKSLASH@
+@AMDEP_TRUE@@am__fastdepCXX_FALSE@	depfile='$(DEPDIR)/event_handler.Po' tmpdepfile='$(DEPDIR)/event_handler.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 event_handler.o `test -f 'lib/event/event_handler.cc' || echo '$(srcdir)/'`lib/event/event_handler.cc
+
+event_handler.obj: lib/event/event_handler.cc
+@am__fastdepCXX_TRUE@	if $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -MT event_handler.obj -MD -MP -MF "$(DEPDIR)/event_handler.Tpo" -c -o event_handler.obj `if test -f 'lib/event/event_handler.cc'; then $(CYGPATH_W) 'lib/event/event_handler.cc'; else $(CYGPATH_W) '$(srcdir)/lib/event/event_handler.cc'; fi`; \
+@am__fastdepCXX_TRUE@	then mv -f "$(DEPDIR)/event_handler.Tpo" "$(DEPDIR)/event_handler.Po"; else rm -f "$(DEPDIR)/event_handler.Tpo"; exit 1; fi
+@AMDEP_TRUE@@am__fastdepCXX_FALSE@	source='lib/event/event_handler.cc' object='event_handler.obj' libtool=no @AMDEPBACKSLASH@
+@AMDEP_TRUE@@am__fastdepCXX_FALSE@	depfile='$(DEPDIR)/event_handler.Po' tmpdepfile='$(DEPDIR)/event_handler.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 event_handler.obj `if test -f 'lib/event/event_handler.cc'; then $(CYGPATH_W) 'lib/event/event_handler.cc'; else $(CYGPATH_W) '$(srcdir)/lib/event/event_handler.cc'; fi`
+
+event_listener.o: lib/event/event_listener.cc
+@am__fastdepCXX_TRUE@	if $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -MT event_listener.o -MD -MP -MF "$(DEPDIR)/event_listener.Tpo" -c -o event_listener.o `test -f 'lib/event/event_listener.cc' || echo '$(srcdir)/'`lib/event/event_listener.cc; \
+@am__fastdepCXX_TRUE@	then mv -f "$(DEPDIR)/event_listener.Tpo" "$(DEPDIR)/event_listener.Po"; else rm -f "$(DEPDIR)/event_listener.Tpo"; exit 1; fi
+@AMDEP_TRUE@@am__fastdepCXX_FALSE@	source='lib/event/event_listener.cc' object='event_listener.o' libtool=no @AMDEPBACKSLASH@
+@AMDEP_TRUE@@am__fastdepCXX_FALSE@	depfile='$(DEPDIR)/event_listener.Po' tmpdepfile='$(DEPDIR)/event_listener.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 event_listener.o `test -f 'lib/event/event_listener.cc' || echo '$(srcdir)/'`lib/event/event_listener.cc
+
+event_listener.obj: lib/event/event_listener.cc
+@am__fastdepCXX_TRUE@	if $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -MT event_listener.obj -MD -MP -MF "$(DEPDIR)/event_listener.Tpo" -c -o event_listener.obj `if test -f 'lib/event/event_listener.cc'; then $(CYGPATH_W) 'lib/event/event_listener.cc'; else $(CYGPATH_W) '$(srcdir)/lib/event/event_listener.cc'; fi`; \
+@am__fastdepCXX_TRUE@	then mv -f "$(DEPDIR)/event_listener.Tpo" "$(DEPDIR)/event_listener.Po"; else rm -f "$(DEPDIR)/event_listener.Tpo"; exit 1; fi
+@AMDEP_TRUE@@am__fastdepCXX_FALSE@	source='lib/event/event_listener.cc' object='event_listener.obj' libtool=no @AMDEPBACKSLASH@
+@AMDEP_TRUE@@am__fastdepCXX_FALSE@	depfile='$(DEPDIR)/event_listener.Po' tmpdepfile='$(DEPDIR)/event_listener.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 event_listener.obj `if test -f 'lib/event/event_listener.cc'; then $(CYGPATH_W) 'lib/event/event_listener.cc'; else $(CYGPATH_W) '$(srcdir)/lib/event/event_listener.cc'; fi`
+
+key_mapper.o: lib/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 'lib/event/key_mapper.cc' || echo '$(srcdir)/'`lib/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='lib/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 'lib/event/key_mapper.cc' || echo '$(srcdir)/'`lib/event/key_mapper.cc
+
+key_mapper.obj: lib/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 'lib/event/key_mapper.cc'; then $(CYGPATH_W) 'lib/event/key_mapper.cc'; else $(CYGPATH_W) '$(srcdir)/lib/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='lib/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 'lib/event/key_mapper.cc'; then $(CYGPATH_W) 'lib/event/key_mapper.cc'; else $(CYGPATH_W) '$(srcdir)/lib/event/key_mapper.cc'; fi`
+
+key_names.o: lib/event/key_names.cc
+@am__fastdepCXX_TRUE@	if $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -MT key_names.o -MD -MP -MF "$(DEPDIR)/key_names.Tpo" -c -o key_names.o `test -f 'lib/event/key_names.cc' || echo '$(srcdir)/'`lib/event/key_names.cc; \
+@am__fastdepCXX_TRUE@	then mv -f "$(DEPDIR)/key_names.Tpo" "$(DEPDIR)/key_names.Po"; else rm -f "$(DEPDIR)/key_names.Tpo"; exit 1; fi
+@AMDEP_TRUE@@am__fastdepCXX_FALSE@	source='lib/event/key_names.cc' object='key_names.o' libtool=no @AMDEPBACKSLASH@
+@AMDEP_TRUE@@am__fastdepCXX_FALSE@	depfile='$(DEPDIR)/key_names.Po' tmpdepfile='$(DEPDIR)/key_names.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_names.o `test -f 'lib/event/key_names.cc' || echo '$(srcdir)/'`lib/event/key_names.cc
+
+key_names.obj: lib/event/key_names.cc
+@am__fastdepCXX_TRUE@	if $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -MT key_names.obj -MD -MP -MF "$(DEPDIR)/key_names.Tpo" -c -o key_names.obj `if test -f 'lib/event/key_names.cc'; then $(CYGPATH_W) 'lib/event/key_names.cc'; else $(CYGPATH_W) '$(srcdir)/lib/event/key_names.cc'; fi`; \
+@am__fastdepCXX_TRUE@	then mv -f "$(DEPDIR)/key_names.Tpo" "$(DEPDIR)/key_names.Po"; else rm -f "$(DEPDIR)/key_names.Tpo"; exit 1; fi
+@AMDEP_TRUE@@am__fastdepCXX_FALSE@	source='lib/event/key_names.cc' object='key_names.obj' libtool=no @AMDEPBACKSLASH@
+@AMDEP_TRUE@@am__fastdepCXX_FALSE@	depfile='$(DEPDIR)/key_names.Po' tmpdepfile='$(DEPDIR)/key_names.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_names.obj `if test -f 'lib/event/key_names.cc'; then $(CYGPATH_W) 'lib/event/key_names.cc'; else $(CYGPATH_W) '$(srcdir)/lib/event/key_names.cc'; fi`
 
 graphics_engine.o: lib/graphics/graphics_engine.cc
@@ -1565,5 +1565,5 @@
 
 distdir: $(DISTFILES)
-	$(mkdir_p) $(distdir)/defs $(distdir)/glmenu $(distdir)/lib/coord $(distdir)/lib/graphics $(distdir)/lib/graphics/importer $(distdir)/lib/lang $(distdir)/lib/math $(distdir)/lib/util $(distdir)/proto $(distdir)/story_entities $(distdir)/subprojects $(distdir)/util $(distdir)/util/animation $(distdir)/util/common $(distdir)/util/event $(distdir)/util/loading $(distdir)/util/track $(distdir)/world_entities
+	$(mkdir_p) $(distdir)/defs $(distdir)/glmenu $(distdir)/lib/coord $(distdir)/lib/event $(distdir)/lib/graphics $(distdir)/lib/graphics/importer $(distdir)/lib/lang $(distdir)/lib/math $(distdir)/lib/util $(distdir)/proto $(distdir)/story_entities $(distdir)/subprojects $(distdir)/util $(distdir)/util/animation $(distdir)/util/common $(distdir)/util/loading $(distdir)/util/track $(distdir)/world_entities
 	@srcdirstrip=`echo "$(srcdir)" | sed 's|.|.|g'`; \
 	topsrcdirstrip=`echo "$(top_srcdir)" | sed 's|.|.|g'`; \
Index: /orxonox/trunk/src/defs/include_paths.am
===================================================================
--- /orxonox/trunk/src/defs/include_paths.am	(revision 4456)
+++ /orxonox/trunk/src/defs/include_paths.am	(revision 4457)
@@ -5,4 +5,5 @@
 AM_CXXFLAGS+=-I$(MAINSRCDIR)/lib/coord
 AM_CXXFLAGS+=-I$(MAINSRCDIR)/lib/data
+AM_CXXFLAGS+=-I$(MAINSRCDIR)/lib/event
 AM_CXXFLAGS+=-I$(MAINSRCDIR)/lib/graphics
 AM_CXXFLAGS+=-I$(MAINSRCDIR)/lib/graphics/importer
@@ -23,5 +24,4 @@
 AM_CXXFLAGS+=-I$(MAINSRCDIR)/util/animation
 AM_CXXFLAGS+=-I$(MAINSRCDIR)/util/common
-AM_CXXFLAGS+=-I$(MAINSRCDIR)/util/event
 AM_CXXFLAGS+=-I$(MAINSRCDIR)/util/loading
 AM_CXXFLAGS+=-I$(MAINSRCDIR)/util/track
Index: /orxonox/trunk/src/lib/event/event.cc
===================================================================
--- /orxonox/trunk/src/lib/event/event.cc	(revision 4457)
+++ /orxonox/trunk/src/lib/event/event.cc	(revision 4457)
@@ -0,0 +1,40 @@
+/* 
+   orxonox - the future of 3D-vertical-scrollers
+
+   Copyright (C) 2004 orx
+
+   This program is free software; you can redistribute it and/or modify
+   it under the terms of the GNU General Public License as published by
+   the Free Software Foundation; either version 2, or (at your option)
+   any later version.
+
+   ### File Specific:
+   main-programmer: Patrick Boenzli
+   co-programmer: ...
+*/
+
+#define DEBUG_SPECIAL_MODULE DEBUG_MODULE_EVENT
+
+#include "event.h"
+
+using namespace std;
+
+
+/**
+   \brief standard constructor
+*/
+Event::Event () 
+{
+   this->setClassID(CL_EVENT, "Event"); 
+
+}
+
+
+/**
+   \brief standard deconstructor
+
+*/
+Event::~Event () 
+{
+  // delete what has to be deleted here
+}
Index: /orxonox/trunk/src/lib/event/event.h
===================================================================
--- /orxonox/trunk/src/lib/event/event.h	(revision 4457)
+++ /orxonox/trunk/src/lib/event/event.h	(revision 4457)
@@ -0,0 +1,34 @@
+/*! 
+    \file event.h
+    \brief an abstract event
+
+*/
+
+#ifndef _EVENT_H
+#define _EVENT_H
+
+
+#include "base_object.h"
+#include "event_def.h"
+#include "sdlincl.h"
+
+
+//! An abstract event class
+class Event : virtual public BaseObject {
+
+ public:
+  Event();
+  virtual ~Event();
+
+
+  int      offset;                      //!< offset in the event type array
+  int      type;                        //!< the type field
+  bool     bPressed;                    //!< is true, if the button/mouse was pressed, false if released
+       
+  Uint16   x;                           //!< x coordinate
+  Uint16   y;                           //!< y coordinate
+  Sint16   xRel;                        //!< relative x movement to last point
+  Sint16   yRel;                        //!< relative y movement to last point
+};
+
+#endif /* _EVENT_H */
Index: /orxonox/trunk/src/lib/event/event_def.h
===================================================================
--- /orxonox/trunk/src/lib/event/event_def.h	(revision 4457)
+++ /orxonox/trunk/src/lib/event/event_def.h	(revision 4457)
@@ -0,0 +1,47 @@
+/*! 
+    \file event_def.h
+    \brief some central definitions
+
+*/
+
+#ifndef _EVENT_DEF_H
+#define _EVENT_DEF_H
+
+#include "SDL_keysym.h"
+#include "stdincl.h"
+
+
+//! these are the extended event types, that are not included in SDL_keysym
+typedef enum extEventTyes
+  {
+    EV_MOUSE_BUTTON_LEFT = SDLK_LAST,
+    EV_MOUSE_BUTTON_MIDDLE,
+    EV_MOUSE_BUTTON_RIGHT,
+    EV_MOUSE_BUTTON_WHEELUP,
+    EV_MOUSE_BUTTON_WHEELDOWN,
+    EV_MOUSE_MOTION,
+    EV_JOY_AXIS_MOTION,
+    EV_JOY_BALL_MOTION,
+    EV_JOY_HAT_MOTION,
+    EV_JOY_BUTTON,
+
+    EV_UNKNOWN,
+
+    EV_NUMBER
+  };
+
+
+//! this is an enumeration of all states of the event_handler/game
+typedef enum elState
+  {
+    ES_GAME,           //!< the state during the game plays
+    ES_GAME_MENU,      //!< state when the menu is called during game
+    ES_MENU,           //!< orxonox menu state
+
+    ES_ALL,            //!< you want to register events for all states
+
+    ES_NUMBER,         //!< the number of states
+  };
+
+
+#endif /* _EVENT_DEF_H */
Index: /orxonox/trunk/src/lib/event/event_handler.cc
===================================================================
--- /orxonox/trunk/src/lib/event/event_handler.cc	(revision 4457)
+++ /orxonox/trunk/src/lib/event/event_handler.cc	(revision 4457)
@@ -0,0 +1,288 @@
+/* 
+   orxonox - the future of 3D-vertical-scrollers
+
+   Copyright (C) 2004 orx
+
+   This program is free software; you can redistribute it and/or modify
+   it under the terms of the GNU General Public License as published by
+   the Free Software Foundation; either version 2, or (at your option)
+   any later version.
+
+   ### File Specific:
+   main-programmer: Patrick Boenzli
+   co-programmer: 
+*/
+
+#define DEBUG_SPECIAL_MODULE DEBUG_MODULE_EVENT
+
+#include "event_handler.h"
+
+#include "event_listener.h"
+#include "event.h"
+#include "key_mapper.h"
+
+#include "compiler.h"
+#include "debug.h"
+
+using namespace std;
+
+
+/**
+   \brief standard constructor
+*/
+EventHandler::EventHandler () 
+{
+  this->setClassID(CL_EVENT_HANDLER, "EventHandler"); 
+
+  this->listeners = new EventListener**[ES_NUMBER];
+  for(int i = 0; i < ES_NUMBER; ++i)
+    this->listeners[i] = new EventListener*[EV_NUMBER];
+
+  /* now initialize them all to zero */
+  for(int i = 0; i < ES_NUMBER; ++i)
+    {
+      for(int j = 0; j < SDLK_LAST; ++j)
+	{
+	  this->listeners[i][j] = NULL;
+	}
+    }
+  this->state = ES_GAME;
+}
+
+
+/**
+   \brief the singleton reference to this class
+*/
+EventHandler* EventHandler::singletonRef = NULL;
+
+
+/**
+   \returns a Pointer to this Class
+*/
+EventHandler* EventHandler::getInstance(void)
+{
+  if (!EventHandler::singletonRef)
+    EventHandler::singletonRef = new EventHandler();
+  return EventHandler::singletonRef;
+}
+
+
+/**
+   \brief standard deconstructor
+
+*/
+EventHandler::~EventHandler () 
+{
+  EventHandler::singletonRef = NULL;
+  delete this->keyMapper;
+}
+
+
+/**
+   \brief initializes the event handler
+
+   this has to be called before the use of the event handler
+*/
+void EventHandler::init()
+{
+  this->keyMapper = new KeyMapper();
+  this->keyMapper->loadKeyBindings();
+}
+
+
+/**
+   \brief set the state of the event handler
+   \param state: to which the event handler shall change
+*/
+void EventHandler::setState(elState state)
+{
+  this->state = state;
+}
+
+
+/**
+   \brief subscribe to an event
+   \param el: the event listener that wants to subscribe itself, the listener that will be called when the evetn occures
+   \param state: for which the listener wants to receive events
+   \param eventType: the event type that wants to be listened for.
+
+   This is one of the most important function of the EventHandler. If you would like to subscribe for more
+   than one state, you have to subscribe for each state again. If you want to subscribe for all states, use
+   state = ES_ALL, which will subscribe your listener for all states together.
+*/
+void EventHandler::subscribe(EventListener* el, elState state, int eventType)
+{
+  PRINTF(4)("Subscribing event type: %i\n", eventType);
+  if( state == ES_ALL )
+    {
+      for(int i = 0; i < ES_NUMBER; ++i)
+	if( likely(this->listeners[state][eventType] == NULL))
+	  this->listeners[i][eventType] = el;
+	else
+	  PRINTF(1)("Someone tried to subscribe to event %i @ state %i but this event has already been subscribed\n", eventType, state);
+    }
+  else 
+    if( likely(this->listeners[state][eventType] == NULL))
+      {
+	this->listeners[state][eventType] = el;
+      }
+    else
+      PRINTF(1)("Someone tried to subscribe to event %i @ state %i but this event has already been subscribed\n", eventType, state);
+}
+
+
+/**
+   \brief unsubscribe from the EventHandler
+   \param state: the stat in which it has been subscribed
+   \param eventType: the event, that shall be unsubscribed
+
+   if you want to unsubscribe an event listener from all subscribed events, just use the 
+   unsubscribe(EventListener* el, elState state) function
+*/
+void EventHandler::unsubscribe(elState state, int eventType)
+{
+  PRINTF(4)("Unsubscribing event type nr: %i\n", eventType);
+  this->listeners[state][eventType] = NULL;
+}
+
+
+/**
+   \brief unsubscribe all events from a specific listener
+   \param el: the listener that wants to unsubscribe itself
+   \param state: the state in which the events shall be unsubscribed
+   
+*/
+void EventHandler::unsubscribe(EventListener* el, elState state)
+{
+  if( state == ES_ALL)
+    {
+      for(int i = 0; i < ES_NUMBER; ++i)
+	{
+	  for(int j = 0; j < EV_NUMBER; ++j)
+	    {
+	      if( this->listeners[i][j] == el )
+		this->listeners[i][j] = NULL;
+	    }
+	}
+    }
+  else
+    {
+      for(int j = 0; j < EV_NUMBER; ++j)
+	{
+	  if( this->listeners[state][j] == el )
+	    this->listeners[state][j] = NULL;
+	}
+    }
+}
+
+
+/**
+   \brief flush all registered events
+   \param state: a specific state
+*/
+void EventHandler::flush(elState state)
+{
+  if( state == ES_ALL)
+    {
+      for(int i = 0; i < ES_NUMBER; ++i)
+	{
+	  for(int j = 0; j < EV_NUMBER; ++j)
+	    {
+	      this->listeners[i][j] = NULL;
+	    }
+	}
+    }
+  else
+    {
+      for(int j = 0; j < EV_NUMBER; ++j)
+	{
+	  this->listeners[state][j] = NULL;
+	}
+    }
+}
+
+
+/**
+   \brief core function of event handler: receives all events from SDL 
+
+   The event from the SDL framework are collected here and distributed to all listeners.
+*/
+void EventHandler::process()
+{
+  SDL_Event event;
+  Event ev;
+  EventListener* listener = NULL;
+  while( SDL_PollEvent (&event))
+    {
+      switch( event.type)
+	{
+	case SDL_KEYDOWN:
+	  ev.bPressed = true;
+	  ev.type = event.key.keysym.sym;
+	  break;
+	case SDL_KEYUP:
+	  ev.bPressed = false;
+	  ev.type = event.key.keysym.sym;
+	  break;
+	case SDL_MOUSEMOTION:
+	  ev.bPressed = false;
+	  ev.type = EV_MOUSE_MOTION;
+	  ev.x = event.motion.x;
+	  ev.y = event.motion.y;
+	  ev.xRel = event.motion.xrel;
+	  ev.yRel = event.motion.yrel;
+	  break;
+	case SDL_MOUSEBUTTONUP:
+	  ev.bPressed = false;
+	  ev.type = event.button.button + SDLK_LAST;
+	  break;
+	case SDL_MOUSEBUTTONDOWN:
+	  ev.bPressed = true;
+	  ev.type = event.button.button + SDLK_LAST;
+	  break;
+	case SDL_JOYAXISMOTION:
+	  ev.bPressed = false;
+	  ev.type = EV_JOY_AXIS_MOTION;
+	  break;
+	case SDL_JOYBALLMOTION:
+	  ev.bPressed = false;
+	  ev.type = EV_JOY_BALL_MOTION;
+	  break;
+	case SDL_JOYHATMOTION:
+	  ev.bPressed = false;
+	  ev.type = EV_JOY_HAT_MOTION;
+	  break;
+	case SDL_JOYBUTTONDOWN:
+	  ev.bPressed = true;
+	  ev.type = EV_JOY_BUTTON;
+	  break;
+	case SDL_JOYBUTTONUP:
+	  ev.bPressed = true;
+	  ev.type = EV_JOY_BUTTON;
+	  break;
+	default:
+	  ev.type = EV_UNKNOWN;
+	  break;
+	}
+
+      /* small debug routine: shows alle events dispatched by the event handler */
+      PRINT(4)("\n==========================| EventHandler::process () |===\n");
+      PRINT(4)("=  Got Event nr %i, for state %i", ev.type, this->state);  
+      
+      listener = this->listeners[this->state][ev.type];
+      if( listener != NULL)
+	{
+	  PRINT(4)("=  Event dispatcher msg: This event has been consumed\n");
+	  PRINT(4)("=======================================================\n");      
+	  listener->process(ev);
+	}
+      else
+	{
+	  PRINT(4)("=  Event dispatcher msg: This event has NOT been consumed\n");
+	  PRINT(4)("=======================================================\n");      
+	}
+
+
+    }
+}
+
Index: /orxonox/trunk/src/lib/event/event_handler.h
===================================================================
--- /orxonox/trunk/src/lib/event/event_handler.h	(revision 4457)
+++ /orxonox/trunk/src/lib/event/event_handler.h	(revision 4457)
@@ -0,0 +1,45 @@
+/*! 
+    \file event_handler.h
+    \brief Definition of the EventHandler
+    
+*/
+
+#ifndef _EVENT_HANDLER_H
+#define _EVENT_HANDLER_H
+
+#include "base_object.h"
+#include "key_mapper.h"
+#include "event_def.h"
+
+class EventListener;
+
+
+//! The one Event Handler from Orxonox
+class EventHandler : public BaseObject {
+
+ public:
+  static EventHandler* getInstance(void);
+  virtual ~EventHandler(void);
+  void init();
+
+  void setState(elState state);
+
+  void subscribe(EventListener* el, elState state, int eventType);
+  void unsubscribe(elState state, int eventType);
+  void unsubscribe(EventListener* el, elState state = ES_ALL);
+  void flush(elState state);
+
+  void process();
+
+ private:
+  EventHandler(void);
+ 
+
+ private:
+  static EventHandler* singletonRef;                  //!< the singleton reference
+  EventListener*** listeners;                         //!< a list of registered listeners
+  elState state;                                      //!< the state of the event handlder
+  KeyMapper* keyMapper;                               //!< reference to the key mapper
+};
+
+#endif /* _EVENT_HANDLER_H */
Index: /orxonox/trunk/src/lib/event/event_listener.cc
===================================================================
--- /orxonox/trunk/src/lib/event/event_listener.cc	(revision 4457)
+++ /orxonox/trunk/src/lib/event/event_listener.cc	(revision 4457)
@@ -0,0 +1,37 @@
+/* 
+   orxonox - the future of 3D-vertical-scrollers
+
+   Copyright (C) 2004 orx
+
+   This program is free software; you can redistribute it and/or modify
+   it under the terms of the GNU General Public License as published by
+   the Free Software Foundation; either version 2, or (at your option)
+   any later version.
+
+   ### File Specific:
+   main-programmer: Patrick Boenzli
+   co-programmer: ...
+*/
+
+#define DEBUG_SPECIAL_MODULE DEBUG_MODULE_EVENT
+
+#include "event_listener.h"
+
+using namespace std;
+
+
+/**
+   \brief standard constructor
+*/
+EventListener::EventListener () 
+{
+   this->setClassID(CL_EVENT_LISTENER, "EventListener"); 
+}
+
+
+/**
+   \brief standard deconstructor
+
+*/
+EventListener::~EventListener () 
+{}
Index: /orxonox/trunk/src/lib/event/event_listener.h
===================================================================
--- /orxonox/trunk/src/lib/event/event_listener.h	(revision 4457)
+++ /orxonox/trunk/src/lib/event/event_listener.h	(revision 4457)
@@ -0,0 +1,29 @@
+/*! 
+    \file event_listener.h
+    \brief Definition of an event listener base class
+
+*/
+
+#ifndef _EVENT_LISTENER_H
+#define _EVENT_LISTENER_H
+
+#include "base_object.h"
+#include "event.h"
+#include "event_def.h"
+
+
+//! A class for event listener
+class EventListener : virtual public BaseObject {
+
+ public:
+  EventListener();
+  virtual ~EventListener();
+
+  /**
+     \brief abstract function that processes events from the handler
+     \param event: the event
+  */
+  virtual void process(const Event &event) = NULL;
+};
+
+#endif /* _EVENT_LISTENER_H */
Index: /orxonox/trunk/src/lib/event/key_mapper.cc
===================================================================
--- /orxonox/trunk/src/lib/event/key_mapper.cc	(revision 4457)
+++ /orxonox/trunk/src/lib/event/key_mapper.cc	(revision 4457)
@@ -0,0 +1,234 @@
+/* 
+   orxonox - the future of 3D-vertical-scrollers
+
+   Copyright (C) 2004 orx
+
+   This program is free software; you can redistribute it and/or modify
+   it under the terms of the GNU General Public License as published by
+   the Free Software Foundation; either version 2, or (at your option)
+   any later version.
+
+   ### File Specific:
+   main-programmer: Patrick Boenzli
+   co-programmer: Christian Meyer
+   
+   This code was inspired by the command_node.cc code from Christian Meyer in revision
+   4386 and earlier.
+*/
+
+#define DEBUG_SPECIAL_MODULE DEBUG_MODULE_EVENT
+
+#include "key_mapper.h"
+
+#include "ini_parser.h"
+#include "key_names.h"
+
+using namespace std;
+
+
+/* initialize all variables to a reasonable value*/
+int KeyMapper::PEV_UP                = EV_UNKNOWN;
+int KeyMapper::PEV_DOWN              = EV_UNKNOWN;
+int KeyMapper::PEV_LEFT              = EV_UNKNOWN;
+int KeyMapper::PEV_RIGHT             = EV_UNKNOWN;
+int KeyMapper::PEV_STRAFE_LEFT       = EV_UNKNOWN;
+int KeyMapper::PEV_STRAFE_RIGHT      = EV_UNKNOWN;
+
+int KeyMapper::PEV_FIRE1             = EV_UNKNOWN;
+int KeyMapper::PEV_FIRE2             = EV_UNKNOWN;
+int KeyMapper::PEV_PREVIOUS_WEAPON   = EV_UNKNOWN;
+int KeyMapper::PEV_NEXT_WEAPON       = EV_UNKNOWN;
+
+int KeyMapper::PEV_VIEW0             = EV_UNKNOWN;
+int KeyMapper::PEV_VIEW1             = EV_UNKNOWN;
+int KeyMapper::PEV_VIEW2             = EV_UNKNOWN;
+int KeyMapper::PEV_VIEW3             = EV_UNKNOWN;
+int KeyMapper::PEV_VIEW4             = EV_UNKNOWN;
+int KeyMapper::PEV_VIEW5             = EV_UNKNOWN; 
+
+int KeyMapper::PEV_NEXT_WORLD        = EV_UNKNOWN;
+int KeyMapper::PEV_PREVIOUS_WORLD    = EV_UNKNOWN;
+
+int KeyMapper::PEV_PAUSE             = EV_UNKNOWN;
+int KeyMapper::PEV_QUIT              = EV_UNKNOWN;
+
+
+
+//! this is the mapping array from names to ids: enter all orxonox.conf keys here
+orxKeyMapping map[] = { {&KeyMapper::PEV_UP, "Up"},
+			{&KeyMapper::PEV_DOWN, "Down"},
+			{&KeyMapper::PEV_LEFT, "Left"},
+			{&KeyMapper::PEV_RIGHT, "Right"},
+			{&KeyMapper::PEV_STRAFE_LEFT, "StrafeLeft"},
+			{&KeyMapper::PEV_STRAFE_RIGHT, "StrafeRight"},
+			
+			{&KeyMapper::PEV_FIRE1, "Fire"},
+			{&KeyMapper::PEV_FIRE1, "Fire1"},
+			{&KeyMapper::PEV_FIRE2, "Fire2"},
+			{&KeyMapper::PEV_NEXT_WEAPON, "Next"},
+			{&KeyMapper::PEV_PREVIOUS_WEAPON, "Prev"},
+
+
+			{&KeyMapper::PEV_VIEW0, "view0"},
+			{&KeyMapper::PEV_VIEW1, "view1"},
+			{&KeyMapper::PEV_VIEW2, "view2"},
+			{&KeyMapper::PEV_VIEW3, "view3"},
+			{&KeyMapper::PEV_VIEW4, "view4"},
+			{&KeyMapper::PEV_VIEW5, "view5"},
+
+			{&KeyMapper::PEV_NEXT_WORLD, "Next-World"},
+			{&KeyMapper::PEV_PREVIOUS_WORLD, "Prev-World"},
+
+			{&KeyMapper::PEV_PAUSE, "Pause"},
+			{&KeyMapper::PEV_QUIT, "Quit"},
+                        {NULL, NULL}};
+
+
+
+/**
+   \brief standard constructor
+*/
+KeyMapper::KeyMapper () 
+{
+   this->setClassID(CL_KEY_MAPPER, "KeyMapper"); 
+}
+
+
+/**
+   \brief standard deconstructor
+*/
+KeyMapper::~KeyMapper () 
+{
+}
+
+
+/**
+   \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);
+  
+  // 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
+  
+  char namebuf[256];
+  char valuebuf[256];
+  memset (namebuf, 0, 256);
+  memset (valuebuf, 0, 256);
+  int* index;
+  
+  while( parser.nextVar (namebuf, valuebuf) != -1)
+    {
+      PRINTF(3)("Keys: Parsing %s, %s now.\n", namebuf, valuebuf);
+      index = nameToIndex (valuebuf);
+      this->mapKeys(namebuf, index[1]);
+
+      /*
+      switch( index[0])
+	{
+	case 0:
+	  this->mapKeys(namebuf, index[1]);
+	  break;
+	case 1:
+	  this->mapKeys(namebuf, index[1]);
+	  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)
+    {
+      PRINTF(3)("MISC: Parsing %s, %s now.\n", namebuf, valuebuf);
+      index = nameToIndex (valuebuf);     
+      this->mapKeys(namebuf, index[1]);
+      /*
+      switch( index[0])
+	{
+	case 0:
+	  this->mapKeys(namebuf, index[1]);
+	  break;
+	case 1:
+	this->mapKeys(namebuf, index[1]);
+	  break;
+	default:
+	  break;
+	}
+      */
+      memset (namebuf, 0, 256);
+      memset (valuebuf, 0, 256);
+    }
+}
+
+
+/**
+   \brief this function looks up name to key index
+   \param the name of the button
+*/
+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;
+}
+
+
+/**
+   \brief the function maps name to key ids
+   \param name of the key
+   \param id of the key
+*/
+void KeyMapper::mapKeys(char* name, int keyID)
+{
+  for(int i = 0; map[i].pValue != NULL; ++i )
+    {
+      if( !strcmp (name, map[i].pName)) { *map[i].pValue = keyID; break;}
+      PRINTF(0)("Mapping %s to id %i\n", name, keyID);
+    }
+}
+
+
+/**
+   \brief this function gives some debug information about the key mapper class
+*/
+void KeyMapper::debug()
+{
+  PRINT(0)("\n==========================| KeyMapper::debug() |===\n");  
+  for(int i = 0; map[i].pValue != NULL; ++i)
+    {
+      PRINT(0)("%s = %i\n",map[i].pName, *map[i].pValue);
+    }
+  PRINT(0)("=======================================================\n");        
+}
Index: /orxonox/trunk/src/lib/event/key_mapper.h
===================================================================
--- /orxonox/trunk/src/lib/event/key_mapper.h	(revision 4457)
+++ /orxonox/trunk/src/lib/event/key_mapper.h	(revision 4457)
@@ -0,0 +1,72 @@
+/*! 
+    \file key_mapper.h
+    \brief a construct to map player defined keys to SDL keys
+
+*/
+
+#ifndef _KEY_MAPPER_H
+#define _KEY_MAPPER_H
+
+
+#include "base_object.h"
+#include "event_def.h"
+
+
+//! A mapping from key-name to key-id
+typedef struct orxKeyMapping
+{
+  int* pValue;
+  char* pName;
+};
+
+
+//! The map class functionalities
+class KeyMapper : public BaseObject {
+
+ public:
+  KeyMapper();
+  virtual ~KeyMapper();
+
+  void loadKeyBindings(const char* fileName = DEFAULT_CONFIG_FILE);
+
+  void debug();
+
+ private:
+  int* nameToIndex (char* name);
+  void mapKeys(char* name, int keyID);
+
+ public:
+  static int PEV_UP;                //!< up button
+  static int PEV_DOWN;              //!< down buttton
+  static int PEV_LEFT;              //!< left button
+  static int PEV_RIGHT;             //!< right button
+  
+  static int PEV_STRAFE_LEFT;       //!< strafe left button
+  static int PEV_STRAFE_RIGHT;      //!< strafe right button
+  
+  static int PEV_FIRE1;             //!< fire button 1
+  static int PEV_FIRE2;             //!< fire button 2
+  static int PEV_PREVIOUS_WEAPON;   //!< prev weapon button
+  static int PEV_NEXT_WEAPON;       //!< next weapon button
+
+  static int PEV_VIEW0;             //!< view 0 button
+  static int PEV_VIEW1;             //!< view 1 button
+  static int PEV_VIEW2;             //!< view 2 button
+  static int PEV_VIEW3;             //!< view 3 button
+  static int PEV_VIEW4;             //!< view 4 button
+  static int PEV_VIEW5;             //!< view 5 button
+
+  static int PEV_NEXT_WORLD;        //!< next world button
+  static int PEV_PREVIOUS_WORLD;    //!< prev world button
+
+  static int PEV_PAUSE;             //!< pause button
+  static int PEV_QUIT;              //!< quit button
+
+ private:
+  Sint32     coord[2];              //!< temp place to save variables in nameToIndex() function
+};
+
+
+
+
+#endif /* _KEY_MAPPER_H */
Index: /orxonox/trunk/src/lib/event/key_names.cc
===================================================================
--- /orxonox/trunk/src/lib/event/key_names.cc	(revision 4457)
+++ /orxonox/trunk/src/lib/event/key_names.cc	(revision 4457)
@@ -0,0 +1,318 @@
+/* 
+   orxonox - the future of 3D-vertical-scrollers
+
+   Copyright (C) 2004 orx
+
+   This program is free software; you can redistribute it and/or modify
+   it under the terms of the GNU General Public License as published by
+   the Free Software Foundation; either version 2, or (at your option)
+   any later version.
+
+   ### File Specific:
+   main-programmer: Christian Meyer
+   co-programmer: ...
+*/
+
+#include "key_names.h"
+
+#include "stdincl.h"
+
+#include <string.h>
+
+using namespace std;
+
+int buttonnameToSDLB( char* name)
+{
+	if( !strcmp (name, "BUTTON_LEFT")) return SDL_BUTTON_LEFT;
+	if( !strcmp (name, "BUTTON_MIDDLE")) return SDL_BUTTON_MIDDLE;
+	if( !strcmp (name, "BUTTON_RIGHT")) return SDL_BUTTON_RIGHT;
+//	if( !strcmp (name, "BUTTON_WHEELUP")) return SDL_BUTTON_WHEELUP;
+//	if( !strcmp (name, "BUTTON_WHEELDOWN")) return SDL_BUTTON_WHEELDOWN;
+	return -1;
+}
+
+char* SDLBToButtonname( int button)
+{
+	if( button == SDL_BUTTON_LEFT) return "BUTTON_LEFT";
+	if( button == SDL_BUTTON_MIDDLE) return "BUTTON_MIDDLE";
+	if( button == SDL_BUTTON_RIGHT) return "BUTTON_RIGHT";
+//	if( button == SDL_BUTTON_WHEELUP) return "BUTTON_WHEELUP";
+//	if( button == SDL_BUTTON_WHEELDOWN) return "BUTTON_WHEELDOWN";
+	return "UNKNOWN";
+}
+
+int keynameToSDLK( char* name)
+{
+	if( !strcmp (name, "BACKSPACE")) return SDLK_BACKSPACE;
+	if( !strcmp (name, "TAB")) return SDLK_TAB;
+	if( !strcmp (name, "CLEAR")) return SDLK_CLEAR;
+	if( !strcmp (name, "RETURN")) return SDLK_RETURN;
+	if( !strcmp (name, "ESCAPE")) return SDLK_ESCAPE;
+	if( !strcmp (name, "SPACE")) return SDLK_SPACE;
+	if( !strcmp (name, "EXCLAIM")) return SDLK_EXCLAIM;
+	if( !strcmp (name, "QUOTEDBL")) return SDLK_QUOTEDBL;
+	if( !strcmp (name, "HASH")) return SDLK_HASH;
+	if( !strcmp (name, "PAUSE")) return SDLK_PAUSE;
+	if( !strcmp (name, "DOLLAR")) return SDLK_DOLLAR;
+	if( !strcmp (name, "AMPERSAND")) return SDLK_AMPERSAND;
+	if( !strcmp (name, "QUOTE")) return SDLK_QUOTE;
+	if( !strcmp (name, "LEFTPAREN")) return SDLK_LEFTPAREN;
+	if( !strcmp (name, "RIGHTPAREN")) return SDLK_RIGHTPAREN;
+	if( !strcmp (name, "ASTERISK")) return SDLK_ASTERISK;
+	if( !strcmp (name, "PLUS")) return SDLK_PLUS;
+	if( !strcmp (name, "COMMA")) return SDLK_COMMA;
+	if( !strcmp (name, "MINUS")) return SDLK_MINUS;
+	if( !strcmp (name, "PERIOD")) return SDLK_PERIOD;
+	if( !strcmp (name, "SLASH")) return SDLK_SLASH;
+	if( !strcmp (name, "0")) return SDLK_0;
+	if( !strcmp (name, "1")) return SDLK_1;
+	if( !strcmp (name, "2")) return SDLK_2;
+	if( !strcmp (name, "3")) return SDLK_3;
+	if( !strcmp (name, "4")) return SDLK_4;
+	if( !strcmp (name, "5")) return SDLK_5;
+	if( !strcmp (name, "6")) return SDLK_6;
+	if( !strcmp (name, "7")) return SDLK_7;
+	if( !strcmp (name, "8")) return SDLK_8;
+	if( !strcmp (name, "9")) return SDLK_9;
+	if( !strcmp (name, "COLON")) return SDLK_COLON;
+	if( !strcmp (name, "SEMICOLON")) return SDLK_SEMICOLON;
+	if( !strcmp (name, "LESS")) return SDLK_LESS;
+	if( !strcmp (name, "EQUALS")) return SDLK_EQUALS;
+	if( !strcmp (name, "GREATER")) return SDLK_GREATER;
+	if( !strcmp (name, "QUESTION")) return SDLK_QUESTION;
+	if( !strcmp (name, "AT")) return SDLK_AT;
+	if( !strcmp (name, "LEFTBRACKET")) return SDLK_LEFTBRACKET;
+	if( !strcmp (name, "BACKSLASH")) return SDLK_BACKSLASH;
+	if( !strcmp (name, "RIGHTBRACKET")) return SDLK_RIGHTBRACKET;
+	if( !strcmp (name, "CARET")) return SDLK_CARET;
+	if( !strcmp (name, "UNDERSCORE")) return SDLK_UNDERSCORE;
+	if( !strcmp (name, "BACKQUOTE")) return SDLK_BACKQUOTE;
+	if( !strcmp (name, "a")) return SDLK_a;
+	if( !strcmp (name, "b")) return SDLK_b;
+	if( !strcmp (name, "c")) return SDLK_c;
+	if( !strcmp (name, "d")) return SDLK_d;
+	if( !strcmp (name, "e")) return SDLK_e;
+	if( !strcmp (name, "f")) return SDLK_f;
+	if( !strcmp (name, "g")) return SDLK_g;
+	if( !strcmp (name, "h")) return SDLK_h;
+	if( !strcmp (name, "i")) return SDLK_i;
+	if( !strcmp (name, "j")) return SDLK_j;
+	if( !strcmp (name, "k")) return SDLK_k;
+	if( !strcmp (name, "l")) return SDLK_l;
+	if( !strcmp (name, "m")) return SDLK_m;
+	if( !strcmp (name, "n")) return SDLK_n;
+	if( !strcmp (name, "o")) return SDLK_o;
+	if( !strcmp (name, "p")) return SDLK_p;
+	if( !strcmp (name, "q")) return SDLK_q;
+	if( !strcmp (name, "r")) return SDLK_r;
+	if( !strcmp (name, "s")) return SDLK_s;
+	if( !strcmp (name, "t")) return SDLK_t;
+	if( !strcmp (name, "u")) return SDLK_u;
+	if( !strcmp (name, "v")) return SDLK_v;
+	if( !strcmp (name, "w")) return SDLK_w;
+	if( !strcmp (name, "x")) return SDLK_x;
+	if( !strcmp (name, "y")) return SDLK_y;
+	if( !strcmp (name, "z")) return SDLK_z;
+	if( !strcmp (name, "DELETE")) return SDLK_DELETE;
+	if( !strcmp (name, "KP0")) return SDLK_KP0;
+	if( !strcmp (name, "KP1")) return SDLK_KP1;
+	if( !strcmp (name, "KP2")) return SDLK_KP2;
+	if( !strcmp (name, "KP3")) return SDLK_KP3;
+	if( !strcmp (name, "KP4")) return SDLK_KP4;
+	if( !strcmp (name, "KP5")) return SDLK_KP5;
+	if( !strcmp (name, "KP6")) return SDLK_KP6;
+	if( !strcmp (name, "KP7")) return SDLK_KP7;
+	if( !strcmp (name, "KP8")) return SDLK_KP8;
+	if( !strcmp (name, "KP9")) return SDLK_KP9;
+	if( !strcmp (name, "KP_PERIOD")) return SDLK_KP_PERIOD;
+	if( !strcmp (name, "KP_DIVIDE")) return SDLK_KP_DIVIDE;
+	if( !strcmp (name, "KP_MULTIPLY")) return SDLK_KP_MULTIPLY;
+	if( !strcmp (name, "KP_MINUS")) return SDLK_KP_MINUS;
+	if( !strcmp (name, "KP_PLUS")) return SDLK_KP_PLUS;
+	if( !strcmp (name, "KP_ENTER")) return SDLK_KP_ENTER;
+	if( !strcmp (name, "KP_EQUALS")) return SDLK_KP_EQUALS;
+	if( !strcmp (name, "UP")) return SDLK_UP;
+	if( !strcmp (name, "DOWN")) return SDLK_DOWN;
+	if( !strcmp (name, "RIGHT")) return SDLK_RIGHT;
+	if( !strcmp (name, "LEFT")) return SDLK_LEFT;
+	if( !strcmp (name, "INSERT")) return SDLK_INSERT;
+	if( !strcmp (name, "HOME")) return SDLK_HOME;
+	if( !strcmp (name, "END")) return SDLK_END;
+	if( !strcmp (name, "PAGEUP")) return SDLK_PAGEUP;
+	if( !strcmp (name, "PAGEDOWN")) return SDLK_PAGEDOWN;
+	if( !strcmp (name, "F1")) return SDLK_F1;
+	if( !strcmp (name, "F2")) return SDLK_F2;
+	if( !strcmp (name, "F3")) return SDLK_F3;
+	if( !strcmp (name, "F4")) return SDLK_F4;
+	if( !strcmp (name, "F5")) return SDLK_F5;
+	if( !strcmp (name, "F6")) return SDLK_F6;
+	if( !strcmp (name, "F7")) return SDLK_F7;
+	if( !strcmp (name, "F8")) return SDLK_F8;
+	if( !strcmp (name, "F9")) return SDLK_F9;
+	if( !strcmp (name, "F10")) return SDLK_F10;
+	if( !strcmp (name, "F11")) return SDLK_F11;
+	if( !strcmp (name, "F12")) return SDLK_F12;
+	if( !strcmp (name, "F13")) return SDLK_F13;
+	if( !strcmp (name, "F14")) return SDLK_F14;
+	if( !strcmp (name, "F15")) return SDLK_F15;
+	if( !strcmp (name, "NUMLOCK")) return SDLK_NUMLOCK;
+	if( !strcmp (name, "CAPSLOCK")) return SDLK_CAPSLOCK;
+	if( !strcmp (name, "SCROLLOCK")) return SDLK_SCROLLOCK;
+	if( !strcmp (name, "RSHIFT")) return SDLK_RSHIFT;
+	if( !strcmp (name, "LSHIFT")) return SDLK_LSHIFT;
+	if( !strcmp (name, "RCTRL")) return SDLK_RCTRL;
+	if( !strcmp (name, "LCTRL")) return SDLK_LCTRL;
+	if( !strcmp (name, "RALT")) return SDLK_RALT;
+	if( !strcmp (name, "LALT")) return SDLK_LALT;
+	if( !strcmp (name, "RMETA")) return SDLK_RMETA;
+	if( !strcmp (name, "LMETA")) return SDLK_LMETA;
+	if( !strcmp (name, "LSUPER")) return SDLK_LSUPER;
+	if( !strcmp (name, "RSUPER")) return SDLK_RSUPER;
+	if( !strcmp (name, "MODE")) return SDLK_MODE;
+	if( !strcmp (name, "HELP")) return SDLK_HELP;
+	if( !strcmp (name, "PRINT")) return SDLK_PRINT;
+	if( !strcmp (name, "SYSREQ")) return SDLK_SYSREQ;
+	if( !strcmp (name, "BREAK")) return SDLK_BREAK;
+	if( !strcmp (name, "MENU")) return SDLK_MENU;
+	if( !strcmp (name, "POWER")) return SDLK_POWER;
+	if( !strcmp (name, "EURO")) return SDLK_EURO;
+	return -1;
+}
+
+char* SDLKToKeyname( int key)
+{
+	if( key == SDLK_BACKSPACE) return "BACKSPACE";
+	if( key == SDLK_TAB) return "TAB";
+	if( key == SDLK_CLEAR) return "CLEAR";
+	if( key == SDLK_RETURN) return "RETURN";
+	if( key == SDLK_SPACE) return "SPACE";
+	if( key == SDLK_ESCAPE) return "ESCAPE";
+	if( key == SDLK_EXCLAIM) return "EXCLAIM";
+	if( key == SDLK_QUOTEDBL) return "QUOTEDBL";
+	if( key == SDLK_HASH) return "HASH";
+	if( key == SDLK_PAUSE) return "PAUSE";
+	if( key == SDLK_DOLLAR) return "DOLLAR";
+	if( key == SDLK_AMPERSAND) return "AMPERSAND";
+	if( key == SDLK_QUOTE) return "QUOTE";
+	if( key == SDLK_LEFTPAREN) return "LEFTPAREN";
+	if( key == SDLK_RIGHTPAREN) return "RIGHTPAREN";
+	if( key == SDLK_ASTERISK) return "ASTERISK";
+	if( key == SDLK_PLUS) return "PLUS";
+	if( key == SDLK_COMMA) return "COMMA";
+	if( key == SDLK_MINUS) return "MINUS";
+	if( key == SDLK_PERIOD) return "PERIOD";
+	if( key == SDLK_SLASH) return "SLASH";
+	if( key == SDLK_0) return "0";
+	if( key == SDLK_1) return "1";
+	if( key == SDLK_2) return "2";
+	if( key == SDLK_3) return "3";
+	if( key == SDLK_4) return "4";
+	if( key == SDLK_5) return "5";
+	if( key == SDLK_6) return "6";
+	if( key == SDLK_7) return "7";
+	if( key == SDLK_8) return "8";
+	if( key == SDLK_9) return "9";
+	if( key == SDLK_COLON) return "COLON";
+	if( key == SDLK_SEMICOLON) return "SEMICOLON";
+	if( key == SDLK_LESS) return "LESS";
+	if( key == SDLK_EQUALS) return "EQUALS";
+	if( key == SDLK_GREATER) return "GREATER";
+	if( key == SDLK_QUESTION) return "QUESTION";
+	if( key == SDLK_AT) return "AT";
+	if( key == SDLK_LEFTBRACKET) return "LEFTBRACKET";
+	if( key == SDLK_BACKSLASH) return "BACKSLASH";
+	if( key == SDLK_RIGHTBRACKET) return "RIGHTBRACKET";
+	if( key == SDLK_CARET) return "CARET";
+	if( key == SDLK_UNDERSCORE) return "UNDERSCORE";
+	if( key == SDLK_BACKQUOTE) return "BACKQUOTE";
+	if( key == SDLK_a) return "a";
+	if( key == SDLK_b) return "b";
+	if( key == SDLK_c) return "c";
+	if( key == SDLK_d) return "d";
+	if( key == SDLK_e) return "e";
+	if( key == SDLK_f) return "f";
+	if( key == SDLK_g) return "g";
+	if( key == SDLK_h) return "h";
+	if( key == SDLK_i) return "i";
+	if( key == SDLK_j) return "j";
+	if( key == SDLK_k) return "k";
+	if( key == SDLK_l) return "l";
+	if( key == SDLK_m) return "m";
+	if( key == SDLK_n) return "n";
+	if( key == SDLK_o) return "o";
+	if( key == SDLK_p) return "p";
+	if( key == SDLK_q) return "q";
+	if( key == SDLK_r) return "r";
+	if( key == SDLK_s) return "s";
+	if( key == SDLK_t) return "t";
+	if( key == SDLK_u) return "u";
+	if( key == SDLK_v) return "v";
+	if( key == SDLK_w) return "w";
+	if( key == SDLK_x) return "x";
+	if( key == SDLK_y) return "y";
+	if( key == SDLK_z) return "z";
+	if( key == SDLK_DELETE) return "DELETE";
+	if( key == SDLK_KP0) return "KP0";
+	if( key == SDLK_KP1) return "KP1";
+	if( key == SDLK_KP2) return "KP2";
+	if( key == SDLK_KP3) return "KP3";
+	if( key == SDLK_KP4) return "KP4";
+	if( key == SDLK_KP5) return "KP5";
+	if( key == SDLK_KP6) return "KP6";
+	if( key == SDLK_KP7) return "KP7";
+	if( key == SDLK_KP8) return "KP8";
+	if( key == SDLK_KP9) return "KP9";
+	if( key == SDLK_KP_PERIOD) return "KP_PERIOD";
+	if( key == SDLK_KP_DIVIDE) return "KP_DIVIDE";
+	if( key == SDLK_KP_MULTIPLY) return "KP_MULTIPLY";
+	if( key == SDLK_KP_MINUS) return "KP_MINUS";
+	if( key == SDLK_KP_PLUS) return "KP_PLUS";
+	if( key == SDLK_KP_ENTER) return "KP_ENTER";
+	if( key == SDLK_KP_EQUALS) return "KP_EQUALS";
+	if( key == SDLK_UP) return "UP";
+	if( key == SDLK_DOWN) return "DOWN";
+	if( key == SDLK_RIGHT) return "RIGHT";
+	if( key == SDLK_LEFT) return "LEFT";
+	if( key == SDLK_INSERT) return "INSERT";
+	if( key == SDLK_HOME) return "HOME";
+	if( key == SDLK_END) return "END";
+	if( key == SDLK_PAGEUP) return "PAGEUP";
+	if( key == SDLK_PAGEDOWN) return "PAGEDOWN";
+	if( key == SDLK_F1) return "F1";
+	if( key == SDLK_F2) return "F2";
+	if( key == SDLK_F3) return "F3";
+	if( key == SDLK_F4) return "F4";
+	if( key == SDLK_F5) return "F5";
+	if( key == SDLK_F6) return "F6";
+	if( key == SDLK_F7) return "F7";
+	if( key == SDLK_F8) return "F8";
+	if( key == SDLK_F9) return "F9";
+	if( key == SDLK_F10) return "F10";
+	if( key == SDLK_F11) return "F11";
+	if( key == SDLK_F12) return "F12";
+	if( key == SDLK_F13) return "F13";
+	if( key == SDLK_F14) return "F14";
+	if( key == SDLK_F15) return "F15";
+	if( key == SDLK_NUMLOCK) return "NUMLOCK";
+	if( key == SDLK_CAPSLOCK) return "CAPSLOCK";
+	if( key == SDLK_SCROLLOCK) return "SCROLLOCK";
+	if( key == SDLK_RSHIFT) return "RSHIFT";
+	if( key == SDLK_LSHIFT) return "LSHIFT";
+	if( key == SDLK_RCTRL) return "RCTRL";
+	if( key == SDLK_LCTRL) return "LCTRL";
+	if( key == SDLK_RALT) return "RALT";
+	if( key == SDLK_LALT) return "LALT";
+	if( key == SDLK_RMETA) return "RMETA";
+	if( key == SDLK_LMETA) return "LMETA";
+	if( key == SDLK_LSUPER) return "LSUPER";
+	if( key == SDLK_RSUPER) return "RSUPER";
+	if( key == SDLK_MODE) return "MODE";
+	if( key == SDLK_HELP) return "HELP";
+	if( key == SDLK_PRINT) return "PRINT";
+	if( key == SDLK_SYSREQ) return "SYSREQ";
+	if( key == SDLK_BREAK) return "BREAK";
+	if( key == SDLK_MENU) return "MENU";
+	if( key == SDLK_POWER) return "POWER";
+	if( key == SDLK_EURO) return "EURO";
+	return "UNKNOWN";
+}
Index: /orxonox/trunk/src/lib/event/key_names.h
===================================================================
--- /orxonox/trunk/src/lib/event/key_names.h	(revision 4457)
+++ /orxonox/trunk/src/lib/event/key_names.h	(revision 4457)
@@ -0,0 +1,39 @@
+/*!
+    \file keynames.h
+    \brief Key/button naming functions
+    
+		Converts strings to SDLK/SDL_BUTTON values and vice versa
+*/
+#ifndef _KEY_NAMES_H
+#define _KEY_NAMES_H
+
+/**
+	\brief converts a button name string to a integer representing the corresponding SDL mouse button identifier
+	\param name: the name of the mouse button
+	\return an int containing the SDL identifier of the mouse button or -1 if the button name is not valid
+*/
+int buttonnameToSDLB( char* name);
+
+/**
+	\brief converst a SDL mouse button identifier to a name string
+	\param button: an SDL mouse button identifier
+	\return a pointer to a string containing the name of the mouse button
+*/
+char* SDLBToButtonname( int button);
+
+/**
+	\brief converts a key name string to a integer representing the corresponding SDLK sym
+	\param name: the name of the key
+	\return the SDLK sym of the named key or -1 if the key name is not valid
+*/
+int keynameToSDLK( char* name);
+
+/**
+	\brief converts an SDLK sym to a name string
+	\param key: the SDLK sym
+	\return a pointer to a string containig the name of the key
+*/
+char* SDLKToKeyname( int key);
+
+
+#endif /* _KEY_NAMES_H */
