Index: trunk/src/lib/event/key_mapper.cc
===================================================================
--- trunk/src/lib/event/key_mapper.cc	(revision 7166)
+++ trunk/src/lib/event/key_mapper.cc	(revision 7221)
@@ -129,5 +129,5 @@
  * @param filename: The path and name of the file to load the bindings from
 */
-void KeyMapper::loadKeyBindings (const char* fileName)
+void KeyMapper::loadKeyBindings (const std::string& fileName)
 {
   IniParser parser(fileName);
@@ -145,5 +145,5 @@
 
   iniParser->firstVar();
-  while(iniParser->getCurrentName())
+  while(iniParser->getCurrentName() != "")
   {
     PRINTF(3)("Keys: Parsing %s, %s now.\n", iniParser->getCurrentName(), iniParser->getCurrentValue());
@@ -164,5 +164,5 @@
 
   iniParser->firstVar();
-  while(iniParser->getCurrentName())
+  while(iniParser->getCurrentName() != "")
   {
     PRINTF(3)("MISC: Parsing %s, %s now.\n", iniParser->getCurrentName(), iniParser->getCurrentValue());
@@ -177,5 +177,5 @@
  * @param the name of the button
 */
-int* KeyMapper::nameToIndex (const char* name)
+int* KeyMapper::nameToIndex (const std::string& name)
 {
   coord[0] = -1;
@@ -199,9 +199,9 @@
  * @param id of the key
 */
-void KeyMapper::mapKeys(const char* name, int* index)
+void KeyMapper::mapKeys(const std::string& name, int* index)
 {
   for( int i = 0; map[i].pValue != NULL; ++i )
     {
-      if( !strcmp (name, map[i].pName))
+      if( name == map[i].pName)
       {
         if( index[0] == 0)
Index: trunk/src/lib/event/key_mapper.h
===================================================================
--- trunk/src/lib/event/key_mapper.h	(revision 7166)
+++ trunk/src/lib/event/key_mapper.h	(revision 7221)
@@ -29,5 +29,5 @@
   virtual ~KeyMapper();
 
-  void loadKeyBindings(const char* fileName = NULL);
+  void loadKeyBindings(const std::string& fileName = "" );
   void loadKeyBindings(IniParser* iniParser);
 
@@ -35,6 +35,6 @@
 
  private:
-  int* nameToIndex (const char* name);
-  void mapKeys(const char* name, int* index);
+  int* nameToIndex (const std::string& name);
+  void mapKeys(const std::string& name, int* index);
 
  public:
Index: trunk/src/lib/event/key_names.cc
===================================================================
--- trunk/src/lib/event/key_names.cc	(revision 7166)
+++ trunk/src/lib/event/key_names.cc	(revision 7221)
@@ -23,11 +23,11 @@
 using namespace std;
 
-int buttonnameToSDLB(const char* name)
+int buttonnameToSDLB(const std::string& name)
 {
-        if( !strcmp (name, "BUTTON_LEFT")) return EV_MOUSE_BUTTON_LEFT;
-        if( !strcmp (name, "BUTTON_MIDDLE")) return EV_MOUSE_BUTTON_MIDDLE;
-        if( !strcmp (name, "BUTTON_RIGHT")) return EV_MOUSE_BUTTON_RIGHT;
-        if( !strcmp (name, "BUTTON_WHEELUP")) return EV_MOUSE_BUTTON_WHEELUP;
-        if( !strcmp (name, "BUTTON_WHEELDOWN")) return EV_MOUSE_BUTTON_WHEELDOWN;
+        if((name == "BUTTON_LEFT")) return EV_MOUSE_BUTTON_LEFT;
+        if((name == "BUTTON_MIDDLE")) return EV_MOUSE_BUTTON_MIDDLE;
+        if((name == "BUTTON_RIGHT")) return EV_MOUSE_BUTTON_RIGHT;
+        if((name == "BUTTON_WHEELUP")) return EV_MOUSE_BUTTON_WHEELUP;
+        if((name == "BUTTON_WHEELDOWN")) return EV_MOUSE_BUTTON_WHEELDOWN;
         return -1;
 }
@@ -43,143 +43,143 @@
 }
 
-int keynameToSDLK(const char* name)
+int keynameToSDLK(const std::string& 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;
+        if((name == "BACKSPACE")) return SDLK_BACKSPACE;
+        if((name == "TAB")) return SDLK_TAB;
+        if((name == "CLEAR")) return SDLK_CLEAR;
+        if((name == "RETURN")) return SDLK_RETURN;
+        if((name == "ESCAPE")) return SDLK_ESCAPE;
+        if((name == "SPACE")) return SDLK_SPACE;
+        if((name == "EXCLAIM")) return SDLK_EXCLAIM;
+        if((name == "QUOTEDBL")) return SDLK_QUOTEDBL;
+        if((name == "HASH")) return SDLK_HASH;
+        if((name == "PAUSE")) return SDLK_PAUSE;
+        if((name == "DOLLAR")) return SDLK_DOLLAR;
+        if((name == "AMPERSAND")) return SDLK_AMPERSAND;
+        if((name == "QUOTE")) return SDLK_QUOTE;
+        if((name == "LEFTPAREN")) return SDLK_LEFTPAREN;
+        if((name == "RIGHTPAREN")) return SDLK_RIGHTPAREN;
+        if((name == "ASTERISK")) return SDLK_ASTERISK;
+        if((name == "PLUS")) return SDLK_PLUS;
+        if((name == "COMMA")) return SDLK_COMMA;
+        if((name == "MINUS")) return SDLK_MINUS;
+        if((name == "PERIOD")) return SDLK_PERIOD;
+        if((name == "SLASH")) return SDLK_SLASH;
+        if((name == "0")) return SDLK_0;
+        if((name == "1")) return SDLK_1;
+        if((name == "2")) return SDLK_2;
+        if((name == "3")) return SDLK_3;
+        if((name == "4")) return SDLK_4;
+        if((name == "5")) return SDLK_5;
+        if((name == "6")) return SDLK_6;
+        if((name == "7")) return SDLK_7;
+        if((name == "8")) return SDLK_8;
+        if((name == "9")) return SDLK_9;
+        if((name == "COLON")) return SDLK_COLON;
+        if((name == "SEMICOLON")) return SDLK_SEMICOLON;
+        if((name == "LESS")) return SDLK_LESS;
+        if((name == "EQUALS")) return SDLK_EQUALS;
+        if((name == "GREATER")) return SDLK_GREATER;
+        if((name == "QUESTION")) return SDLK_QUESTION;
+        if((name == "AT")) return SDLK_AT;
+        if((name == "LEFTBRACKET")) return SDLK_LEFTBRACKET;
+        if((name == "BACKSLASH")) return SDLK_BACKSLASH;
+        if((name == "RIGHTBRACKET")) return SDLK_RIGHTBRACKET;
+        if((name == "CARET")) return SDLK_CARET;
+        if((name == "UNDERSCORE")) return SDLK_UNDERSCORE;
+        if((name == "BACKQUOTE")) return SDLK_BACKQUOTE;
+        if((name == "a")) return SDLK_a;
+        if((name == "b")) return SDLK_b;
+        if((name == "c")) return SDLK_c;
+        if((name == "d")) return SDLK_d;
+        if((name == "e")) return SDLK_e;
+        if((name == "f")) return SDLK_f;
+        if((name == "g")) return SDLK_g;
+        if((name == "h")) return SDLK_h;
+        if((name == "i")) return SDLK_i;
+        if((name == "j")) return SDLK_j;
+        if((name == "k")) return SDLK_k;
+        if((name == "l")) return SDLK_l;
+        if((name == "m")) return SDLK_m;
+        if((name == "n")) return SDLK_n;
+        if((name == "o")) return SDLK_o;
+        if((name == "p")) return SDLK_p;
+        if((name == "q")) return SDLK_q;
+        if((name == "r")) return SDLK_r;
+        if((name == "s")) return SDLK_s;
+        if((name == "t")) return SDLK_t;
+        if((name == "u")) return SDLK_u;
+        if((name == "v")) return SDLK_v;
+        if((name == "w")) return SDLK_w;
+        if((name == "x")) return SDLK_x;
+        if((name == "y")) return SDLK_y;
+        if((name == "z")) return SDLK_z;
+        if((name == "DELETE")) return SDLK_DELETE;
+        if((name == "KP0")) return SDLK_KP0;
+        if((name == "KP1")) return SDLK_KP1;
+        if((name == "KP2")) return SDLK_KP2;
+        if((name == "KP3")) return SDLK_KP3;
+        if((name == "KP4")) return SDLK_KP4;
+        if((name == "KP5")) return SDLK_KP5;
+        if((name == "KP6")) return SDLK_KP6;
+        if((name == "KP7")) return SDLK_KP7;
+        if((name == "KP8")) return SDLK_KP8;
+        if((name == "KP9")) return SDLK_KP9;
+        if((name == "KP_PERIOD")) return SDLK_KP_PERIOD;
+        if((name == "KP_DIVIDE")) return SDLK_KP_DIVIDE;
+        if((name == "KP_MULTIPLY")) return SDLK_KP_MULTIPLY;
+        if((name == "KP_MINUS")) return SDLK_KP_MINUS;
+        if((name == "KP_PLUS")) return SDLK_KP_PLUS;
+        if((name == "KP_ENTER")) return SDLK_KP_ENTER;
+        if((name == "KP_EQUALS")) return SDLK_KP_EQUALS;
+        if((name == "UP")) return SDLK_UP;
+        if((name == "DOWN")) return SDLK_DOWN;
+        if((name == "RIGHT")) return SDLK_RIGHT;
+        if((name == "LEFT")) return SDLK_LEFT;
+        if((name == "INSERT")) return SDLK_INSERT;
+        if((name == "HOME")) return SDLK_HOME;
+        if((name == "END")) return SDLK_END;
+        if((name == "PAGEUP")) return SDLK_PAGEUP;
+        if((name == "PAGEDOWN")) return SDLK_PAGEDOWN;
+        if((name == "F1")) return SDLK_F1;
+        if((name == "F2")) return SDLK_F2;
+        if((name == "F3")) return SDLK_F3;
+        if((name == "F4")) return SDLK_F4;
+        if((name == "F5")) return SDLK_F5;
+        if((name == "F6")) return SDLK_F6;
+        if((name == "F7")) return SDLK_F7;
+        if((name == "F8")) return SDLK_F8;
+        if((name == "F9")) return SDLK_F9;
+        if((name == "F10")) return SDLK_F10;
+        if((name == "F11")) return SDLK_F11;
+        if((name == "F12")) return SDLK_F12;
+        if((name == "F13")) return SDLK_F13;
+        if((name == "F14")) return SDLK_F14;
+        if((name == "F15")) return SDLK_F15;
+        if((name == "NUMLOCK")) return SDLK_NUMLOCK;
+        if((name == "CAPSLOCK")) return SDLK_CAPSLOCK;
+        if((name == "SCROLLOCK")) return SDLK_SCROLLOCK;
+        if((name == "RSHIFT")) return SDLK_RSHIFT;
+        if((name == "LSHIFT")) return SDLK_LSHIFT;
+        if((name == "RCTRL")) return SDLK_RCTRL;
+        if((name == "LCTRL")) return SDLK_LCTRL;
+        if((name == "RALT")) return SDLK_RALT;
+        if((name == "LALT")) return SDLK_LALT;
+        if((name == "RMETA")) return SDLK_RMETA;
+        if((name == "LMETA")) return SDLK_LMETA;
+        if((name == "LSUPER")) return SDLK_LSUPER;
+        if((name == "RSUPER")) return SDLK_RSUPER;
+        if((name == "MODE")) return SDLK_MODE;
+        if((name == "HELP")) return SDLK_HELP;
+        if((name == "PRINT")) return SDLK_PRINT;
+        if((name == "SYSREQ")) return SDLK_SYSREQ;
+        if((name == "BREAK")) return SDLK_BREAK;
+        if((name == "MENU")) return SDLK_MENU;
+        if((name == "POWER")) return SDLK_POWER;
+        if((name == "EURO")) return SDLK_EURO;
         return -1;
 }
 
-const char* SDLKToKeyname( int key)
+const char* SDLKToKeyname(int key)
 {
         if( key == SDLK_BACKSPACE) return "BACKSPACE";
Index: trunk/src/lib/event/key_names.h
===================================================================
--- trunk/src/lib/event/key_names.h	(revision 7166)
+++ trunk/src/lib/event/key_names.h	(revision 7221)
@@ -1,37 +1,39 @@
 /*!
  * @file keynames.h
-  *  Key/button naming functions
-
-                Converts strings to SDLK/SDL_BUTTON values and vice versa
-*/
+ *  Key/button naming functions
+ *
+ * Converts strings to SDLK/SDL_BUTTON values and vice versa
+ */
 #ifndef _KEY_NAMES_H
 #define _KEY_NAMES_H
 
-/**
-      *  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(const char* name);
+#include <string>
 
 /**
-      *  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
-*/
+ *  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(const std::string& name);
+
+/**
+ *  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
+ */
 const char* SDLBToButtonname( int button);
 
 /**
-      *  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(const char* name);
+ *  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(const std::string& name);
 
 /**
-      *  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
-*/
+ *  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
+ */
 const char* SDLKToKeyname( int key);
 
