Index: /branches/gui/src/lib/graphics/text_engine/text.cc
===================================================================
--- /branches/gui/src/lib/graphics/text_engine/text.cc	(revision 7893)
+++ /branches/gui/src/lib/graphics/text_engine/text.cc	(revision 7894)
@@ -149,8 +149,15 @@
 /**
  * @brief removes char characters from the Text.
+ *
+ * @note this function checks, if the count can be removed, and if so does it.
+ * Otherwise the maximum count of characters will be removed.
  */
 void Text::removeCharacters(unsigned int chars)
 {
-  this->text.resize(this->text.size()-chars);
+  if (text.size() > chars)
+    this->text.resize(this->text.size()-chars);
+  else if (!text.empty())
+    text.clear();
+  this->setupTextWidth();
 }
 
Index: /branches/gui/src/lib/gui/gl_gui/glgui_inputline.cc
===================================================================
--- /branches/gui/src/lib/gui/gl_gui/glgui_inputline.cc	(revision 7893)
+++ /branches/gui/src/lib/gui/gl_gui/glgui_inputline.cc	(revision 7894)
@@ -34,6 +34,9 @@
   */
   GLGuiInputLine::~GLGuiInputLine()
-  {
-  }
+  {}
+
+  float GLGuiInputLine::repeatDelay = 1.0;
+  float GLGuiInputLine::repeatRate = .1;
+
 
   /**
@@ -48,8 +51,8 @@
 
     this->text.setParent2D(this);
+    this->text.setRelCoor2D(4,4);
     this->text.setFont("fonts/final_frontier.ttf", 20);
 
     this->setText("SUPERTEST");
-    this->setSize2D( this->text.getSize2D());
   }
 
@@ -57,4 +60,5 @@
   {
     this->text.setText(text);
+    this->resize();
   }
 
@@ -62,4 +66,5 @@
   {
     this->text.append(appendText);
+    this->resize();
   }
 
@@ -67,4 +72,5 @@
   {
     this->text.appendCharacter(character);
+    this->resize();
   }
 
@@ -73,11 +79,43 @@
   {
     this->text.removeCharacters(chars);
+    this->resize();
   }
 
   bool GLGuiInputLine::processEvent(const Event& event)
   {
+    if (event.bPressed)
+    {
+      if (event.type == SDLK_BACKSPACE)
+      {
+        this->delayNext = GLGuiInputLine::repeatDelay;
+        this->pressedKey = SDLK_BACKSPACE;
+        this->pressedKeyName = SDLK_BACKSPACE;
+        this->removeCharacters(1);
+        return true;
+      }
+      // any other keyboard key
+      else if (likely(event.type < 127))
+      {
+        this->appendCharacter(event.x);
+        this->pressedKey = event.type;
+        this->pressedKeyName = event.x;
+        return true;
+      }
+      this->delayNext = this->repeatDelay;
+    }
+    else // if(!event.bPressed)
+    {
+      if (this->pressedKey == event.type)
+      {
+        this->pressedKeyName = 0;
+        this->pressedKey = 0;
+        this->delayNext = 0.0;
+        return true;
+      }
+    }
+
     if (likely(event.type < 127))
     {
-      this->appendCharacter(event.x);
+      this->appendCharacter(event.type);
       return true;
     }
@@ -86,4 +124,16 @@
   }
 
+
+  void GLGuiInputLine::resize()
+  {
+    this->setSize2D( this->text.getSize2D() + Vector2D(8, 8));
+  }
+
+
+  void GLGuiInputLine::tick(float dt)
+  {
+    if (this->delayNext > 0.0)
+      this->delayNext -= dt;
+  }
 
   /**
Index: /branches/gui/src/lib/gui/gl_gui/glgui_inputline.h
===================================================================
--- /branches/gui/src/lib/gui/gl_gui/glgui_inputline.h	(revision 7893)
+++ /branches/gui/src/lib/gui/gl_gui/glgui_inputline.h	(revision 7894)
@@ -35,10 +35,26 @@
     const std::string& getName() const { return this->text.getText(); };
 
+
+    virtual void tick(float dt);
     virtual void draw() const;
 
     virtual bool processEvent(const Event& event);
 
+    private:
+      void resize();
+
+
   private:
-    Text                    text;
+    Text                    text;             //!< The Text to display inside of the InputLine.
+
+    Uint16                  pressedKey;       //!< the pressed key that will be repeated.
+    Uint16                  pressedKeyName;   //!< The Name of the Key, that was pressed.
+
+    float                   delayNext;        //!< How much time must pass before next output.
+
+    static float            repeatDelay;
+    static float            repeatRate;
+
+
   };
 }
