Index: trunk/src/util/shell.cc
===================================================================
--- trunk/src/util/shell.cc	(revision 5094)
+++ trunk/src/util/shell.cc	(revision 5095)
@@ -46,17 +46,21 @@
   this->setBufferSize(100);
   this->setBufferDisplaySize(10);
-  this->setAbsCoor2D(2, GraphicsEngine::getInstance()->getResolutionY());
-  this->setAbsDir2D(0);
+  this->setAbsCoor2D(3, GraphicsEngine::getInstance()->getResolutionY());
+  this->repeatDelay = .15;
+  this->delayed = 0;
+  this->pressedKey = SDLK_FIRST;
 
   this->inputLineText = TextEngine::getInstance()->createText("fonts/earth.ttf", 10, TEXT_DYNAMIC, 255, 0, 0);
+  this->inputLineText->setAlignment(TEXT_ALIGN_LEFT);
   this->inputLineText->setText(NULL);
   this->inputLine = new char[1];
   this->inputLine[0] = '\0';
-
-  EventHandler::getInstance()->subscribe(this, ES_GAME, SDLK_BACKQUOTE);
+  this->inputLineText->setParent2D(this);
+
 
   EventHandler* evh = EventHandler::getInstance();
-  for (int i = 1; i < EV_NUMBER; i++)
-    EventHandler::getInstance()->subscribe(this, ES_SHELL, i);
+  evh->subscribe(this, ES_GAME, SDLK_BACKQUOTE);
+  for (int i = 1; i < SDLK_F15; i++)
+    evh->subscribe(this, ES_SHELL, i);
 }
 
@@ -97,5 +101,5 @@
     this->bufferText[i] = TextEngine::getInstance()->createText("fonts/earth.ttf", this->textSize, TEXT_DYNAMIC, 255, 0, 0);
     this->bufferText[i]->setAlignment(TEXT_ALIGN_LEFT);
-    this->bufferText[i]->setRelCoor2D(5, 12*i);
+    this->bufferText[i]->setRelCoor2D(5, 12+12*i);
     this->bufferText[i]->setText(NULL);
     this->bufferText[i]->setParent2D(this);
@@ -320,7 +324,21 @@
       this->autoComplete();
     else if (event.type == SDLK_BACKSPACE)
+    {
+      this->delayed = this->repeatDelay;
+      this->pressedKey = SDLK_BACKSPACE;
       this->removeCharacters(1);
+    }
     else if (event.type < 127)
+    {
+      this->delayed = this->repeatDelay;
+      this->pressedKey = event.type;
       this->addCharacter(event.type);
+    }
+  }
+  else // if(!event.bPressed)
+  {
+    if (this->pressedKey == event.type)
+      this->pressedKey = SDLK_FIRST;
+    this->delayed = 0.0;
   }
 }
@@ -330,7 +348,17 @@
  * @param dt the elapsed time since the last tick();
  */
-//void Shell::tick(float dt)
-//{
-//}
+void Shell::tick(float dt)
+{
+  if (this->delayed > 0.0)
+    this->delayed -= dt;
+  else if (this->pressedKey != SDLK_FIRST )
+  {
+    this->delayed = this->repeatDelay;
+    if (this->pressedKey == SDLK_BACKSPACE)
+      this->removeCharacters(1);
+    else if (pressedKey < 127)
+      this->addCharacter(this->pressedKey);
+  }
+}
 
 /**
Index: trunk/src/util/shell.h
===================================================================
--- trunk/src/util/shell.h	(revision 5094)
+++ trunk/src/util/shell.h	(revision 5095)
@@ -58,5 +58,5 @@
 
     // Element2D-functions
-//    void tick(float dt);
+    void tick(float dt);
     virtual void draw() const;
 
@@ -74,10 +74,13 @@
     unsigned int           bufferDisplaySize;      //!< The Size of the Display-buffer, in lines (not in characters)
 
+    Text*                  inputLineText;          //!< The inputLine of the Shell
     char*                  inputLine;              //!< the Char-Array of the Buffer
+    float                  repeatDelay;            //!< The Repeat-Delay.
+    float                  delayed;                //!< how much of the delay is remaining.
+    int                    pressedKey;             //!< the pressed key that will be repeated.
 
     tList<char>*           buffer;                 //!< A list of stored char-arrays(strings) to store the history
 
     Text**                 bufferText;             //!< A list of stored bufferTexts for the display of the buffer
-    Text*                  inputLineText;          //!< The inputLine of the Shell
     unsigned int           textSize;               //!< The size of the text.
     unsigned int           lineSpacing;            //!< The Spacing between lines.
