Index: /trunk/src/VBox/Frontends/VirtualBox/src/runtime/information/guestctrl/UIGuestControlConsole.cpp
===================================================================
--- /trunk/src/VBox/Frontends/VirtualBox/src/runtime/information/guestctrl/UIGuestControlConsole.cpp	(revision 71051)
+++ /trunk/src/VBox/Frontends/VirtualBox/src/runtime/information/guestctrl/UIGuestControlConsole.cpp	(revision 71052)
@@ -79,4 +79,6 @@
 void UIGuestControlConsole::keyPressEvent(QKeyEvent *pEvent)
 {
+    /* Check if we at the bottom most line.*/
+    bool lastLine = blockCount() == (textCursor().blockNumber() +1);
 
     switch (pEvent->key()) {
@@ -90,5 +92,6 @@
         case Qt::Key_Down:
         {
-            replaceLineContent(getNextCommandFromHistory(getCommandString()));
+            if (lastLine)
+                replaceLineContent(getNextCommandFromHistory(getCommandString()));
             break;
         }
@@ -96,5 +99,5 @@
         {
             QTextCursor cursor = textCursor();
-            if (cursor.positionInBlock() > m_strPrompt.length())
+            if (lastLine && cursor.positionInBlock() > m_strPrompt.length())
                 cursor.deletePreviousChar();
             break;
@@ -110,14 +113,17 @@
         case Qt::Key_Enter:
         {
-            QString strCommand(getCommandString());
-            if (!strCommand.isEmpty())
+            if (lastLine)
             {
-                emit commandEntered(strCommand);
-                if (!m_tCommandHistory.contains(strCommand))
-                    m_tCommandHistory.push_back(strCommand);
-                m_uCommandHistoryIndex = m_tCommandHistory.size()-1;
-                moveCursor(QTextCursor::End);
-                QPlainTextEdit::keyPressEvent(pEvent);
-                startNextLine();
+                QString strCommand(getCommandString());
+                if (!strCommand.isEmpty())
+                {
+                    emit commandEntered(strCommand);
+                    if (!m_tCommandHistory.contains(strCommand))
+                        m_tCommandHistory.push_back(strCommand);
+                    m_uCommandHistoryIndex = m_tCommandHistory.size()-1;
+                    moveCursor(QTextCursor::End);
+                    QPlainTextEdit::keyPressEvent(pEvent);
+                    startNextLine();
+                }
             }
             break;
@@ -132,5 +138,6 @@
         }
         default:
-            QPlainTextEdit::keyPressEvent(pEvent);
+            if (lastLine)
+                QPlainTextEdit::keyPressEvent(pEvent);
             break;
     }
@@ -152,6 +159,6 @@
 void UIGuestControlConsole::contextMenuEvent(QContextMenuEvent *pEvent)
 {
-    //Q_UNUSED(pEvent);
-    QPlainTextEdit::contextMenuEvent(pEvent);
+    Q_UNUSED(pEvent);
+    //QPlainTextEdit::contextMenuEvent(pEvent);
 }
 
Index: /trunk/src/VBox/Frontends/VirtualBox/src/runtime/information/guestctrl/UIGuestControlTreeItem.cpp
===================================================================
--- /trunk/src/VBox/Frontends/VirtualBox/src/runtime/information/guestctrl/UIGuestControlTreeItem.cpp	(revision 71051)
+++ /trunk/src/VBox/Frontends/VirtualBox/src/runtime/information/guestctrl/UIGuestControlTreeItem.cpp	(revision 71052)
@@ -115,4 +115,6 @@
     return statusString;
 }
+
+
 /*********************************************************************************************************************************
 *   UIGuestControlTreeItem implementation.                                                                                       *
@@ -277,4 +279,5 @@
     setText(2, QString("Session Status: %1").arg(sessionStatusString(m_comGuestSession.GetStatus())));
 }
+
 
 /*********************************************************************************************************************************
