Index: code/branches/console/src/libraries/core/IOConsole.cc
===================================================================
--- code/branches/console/src/libraries/core/IOConsole.cc	(revision 5975)
+++ code/branches/console/src/libraries/core/IOConsole.cc	(revision 5983)
@@ -62,4 +62,5 @@
         this->originalTerminalSettings_ = new termios;
         this->setTerminalMode();
+		this->shell_.registerListener(this);
     }
 
@@ -70,5 +71,4 @@
         resetTerminalMode();
         delete this->originalTerminalSettings_;
-        COUT(0) << "Press enter to end the game..." << std::endl;
     }
 
@@ -108,5 +108,5 @@
             else if (this->escapeMode_ == Second)
             {
-                bool endOfSeq = true;
+				this->escapeSequence_ += c;
                 this->escapeMode_ = None;
                 if      (this->escapeSequence_ == "A")
@@ -141,5 +141,5 @@
                 if (this->escapeMode_ == First)
                 {
-                    this->buffer_->buttonPressed(KeyEvent(KeyCode::Escape, 0, 0));
+                    this->buffer_->buttonPressed(KeyEvent(KeyCode::Escape, c, 0));
                     this->escapeMode_ = None;
                 }
@@ -172,5 +172,8 @@
         // If there is still an escape key pending (escape key ONLY), then
         // it sure isn't an escape sequence here
-        this->buffer_->buttonPressed(KeyEvent(KeyCode::Escape, 0, 0));
+        if (this->escapeMode_ == First)
+            this->buffer_->buttonPressed(KeyEvent(KeyCode::Escape, '\033', 0));
+        // Reset in any case because escape sequences always come in one piece
+        this->escapeMode_ = None;
 
         // Print input line
@@ -178,25 +181,21 @@
     }
 
-    void IOConsole::printOutputLine(const std::string& line)
-    {
-        COUT(0) << "print output" << std::endl;
-        // Save cursor position
-        std::cout << "\033[s";
-
+    void IOConsole::print(const std::string& text)
+    {
         std::string output;
 
         // Handle line colouring by inspecting the first letter
         char level = 0;
-        if (!line.empty())
-            level = line[0];
+        if (!text.empty())
+            level = text[0];
         if (level >= -1 && level <= 6)
-            output = line.substr(1);
+            output = text.substr(1);
         else
-            output = line;
+            output = text;
 
         // Colour line
         switch (level)
         {
-        case -1: std::cout << "\033[30m"; break;
+        case -1: std::cout << "\033[37m"; break;
         case  1: std::cout << "\033[91m"; break;
         case  2: std::cout << "\033[31m"; break;
@@ -209,13 +208,9 @@
 
         // Print output line
-        std::cout << output << std::endl;
-
-        // Reset colour to black
-        std::cout << "\033[30m";
-        // Restore cursor position
-        std::cout << "\033[u";
+        std::cout << output;
+
+        // Reset colour to white
+        std::cout << "\033[37m";
         std::cout.flush();
-
-        this->printInputLine();
     }
 
@@ -223,9 +218,9 @@
     {
         // set cursor to the beginning of the line and erase the line
-        std::cout << "\033[0G\033[K";
+        std::cout << "\033[1G\033[K";
         // print status line
         //std::cout << std::fixed << std::setprecision(2) << std::setw(5) << Game::getInstance().getAvgFPS() << " fps, " << std::setprecision(2) << std::setw(5) << Game::getInstance().getAvgTickTime() << " ms avg ticktime # ";
         // Show an arrow to indicate a command prompt
-        std::cout << ">";
+        std::cout << "orxonox>";
         // save cursor position
         std::cout << "\033[s";
@@ -261,6 +256,12 @@
     void IOConsole::onlyLastLineChanged()
     {
-        // We cannot do anything here because printed lines are fixed
-        COUT(2) << "Warning: Trying to edit last console lines, which is impossible!" << std::endl;
+		// Save cursor position and move it the beginning of the second to last line
+		std::cout << "\033[s\033[1F";
+		// Erase the second to last line
+		std::cout << "\033[K";
+		this->print(*(this->shell_.getNewestLineIterator()));
+		// Restore cursor
+		std::cout << "\033[u";
+		std::cout.flush();
     }
 
@@ -271,5 +272,9 @@
     void IOConsole::lineAdded()
     {
-        this->printOutputLine(*(this->shell_.getNewestLineIterator()));
+		// Move curosr the beginning of the line and erase it
+		std::cout << "\033[1G\033[K";
+		this->print(*(this->shell_.getNewestLineIterator()));
+		std::cout << std::endl;
+		this->printInputLine();
     }
 
@@ -294,4 +299,18 @@
     /**
     @brief
+        Called if a command is about to be executed
+    */
+    void IOConsole::executed()
+    {
+		// Move curosr the beginning of the line
+		std::cout << "\033[1G";
+        // Print command so the user knows what he typed
+        std::cout << "orxonox>" << this->shell_.getInput() << std::endl;
+		this->printInputLine();
+    }
+
+
+    /**
+    @brief
         Called if the console gets closed.
     */
Index: code/branches/console/src/libraries/core/IOConsole.h
===================================================================
--- code/branches/console/src/libraries/core/IOConsole.h	(revision 5975)
+++ code/branches/console/src/libraries/core/IOConsole.h	(revision 5983)
@@ -63,5 +63,5 @@
         static void resetTerminalMode();
 
-        void printOutputLine(const std::string& line);
+        void print(const std::string& line);
         void printInputLine();
 
@@ -72,4 +72,5 @@
         void inputChanged();
         void cursorChanged();
+        void executed();
         void exit();
 
Index: code/branches/console/src/libraries/core/Shell.cc
===================================================================
--- code/branches/console/src/libraries/core/Shell.cc	(revision 5975)
+++ code/branches/console/src/libraries/core/Shell.cc	(revision 5983)
@@ -121,7 +121,7 @@
         this->inputBuffer_->registerListener(this, &Shell::hintandcomplete, '\t', true);
         this->inputBuffer_->registerListener(this, &Shell::backspace, '\b', true);
-        this->inputBuffer_->registerListener(this, &Shell::backspace, static_cast<char>(127), true);
+        this->inputBuffer_->registerListener(this, &Shell::backspace, '\177', true);
         this->inputBuffer_->registerListener(this, &Shell::deletechar, KeyCode::Delete);
-        this->inputBuffer_->registerListener(this, &Shell::exit, static_cast<char>(27), true);
+        this->inputBuffer_->registerListener(this, &Shell::exit, '\033', true); // escape
         this->inputBuffer_->registerListener(this, &Shell::cursor_right, KeyCode::Right);
         this->inputBuffer_->registerListener(this, &Shell::cursor_left, KeyCode::Left);
@@ -278,5 +278,5 @@
     {
         this->addToHistory(this->inputBuffer_->get());
-        this->addLine(this->inputBuffer_->get(), 0);
+        this->updateListeners<&ShellListener::executed>();
 
         if (!CommandExecutor::execute(this->inputBuffer_->get()))
Index: code/branches/console/src/libraries/core/Shell.h
===================================================================
--- code/branches/console/src/libraries/core/Shell.h	(revision 5975)
+++ code/branches/console/src/libraries/core/Shell.h	(revision 5983)
@@ -57,4 +57,5 @@
             virtual void inputChanged() {}
             virtual void cursorChanged() {}
+            virtual void executed() {}
             virtual void exit() {}
     };
Index: code/branches/console/src/libraries/util/OutputHandler.cc
===================================================================
--- code/branches/console/src/libraries/util/OutputHandler.cc	(revision 5975)
+++ code/branches/console/src/libraries/util/OutputHandler.cc	(revision 5983)
@@ -149,6 +149,6 @@
     OutputHandler& OutputHandler::operator<<(std::streambuf* sb)
     {
-        if (getSoftDebugLevel(OutputHandler::LD_Console) >= this->outputLevel_)
-            std::cout << sb;
+        //if (getSoftDebugLevel(OutputHandler::LD_Console) >= this->outputLevel_)
+        //    std::cout << sb;
 
         if (getSoftDebugLevel(OutputHandler::LD_Logfile) >= this->outputLevel_)
@@ -171,6 +171,6 @@
     OutputHandler& OutputHandler::operator<<(std::ostream& (*manipulator)(std::ostream&))
     {
-        if (getSoftDebugLevel(OutputHandler::LD_Console) >= this->outputLevel_)
-            manipulator(std::cout);
+        //if (getSoftDebugLevel(OutputHandler::LD_Console) >= this->outputLevel_)
+        //    manipulator(std::cout);
 
         if (getSoftDebugLevel(OutputHandler::LD_Logfile) >= this->outputLevel_)
@@ -193,6 +193,6 @@
     OutputHandler& OutputHandler::operator<<(std::ios& (*manipulator)(std::ios&))
     {
-        if (getSoftDebugLevel(OutputHandler::LD_Console) >= this->outputLevel_)
-            manipulator(std::cout);
+        //if (getSoftDebugLevel(OutputHandler::LD_Console) >= this->outputLevel_)
+        //    manipulator(std::cout);
 
         if (getSoftDebugLevel(OutputHandler::LD_Logfile) >= this->outputLevel_)
@@ -215,6 +215,6 @@
     OutputHandler& OutputHandler::operator<<(std::ios_base& (*manipulator)(std::ios_base&))
     {
-        if (getSoftDebugLevel(OutputHandler::LD_Console) >= this->outputLevel_)
-            manipulator(std::cout);
+        //if (getSoftDebugLevel(OutputHandler::LD_Console) >= this->outputLevel_)
+        //    manipulator(std::cout);
 
         if (getSoftDebugLevel(OutputHandler::LD_Logfile) >= this->outputLevel_)
Index: code/branches/console/src/libraries/util/OutputHandler.h
===================================================================
--- code/branches/console/src/libraries/util/OutputHandler.h	(revision 5975)
+++ code/branches/console/src/libraries/util/OutputHandler.h	(revision 5983)
@@ -164,6 +164,6 @@
     OutputHandler& OutputHandler::output(const T& output)
     {
-        if (OutputHandler::getSoftDebugLevel(OutputHandler::LD_Console) >= this->outputLevel_)
-            std::cout << output;
+        //if (OutputHandler::getSoftDebugLevel(OutputHandler::LD_Console) >= this->outputLevel_)
+        //    std::cout << output;
 
         if (OutputHandler::getSoftDebugLevel(OutputHandler::LD_Logfile) >= this->outputLevel_)
@@ -188,6 +188,6 @@
     OutputHandler& operator<<(OutputHandler& out, const T& output)
     {
-        if (OutputHandler::getSoftDebugLevel(OutputHandler::LD_Console) >= out.getOutputLevel())
-            std::cout << output;
+        //if (OutputHandler::getSoftDebugLevel(OutputHandler::LD_Console) >= out.getOutputLevel())
+        //    std::cout << output;
 
         if (OutputHandler::getSoftDebugLevel(OutputHandler::LD_Logfile) >= out.getOutputLevel())
