Index: /code/branches/console/src/CMakeLists.txt
===================================================================
--- /code/branches/console/src/CMakeLists.txt	(revision 5972)
+++ /code/branches/console/src/CMakeLists.txt	(revision 5973)
@@ -98,5 +98,5 @@
 ADD_SUBDIRECTORY(libraries)
 ADD_SUBDIRECTORY(orxonox)
-ADD_SUBDIRECTORY(modules)
+#ADD_SUBDIRECTORY(modules)
 
 ################ Executable ################
Index: /code/branches/console/src/libraries/core/Core.cc
===================================================================
--- /code/branches/console/src/libraries/core/Core.cc	(revision 5972)
+++ /code/branches/console/src/libraries/core/Core.cc	(revision 5973)
@@ -64,4 +64,5 @@
 #include "Identifier.h"
 #include "Language.h"
+#include "IOConsole.h"
 #include "LuaState.h"
 #include "ScopedSingletonManager.h"
@@ -265,4 +266,6 @@
         // create a shell
         this->shell_.reset(new Shell());
+        // create persistent io console
+        this->ioConsole_.reset(new IOConsole());
 
         // Create singletons that always exist (in other libraries)
@@ -444,4 +447,6 @@
             ScopedSingletonManager::update<ScopeID::Graphics>(time);
         }
+        // process console text
+        this->ioConsole_->update(time);
         // process thread commands
         this->tclThreadManager_->update(time);
Index: /code/branches/console/src/libraries/core/Core.h
===================================================================
--- /code/branches/console/src/libraries/core/Core.h	(revision 5972)
+++ /code/branches/console/src/libraries/core/Core.h	(revision 5973)
@@ -43,4 +43,5 @@
 {
     class CoreConfiguration;
+	class IOConsole;
 
     /**
@@ -97,4 +98,5 @@
             scoped_ptr<TclThreadManager>  tclThreadManager_;
             scoped_ptr<Shell>             shell_;
+            scoped_ptr<IOConsole>         ioConsole_;
             // graphical
             scoped_ptr<GraphicsManager>   graphicsManager_;     //!< Interface to OGRE
Index: /code/branches/console/src/libraries/core/IOConsole.cc
===================================================================
--- /code/branches/console/src/libraries/core/IOConsole.cc	(revision 5972)
+++ /code/branches/console/src/libraries/core/IOConsole.cc	(revision 5973)
@@ -57,10 +57,6 @@
     IOConsole::IOConsole()
         : shell_(Shell::getInstance())
-        , cleanLine_(true)
         , bEscapeMode_(false)
         , buffer_(Shell::getInstance().getInputBuffer())
-        , inputIterator_(0)
-        , cursorX_(0)
-        , cursorY_(0)
     {
         this->originalTerminalSettings_ = new termios;
@@ -81,11 +77,11 @@
         termios new_settings;
 
-        tcgetattr(0,this->originalTerminalSettings_);
+        tcgetattr(0, this->originalTerminalSettings_);
         new_settings = *this->originalTerminalSettings_;
-        new_settings.c_lflag &= ~( ICANON | ECHO );
+        new_settings.c_lflag &= ~(ICANON | ECHO);
         //         new_settings.c_lflag |= ( ISIG | IEXTEN );
         new_settings.c_cc[VTIME] = 1;
-        new_settings.c_cc[VMIN] = 0;
-        tcsetattr(0,TCSANOW,&new_settings);
+        new_settings.c_cc[VMIN]  = 0;
+        tcsetattr(0, TCSANOW, &new_settings);
         COUT(0) << endl;
         //       atexit(&IOConsole::resetTerminalMode);
@@ -99,5 +95,5 @@
     void IOConsole::update(const Clock& time)
     {
-        unsigned c;
+        unsigned char c;
         while (read(STDIN_FILENO, &c, 1) == 1)
         {
@@ -105,8 +101,6 @@
             {
                 this->escapeSequence_ += c;
-                bool clear = true;
-                if      (this->escapeSequence_ == "\033")
-                    this->buffer_->buttonPressed(KeyEvent(KeyCode::Escape,   0, 0));
-                else if (this->escapeSequence_ == "[A")
+                bool endOfSeq = true;
+                if      (this->escapeSequence_ == "[A")
                     this->buffer_->buttonPressed(KeyEvent(KeyCode::Up,       0, 0));
                 else if (this->escapeSequence_ == "[B")
@@ -120,4 +114,6 @@
                 else if (this->escapeSequence_ == "[2~")
                     this->buffer_->buttonPressed(KeyEvent(KeyCode::Insert,   0, 0));
+                else if (this->escapeSequence_ == "[3~")
+                    this->buffer_->buttonPressed(KeyEvent(KeyCode::Delete,   0, 0));
                 else if (this->escapeSequence_ == "[4~")
                     this->buffer_->buttonPressed(KeyEvent(KeyCode::End,      0, 0));
@@ -130,15 +126,20 @@
                     this->buffer_->buttonPressed(KeyEvent(KeyCode::Tab, '\t', KeyboardModifier::Alt));
                 else if (this->escapeSequence_.size() > 4)
-                    clear = true; // Something went wrong, start over
+                    endOfSeq = true; // Something went wrong, start over
                 else
-                    clear = false;
-
-                if (clear)
-                    this->escapeSequence_.clear();
+                    endOfSeq = false;
+
+                //this->buffer_->buttonPressed(KeyEvent(KeyCode::Escape,   0, 0));
+
+                if (endOfSeq)
+                    this->bEscapeMode_ = false;
             }
             else // not in an escape sequence
             {
                 if (c == '\033')
+				{
                     this->bEscapeMode_ = true;
+					this->escapeSequence_.clear();
+				}
                 else
                 {
@@ -147,5 +148,6 @@
                     {
                     case '\n': code = KeyCode::Return; break;
-                    case  127: code = KeyCode::Delete; break; 
+                    case '\r': code = KeyCode::Return; break;
+                    case  127: code = KeyCode::Back;   break; 
                     case '\b': code = KeyCode::Back;   break;
                     case '\t': code = KeyCode::Tab;    break;
@@ -160,8 +162,12 @@
             }
         }
+
+		// Print input line
+		this->printInputLine();
     }
 
     void IOConsole::printOutputLine(const std::string& line)
     {
+		COUT(0) << "print output" << std::endl;
         // Save cursor position
         std::cout << "\033[s";
@@ -199,4 +205,6 @@
         std::cout << "\033[u";
         std::cout.flush();
+
+		this->printInputLine();
     }
 
@@ -206,10 +214,12 @@
         std::cout << "\033[0G\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 # ";
+        //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 << ">";
         // save cursor position
         std::cout << "\033[s";
         // print commandLine buffer
         std::cout << this->shell_.getInput();
-        // restore cursor position and move it cursorX_ to the right
+        // restore cursor position and move it to the right
         std::cout << "\033[u";
         if (this->buffer_->getCursorPosition() > 0)
Index: /code/branches/console/src/libraries/core/IOConsole.h
===================================================================
--- /code/branches/console/src/libraries/core/IOConsole.h	(revision 5972)
+++ /code/branches/console/src/libraries/core/IOConsole.h	(revision 5973)
@@ -58,6 +58,4 @@
         void printOutputLine(const std::string& line);
         void printInputLine();
-        void insertCharacter(unsigned int position, char c);
-        void deleteCharacter(unsigned int position);
 
         // Methods from ShellListener
@@ -70,14 +68,8 @@
 
         Shell&                  shell_;
-        bool                    cleanLine_;
         bool                    bEscapeMode_;
         std::string             escapeSequence_;
         InputBuffer*            buffer_;
-        unsigned char*          commandLine_;
-        unsigned int            inputIterator_;
         static termios*         originalTerminalSettings_;
-
-        unsigned int            cursorX_;
-        unsigned int            cursorY_;
 
         static IOConsole* singletonPtr_s;
Index: /code/branches/console/src/libraries/core/Shell.cc
===================================================================
--- /code/branches/console/src/libraries/core/Shell.cc	(revision 5972)
+++ /code/branches/console/src/libraries/core/Shell.cc	(revision 5973)
@@ -118,6 +118,8 @@
         this->inputBuffer_->registerListener(this, &Shell::inputChanged, true);
         this->inputBuffer_->registerListener(this, &Shell::execute, '\r', false);
+        this->inputBuffer_->registerListener(this, &Shell::execute, '\n', false);
         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::deletechar, KeyCode::Delete);
         this->inputBuffer_->registerListener(this, &Shell::exit, static_cast<char>(27), true);
Index: /code/branches/console/src/orxonox/gamestates/GSIOConsole.cc
===================================================================
--- /code/branches/console/src/orxonox/gamestates/GSIOConsole.cc	(revision 5972)
+++ /code/branches/console/src/orxonox/gamestates/GSIOConsole.cc	(revision 5973)
@@ -58,8 +58,10 @@
     void GSIOConsole::update(const Clock& time)
     {
+		/*
         std::cout << ">";
         std::string command;
         std::getline(std::cin, command);
         CommandExecutor::execute(command, true);
+		*/
     }
 
