Index: code/branches/console/src/core/CMakeLists.txt
===================================================================
--- code/branches/console/src/core/CMakeLists.txt	(revision 1311)
+++ code/branches/console/src/core/CMakeLists.txt	(revision 1312)
@@ -15,4 +15,7 @@
   CoreSettings.cc
   OutputHandler.cc
+  OutputBuffer.cc
+  InputBuffer.cc
+  CommandExecutor.cc
   Language.cc
   ClassTreeMask.cc
@@ -22,6 +25,4 @@
   Namespace.cc
   NamespaceNode.cc
-  CommandExecutor.cc
-  InputBuffer.cc
   Tickable.cc
   Script.cc
Index: code/branches/console/src/core/CorePrereqs.h
===================================================================
--- code/branches/console/src/core/CorePrereqs.h	(revision 1311)
+++ code/branches/console/src/core/CorePrereqs.h	(revision 1312)
@@ -137,4 +137,5 @@
   class OrxonoxClass;
   class OutputBuffer;
+  class OutputBufferListener;
   class OutputHandler;
   class Shell;
Index: code/branches/console/src/core/InputBuffer.cc
===================================================================
--- code/branches/console/src/core/InputBuffer.cc	(revision 1311)
+++ code/branches/console/src/core/InputBuffer.cc	(revision 1312)
@@ -38,32 +38,20 @@
     InputBuffer::InputBuffer()
     {
-        //this->bActivated_ = false;
-        this->allowedChars_ = "abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZäöüÄÖÜ0123456789 \\\"(){}[]<>.:,;_-+*/=!?|$&%^~#";
+        this->allowedChars_ = "abcdefghijklmnopqrstuvwxyz \
+                               ABCDEFGHIJKLMNOPQRSTUVWXYZ \
+                               äëïöüÄËÏÖÜáâàéêèíîìóôòúûù \
+                               0123456789 \
+                               \\\"(){}[]<>.:,;_-+*/=!?|$&%^~#";
         this->keyboard_ = InputManager::getSingleton().getKeyboard();
         this->buffer_ = "";
-
-        //this->keyboard_->setEventCallback(this);
     }
 
     InputBuffer::InputBuffer(const std::string allowedChars)
     {
-        //this->bActivated_ = false;
         this->allowedChars_ = allowedChars;
         this->keyboard_ = InputManager::getSingleton().getKeyboard();
         this->buffer_ = "";
     }
-/*
-    void InputBuffer::registerListener(InputBufferListener* listener, void (InputBufferListener::*function)(), bool bOnlySingleInput)
-    {
-        struct InputBufferListenerTuple newListener = {listener, function, true, bOnlySingleInput, ' '};
-        this->listeners_.insert(this->listeners_.end(), newListener);
-    }
 
-    void InputBuffer::registerListener(InputBufferListener* listener, void (InputBufferListener::*function)(), char char_, bool bOnlySingleInput)
-    {
-        struct InputBufferListenerTuple newListener = {listener, function, false, bOnlySingleInput, char_};
-        this->listeners_.insert(this->listeners_.end(), newListener);
-    }
-*/
     void InputBuffer::set(const std::string& input)
     {
@@ -117,12 +105,8 @@
         for (std::list<InputBufferListenerTuple>::iterator it = this->listeners_.begin(); it != this->listeners_.end(); ++it)
         {
-            if (((*it).bListenToAllChanges_ || ((*it).char_ == update)) && (!(*it).bOnlySingleInput_ || bSingleInput))
+            if ((!(*it).trueKeyFalseChar_) && ((*it).bListenToAllChanges_ || ((*it).char_ == update)) && (!(*it).bOnlySingleInput_ || bSingleInput))
                 (*(*it).listener_.*(*it).function_)();
         }
     }
-
-    /*void InputBuffer::activityChanged() const
-    {
-    }*/
 
     bool InputBuffer::charIsAllowed(const char& input)
@@ -136,10 +120,9 @@
     bool InputBuffer::keyPressed(const OIS::KeyEvent &e)
     {
-        /*if (e.key == OIS::KC_NUMPADENTER)
+        for (std::list<InputBufferListenerTuple>::iterator it = this->listeners_.begin(); it != this->listeners_.end(); ++it)
         {
-            this->setActivated(!this->isActivated());
-            this->clear();
-            return true;
-        }*/
+            if ((*it).trueKeyFalseChar_ && ((*it).key_ == e.key))
+                (*(*it).listener_.*(*it).function_)();
+        }
 
         if (this->keyboard_->isModifierDown(OIS::Keyboard::Ctrl))
@@ -177,10 +160,4 @@
         }
 
-        //std::cout << this->keyboard_->getAsString(e.key) << " / " << (char)e.text << std::endl;
-
-        std::string input = this->keyboard_->getAsString(e.key);
-        /*if (input.size() >= 1)
-            this->append(input[0]);*/
-
         this->append((char)e.text);
         return true;
Index: code/branches/console/src/core/InputBuffer.h
===================================================================
--- code/branches/console/src/core/InputBuffer.h	(revision 1311)
+++ code/branches/console/src/core/InputBuffer.h	(revision 1312)
@@ -54,5 +54,7 @@
             bool bListenToAllChanges_;
             bool bOnlySingleInput_;
+            bool trueKeyFalseChar_;
             char char_;
+            OIS::KeyCode key_;
         };
 
@@ -64,5 +66,5 @@
             void registerListener(T* listener, void (T::*function)(), bool bOnlySingleInput)
             {
-                struct InputBufferListenerTuple newListener = {listener, (void (InputBufferListener::*)())function, true, bOnlySingleInput, ' '};
+                struct InputBufferListenerTuple newListener = {listener, (void (InputBufferListener::*)())function, true, bOnlySingleInput, false, '\0', OIS::KC_UNASSIGNED};
                 this->listeners_.insert(this->listeners_.end(), newListener);
             }
@@ -70,18 +72,31 @@
             void registerListener(T* listener, void (T::*function)() const, bool bOnlySingleInput)
             {
-                struct InputBufferListenerTuple newListener = {listener, (void (InputBufferListener::*)())function, true, bOnlySingleInput, ' '};
+                struct InputBufferListenerTuple newListener = {listener, (void (InputBufferListener::*)())function, true, bOnlySingleInput, false, '\0', OIS::KC_UNASSIGNED};
                 this->listeners_.insert(this->listeners_.end(), newListener);
             }
 
             template <class T>
-            void registerListener(T* listener, void (T::*function)(), char char_, bool bOnlySingleInput)
+            void registerListener(T* listener, void (T::*function)(), char _char, bool bOnlySingleInput)
             {
-                struct InputBufferListenerTuple newListener = {listener, (void (InputBufferListener::*)())function, false, bOnlySingleInput, char_};
+                struct InputBufferListenerTuple newListener = {listener, (void (InputBufferListener::*)())function, false, bOnlySingleInput, false, _char, OIS::KC_UNASSIGNED};
                 this->listeners_.insert(this->listeners_.end(), newListener);
             }
             template <class T>
-            void registerListener(T* listener, void (T::*function)() const, char char_, bool bOnlySingleInput)
+            void registerListener(T* listener, void (T::*function)() const, char _char, bool bOnlySingleInput)
             {
-                struct InputBufferListenerTuple newListener = {listener, (void (InputBufferListener::*)())function, false, bOnlySingleInput, char_};
+                struct InputBufferListenerTuple newListener = {listener, (void (InputBufferListener::*)())function, false, bOnlySingleInput, false, _char, OIS::KC_UNASSIGNED};
+                this->listeners_.insert(this->listeners_.end(), newListener);
+            }
+
+            template <class T>
+            void registerListener(T* listener, void (T::*function)(), OIS::KeyCode key)
+            {
+                struct InputBufferListenerTuple newListener = {listener, (void (InputBufferListener::*)())function, false, true, true, '\0', key};
+                this->listeners_.insert(this->listeners_.end(), newListener);
+            }
+            template <class T>
+            void registerListener(T* listener, void (T::*function)() const, OIS::KeyCode key)
+            {
+                struct InputBufferListenerTuple newListener = {listener, (void (InputBufferListener::*)())function, false, true, true, '\0', key};
                 this->listeners_.insert(this->listeners_.end(), newListener);
             }
@@ -99,15 +114,4 @@
                 { return this->buffer_; }
 
-            /*inline void activate()
-                { this->setActivated(true); }
-            inline void deactivate()
-                { this->setActivated(false); }
-            inline void setActivated(bool bActivated)
-                { if (this->bActivated_ != bActivated) { this->bActivated_ = bActivated; this->activityChanged(); } else { this->bActivated_ = bActivated; } }
-            inline bool isActivated() const
-                { return this->bActivated_; }
-
-            void activityChanged() const;*/
-
         private:
             bool charIsAllowed(const char& input);
@@ -117,5 +121,4 @@
 
             OIS::Keyboard* keyboard_;
-            //bool bActivated_;
             std::string buffer_;
             std::list<InputBufferListenerTuple> listeners_;
Index: code/branches/console/src/core/OutputBuffer.cc
===================================================================
--- code/branches/console/src/core/OutputBuffer.cc	(revision 1312)
+++ code/branches/console/src/core/OutputBuffer.cc	(revision 1312)
@@ -0,0 +1,73 @@
+/*
+ *   ORXONOX - the hottest 3D action shooter ever to exist
+ *                    > www.orxonox.net <
+ *
+ *
+ *   License notice:
+ *
+ *   This program is free software; you can redistribute it and/or
+ *   modify it under the terms of the GNU General Public License
+ *   as published by the Free Software Foundation; either version 2
+ *   of the License, or (at your option) any later version.
+ *
+ *   This program is distributed in the hope that it will be useful,
+ *   but WITHOUT ANY WARRANTY; without even the implied warranty of
+ *   MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+ *   GNU General Public License for more details.
+ *
+ *   You should have received a copy of the GNU General Public License
+ *   along with this program; if not, write to the Free Software
+ *   Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA  02110-1301, USA.
+ *
+ *   Author:
+ *      Fabian 'x3n' Landau
+ *   Co-authors:
+ *      ...
+ *
+ */
+
+#include "OutputBuffer.h"
+
+#define OUTPUTBUFFER_MAX_LINE_LENGTH 16384
+
+namespace orxonox
+{
+    OutputBuffer& OutputBuffer::getOutputBuffer()
+    {
+        static OutputBuffer instance;
+        return instance;
+    }
+
+    void OutputBuffer::registerListener(OutputBufferListener* listener)
+    {
+        this->listeners_.insert(listener);
+    }
+
+    void OutputBuffer::unregisterListener(OutputBufferListener* listener)
+    {
+        std::set<OutputBufferListener*>::iterator it = this->listeners_.find(listener);
+        if (it != this->listeners_.end())
+            this->listeners_.erase(it);
+    }
+
+    bool OutputBuffer::getLine(std::string* output)
+    {
+        char line[OUTPUTBUFFER_MAX_LINE_LENGTH];
+
+        this->stream_.getline(line, OUTPUTBUFFER_MAX_LINE_LENGTH);
+        (*output) = std::string(line);
+
+        bool eof = this->stream_.eof();
+
+        if (eof)
+            this->stream_.flush();
+
+        return (!eof);
+    }
+
+    void OutputBuffer::callListeners()
+    {
+        for (std::set<OutputBufferListener*>::iterator it = this->listeners_.begin(); it != this->listeners_.end(); ++it)
+            (*it)->bufferChanged();
+    }
+}
Index: code/branches/console/src/core/OutputBuffer.h
===================================================================
--- code/branches/console/src/core/OutputBuffer.h	(revision 1312)
+++ code/branches/console/src/core/OutputBuffer.h	(revision 1312)
@@ -0,0 +1,100 @@
+/*
+ *   ORXONOX - the hottest 3D action shooter ever to exist
+ *                    > www.orxonox.net <
+ *
+ *
+ *   License notice:
+ *
+ *   This program is free software; you can redistribute it and/or
+ *   modify it under the terms of the GNU General Public License
+ *   as published by the Free Software Foundation; either version 2
+ *   of the License, or (at your option) any later version.
+ *
+ *   This program is distributed in the hope that it will be useful,
+ *   but WITHOUT ANY WARRANTY; without even the implied warranty of
+ *   MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+ *   GNU General Public License for more details.
+ *
+ *   You should have received a copy of the GNU General Public License
+ *   along with this program; if not, write to the Free Software
+ *   Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA  02110-1301, USA.
+ *
+ *   Author:
+ *      Fabian 'x3n' Landau
+ *   Co-authors:
+ *      ...
+ *
+ */
+
+#ifndef _OutputBuffer_H__
+#define _OutputBuffer_H__
+
+#include <set>
+#include <sstream>
+
+#include "CorePrereqs.h"
+
+namespace orxonox
+{
+    class OutputBufferListener
+    {
+        friend class OutputBuffer;
+        virtual void outputChanged() = 0;
+    };
+
+    class _CoreExport OutputBuffer
+    {
+        public:
+            static OutputBuffer& getOutputBuffer();
+
+            template <class T>
+            inline OutputBuffer& operator<<(T object)
+            {
+                this->stream_ << object;
+                this->callListeners();
+                return &this;
+            }
+
+            template <class T>
+            inline void add(T object)
+            {
+                this->stream_ << object;
+                this->callListeners();
+            }
+
+            template <class T>
+            inline void addLine(T object)
+            {
+                this->stream_ << object << std::endl;
+                this->callListeners();
+            }
+
+            inline void newline()
+            {
+                this->stream_ << std::endl;
+                this->callListeners();
+            }
+
+            inline void flush()
+            {
+                this->stream_.flush();
+            }
+
+            bool getLine(std::string* output);
+
+            void registerListener(OutputBufferListener* listener);
+            void unregisterListener(OutputBufferListener* listener);
+
+        private:
+            OutputBuffer() {}
+            OutputBuffer(const OutputBuffer& other);
+            ~OutputBuffer() {}
+
+            void callListeners();
+
+            std::stringstream stream_;
+            std::set<OutputBufferListener*> listeners_;
+    };
+}
+
+#endif /* _OutputBuffer_H__ */
Index: code/branches/console/src/core/Shell.cc
===================================================================
--- code/branches/console/src/core/Shell.cc	(revision 1312)
+++ code/branches/console/src/core/Shell.cc	(revision 1312)
@@ -0,0 +1,74 @@
+/*
+ *   ORXONOX - the hottest 3D action shooter ever to exist
+ *                    > www.orxonox.net <
+ *
+ *
+ *   License notice:
+ *
+ *   This program is free software; you can redistribute it and/or
+ *   modify it under the terms of the GNU General Public License
+ *   as published by the Free Software Foundation; either version 2
+ *   of the License, or (at your option) any later version.
+ *
+ *   This program is distributed in the hope that it will be useful,
+ *   but WITHOUT ANY WARRANTY; without even the implied warranty of
+ *   MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+ *   GNU General Public License for more details.
+ *
+ *   You should have received a copy of the GNU General Public License
+ *   along with this program; if not, write to the Free Software
+ *   Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA  02110-1301, USA.
+ *
+ *   Author:
+ *      Fabian 'x3n' Landau
+ *   Co-authors:
+ *      ...
+ *
+ */
+
+#include "CorePrereqs.h"
+
+#include "OrxonoxClass.h"
+#include "InputBuffer.h"
+#include "OutputBuffer.h"
+
+namespace orxonox
+{
+    Shell::Shell()
+    {
+        this->inputBuffer_.registerListener(this, &Shell::inputChanged, true);
+        this->inputBuffer_.registerListener(this, &Shell::execute, '\r', false);
+        this->inputBuffer_.registerListener(this, &Shell::hintandcomplete, '\t', true);
+        this->inputBuffer_.registerListener(this, &Shell::clear, '§', true);
+        this->inputBuffer_.registerListener(this, &Shell::backspace, '\b', true);
+        this->inputBuffer_.registerListener(this, &Shell::exit, (char)27, true);
+        this->inputBuffer_.registerListener(this, &Shell::cursor_right, OIS::KC_RIGHT);
+        this->inputBuffer_.registerListener(this, &Shell::cursor_left, OIS::KC_LEFT);
+        this->inputBuffer_.registerListener(this, &Shell::history_up, OIS::KC_UP);
+        this->inputBuffer_.registerListener(this, &Shell::history_down, OIS::KC_DOWN);
+        this->inputBuffer_.registerListener(this, &Shell::scroll_up, OIS::KC_PGUP);
+        this->inputBuffer_.registerListener(this, &Shell::scroll_down, OIS::KC_PGDOWN);
+    }
+
+    Shell& Shell::getInstance()
+    {
+        static instance Shell;
+        return instance;
+    }
+
+    void Shell::setConfigValues()
+
+    void Shell::outputChanged()
+    void Shell::inputChanged()
+    void Shell::execute()
+    void Shell::hintandcomplete()
+    void Shell::backspace()
+    void Shell::clear()
+    void Shell::cursor_right()
+    void Shell::cursor_left()
+    void Shell::history_up()
+    void Shell::history_down()
+    void Shell::scroll_up()
+    void Shell::scroll_down()
+    void Shell::exit()
+}
Index: code/branches/console/src/core/Shell.h
===================================================================
--- code/branches/console/src/core/Shell.h	(revision 1312)
+++ code/branches/console/src/core/Shell.h	(revision 1312)
@@ -0,0 +1,82 @@
+/*
+ *   ORXONOX - the hottest 3D action shooter ever to exist
+ *                    > www.orxonox.net <
+ *
+ *
+ *   License notice:
+ *
+ *   This program is free software; you can redistribute it and/or
+ *   modify it under the terms of the GNU General Public License
+ *   as published by the Free Software Foundation; either version 2
+ *   of the License, or (at your option) any later version.
+ *
+ *   This program is distributed in the hope that it will be useful,
+ *   but WITHOUT ANY WARRANTY; without even the implied warranty of
+ *   MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+ *   GNU General Public License for more details.
+ *
+ *   You should have received a copy of the GNU General Public License
+ *   along with this program; if not, write to the Free Software
+ *   Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA  02110-1301, USA.
+ *
+ *   Author:
+ *      Fabian 'x3n' Landau
+ *   Co-authors:
+ *      ...
+ *
+ */
+
+#ifndef _Shell_H__
+#define _Shell_H__
+
+#include "CorePrereqs.h"
+
+#include "OrxonoxClass.h"
+#include "InputBuffer.h"
+#include "OutputBuffer.h"
+
+namespace orxonox
+{
+    class ShellListener
+    {
+        virtual void outputChanged() = 0;
+        virtual void lastLineChanged() = 0;
+        virtual void inputChanged() = 0;
+        virtual void exit() = 0;
+    }
+
+    class _CoreExport Shell : virtual public OrxonoxClass, public InputBufferListener, public OutputBufferListener
+    {
+        public:
+            static Shell& getInstance();
+
+            virtual void setConfigValues();
+
+        private:
+            Shell();
+            Shell(const Shell& other);
+            ~Shell() {}
+
+            virtual void outputChanged();
+            void inputChanged();
+            void execute();
+            void hintandcomplete();
+            void backspace();
+            void cursor_right();
+            void cursor_left();
+            void history_up();
+            void history_down();
+            void scroll_up();
+            void scroll_down();
+            void exit();
+
+            InputBuffer inputBuffer_;
+            OutputBuffer OutputBuffer_;
+            std::list<std::string> lines_;
+            unsigned int cursor_;
+            std::vector<std::string> commandHistory_;
+            unsigned int maxHistoryLength_;
+    };
+}
+
+#endif /* _Shell_H__ */
