Index: /trunk/src/VBox/Frontends/VirtualBox/src/widgets/UIHostComboEditor.cpp
===================================================================
--- /trunk/src/VBox/Frontends/VirtualBox/src/widgets/UIHostComboEditor.cpp	(revision 50552)
+++ /trunk/src/VBox/Frontends/VirtualBox/src/widgets/UIHostComboEditor.cpp	(revision 50553)
@@ -28,4 +28,6 @@
 #include "UIHostComboEditor.h"
 #include "VBoxGlobal.h"
+#include "QIToolButton.h"
+#include "UIIconPool.h"
 
 #ifdef Q_WS_WIN
@@ -314,6 +316,63 @@
 
 UIHostComboEditor::UIHostComboEditor(QWidget *pParent)
-    : QLineEdit(pParent)
-    , m_pReleaseTimer(0)
+    : QIWithRetranslateUI<QWidget>(pParent)
+{
+    /* Prepare: */
+    prepare();
+}
+
+void UIHostComboEditor::prepare()
+{
+    /* Configure self: */
+    setAutoFillBackground(true);
+    /* Create layout: */
+    QHBoxLayout *pLayout = new QHBoxLayout(this);
+    {
+        /* Configure layout: */
+        pLayout->setSpacing(4);
+        pLayout->setContentsMargins(0, 0, 0, 0);
+        /* Create UIHostComboEditorPrivate instance: */
+        m_pEditor = new UIHostComboEditorPrivate;
+        {
+            /* Configure UIHostComboEditorPrivate instance: */
+            setFocusProxy(m_pEditor);
+        }
+        /* Create 'clear' tool-button: */
+        m_pButtonClear = new QIToolButton;
+        {
+            /* Configure 'clear' tool-button: */
+            m_pButtonClear->removeBorder();
+            m_pButtonClear->setIcon(UIIconPool::iconSet(":/eraser_16px.png"));
+            connect(m_pButtonClear, SIGNAL(clicked(bool)), m_pEditor, SLOT(sltClear()));
+        }
+        /* Add widgets to layout: */
+        pLayout->addWidget(m_pEditor);
+        pLayout->addWidget(m_pButtonClear);
+    }
+    /* Translate finally: */
+    retranslateUi();
+}
+
+void UIHostComboEditor::retranslateUi()
+{
+    /* Translate 'clear' tool-button: */
+    m_pButtonClear->setToolTip(QApplication::translate("UIHotKeyEditor", "Unset shortcut"));
+}
+
+void UIHostComboEditor::setCombo(const UIHostComboWrapper &strCombo)
+{
+    /* Pass combo to child: */
+    m_pEditor->setCombo(strCombo);
+}
+
+UIHostComboWrapper UIHostComboEditor::combo() const
+{
+    /* Acquire combo from child: */
+    return m_pEditor->combo();
+}
+
+
+UIHostComboEditorPrivate::UIHostComboEditorPrivate()
+    : m_pReleaseTimer(0)
     , m_fStartNewSequence(true)
 {
@@ -321,4 +380,5 @@
     setAttribute(Qt::WA_NativeWindow);
     setContextMenuPolicy(Qt::NoContextMenu);
+    setSizePolicy(QSizePolicy::MinimumExpanding, QSizePolicy::Expanding);
     connect(this, SIGNAL(selectionChanged()), this, SLOT(sltDeselect()));
 
@@ -335,18 +395,18 @@
 #ifdef Q_WS_MAC
     m_uDarwinKeyModifiers = 0;
-    UICocoaApplication::instance()->registerForNativeEvents(RT_BIT_32(10) | RT_BIT_32(11) | RT_BIT_32(12) /* NSKeyDown  | NSKeyUp | | NSFlagsChanged */, UIHostComboEditor::darwinEventHandlerProc, this);
+    UICocoaApplication::instance()->registerForNativeEvents(RT_BIT_32(10) | RT_BIT_32(11) | RT_BIT_32(12) /* NSKeyDown  | NSKeyUp | | NSFlagsChanged */, UIHostComboEditorPrivate::darwinEventHandlerProc, this);
     ::DarwinGrabKeyboard(false /* just modifiers */);
 #endif /* Q_WS_MAC */
 }
 
-UIHostComboEditor::~UIHostComboEditor()
+UIHostComboEditorPrivate::~UIHostComboEditorPrivate()
 {
 #ifdef Q_WS_MAC
     ::DarwinReleaseKeyboard();
-    UICocoaApplication::instance()->unregisterForNativeEvents(RT_BIT_32(10) | RT_BIT_32(11) | RT_BIT_32(12) /* NSKeyDown  | NSKeyUp | | NSFlagsChanged */, UIHostComboEditor::darwinEventHandlerProc, this);
+    UICocoaApplication::instance()->unregisterForNativeEvents(RT_BIT_32(10) | RT_BIT_32(11) | RT_BIT_32(12) /* NSKeyDown  | NSKeyUp | | NSFlagsChanged */, UIHostComboEditorPrivate::darwinEventHandlerProc, this);
 #endif /* Q_WS_MAC */
 }
 
-void UIHostComboEditor::setCombo(const UIHostComboWrapper &strCombo)
+void UIHostComboEditorPrivate::setCombo(const UIHostComboWrapper &strCombo)
 {
     /* Cleanup old combo: */
@@ -361,5 +421,5 @@
 }
 
-UIHostComboWrapper UIHostComboEditor::combo() const
+UIHostComboWrapper UIHostComboEditorPrivate::combo() const
 {
     /* Compose current combination: */
@@ -372,13 +432,17 @@
 }
 
-void UIHostComboEditor::sltDeselect()
+void UIHostComboEditorPrivate::sltDeselect()
 {
     deselect();
 }
 
-void UIHostComboEditor::sltClear()
-{
+void UIHostComboEditorPrivate::sltClear()
+{
+    /* Cleanup combo: */
     m_shownKeys.clear();
+    /* Update text: */
     updateText();
+    /* Move the focus to text-field: */
+    setFocus();
 }
 
@@ -453,5 +517,5 @@
 }
 
-bool UIHostComboEditor::winEvent(MSG *pMsg, long* /* pResult */)
+bool UIHostComboEditorPrivate::winEvent(MSG *pMsg, long* /* pResult */)
 {
     switch (pMsg->message)
@@ -484,5 +548,5 @@
 #pragma GCC diagnostic push
 #pragma GCC diagnostic ignored "-Wdeprecated-declarations"
-bool UIHostComboEditor::x11Event(XEvent *pEvent)
+bool UIHostComboEditorPrivate::x11Event(XEvent *pEvent)
 {
     switch (pEvent->type)
@@ -511,7 +575,7 @@
 #ifdef Q_WS_MAC
 /* static */
-bool UIHostComboEditor::darwinEventHandlerProc(const void *pvCocoaEvent, const void *pvCarbonEvent, void *pvUser)
-{
-    UIHostComboEditor *pEditor = static_cast<UIHostComboEditor*>(pvUser);
+bool UIHostComboEditorPrivate::darwinEventHandlerProc(const void *pvCocoaEvent, const void *pvCarbonEvent, void *pvUser)
+{
+    UIHostComboEditorPrivate *pEditor = static_cast<UIHostComboEditorPrivate*>(pvUser);
     EventRef inEvent = (EventRef)pvCarbonEvent;
     UInt32 EventClass = ::GetEventClass(inEvent);
@@ -521,5 +585,5 @@
 }
 
-bool UIHostComboEditor::darwinKeyboardEvent(const void *pvCocoaEvent, EventRef inEvent)
+bool UIHostComboEditorPrivate::darwinKeyboardEvent(const void *pvCocoaEvent, EventRef inEvent)
 {
     /* Ignore key changes unless we're the focus widget: */
@@ -567,9 +631,11 @@
 #endif /* Q_WS_MAC */
 
-void UIHostComboEditor::keyPressEvent(QKeyEvent *pEvent)
+void UIHostComboEditorPrivate::keyPressEvent(QKeyEvent *pEvent)
 {
     /* Ignore most of key presses... */
     switch (pEvent->key())
     {
+        case Qt::Key_Enter:
+        case Qt::Key_Return:
         case Qt::Key_Tab:
         case Qt::Key_Backtab:
@@ -587,5 +653,5 @@
 }
 
-void UIHostComboEditor::keyReleaseEvent(QKeyEvent *pEvent)
+void UIHostComboEditorPrivate::keyReleaseEvent(QKeyEvent *pEvent)
 {
     /* Ignore most of key presses... */
@@ -607,5 +673,5 @@
 }
 
-void UIHostComboEditor::mousePressEvent(QMouseEvent *pEvent)
+void UIHostComboEditorPrivate::mousePressEvent(QMouseEvent *pEvent)
 {
     /* Handle like for usual QWidget: */
@@ -613,5 +679,5 @@
 }
 
-void UIHostComboEditor::mouseReleaseEvent(QMouseEvent *pEvent)
+void UIHostComboEditorPrivate::mouseReleaseEvent(QMouseEvent *pEvent)
 {
     /* Handle like for usual QWidget: */
@@ -619,5 +685,5 @@
 }
 
-void UIHostComboEditor::sltReleasePendingKeys()
+void UIHostComboEditorPrivate::sltReleasePendingKeys()
 {
     /* Stop the timer, we process all pending keys at once: */
@@ -642,5 +708,5 @@
 }
 
-bool UIHostComboEditor::processKeyEvent(int iKeyCode, bool fKeyPress)
+bool UIHostComboEditorPrivate::processKeyEvent(int iKeyCode, bool fKeyPress)
 {
     /* Check if symbol is valid else pass it to Qt: */
@@ -695,8 +761,8 @@
 }
 
-void UIHostComboEditor::updateText()
+void UIHostComboEditorPrivate::updateText()
 {
     QStringList shownKeyNames(m_shownKeys.values());
-    setText(shownKeyNames.isEmpty() ? tr("None") : shownKeyNames.join(" + "));
-}
-
+    setText(shownKeyNames.isEmpty() ? UIHostComboEditor::tr("None") : shownKeyNames.join(" + "));
+}
+
Index: /trunk/src/VBox/Frontends/VirtualBox/src/widgets/UIHostComboEditor.h
===================================================================
--- /trunk/src/VBox/Frontends/VirtualBox/src/widgets/UIHostComboEditor.h	(revision 50552)
+++ /trunk/src/VBox/Frontends/VirtualBox/src/widgets/UIHostComboEditor.h	(revision 50553)
@@ -25,4 +25,11 @@
 #include <QMap>
 #include <QSet>
+
+/* GUI includes: */
+#include "QIWithRetranslateUI.h"
+
+/* Forward declarations: */
+class UIHostComboEditorPrivate;
+class QIToolButton;
 
 /* Native hot-key namespace to unify
@@ -69,6 +76,6 @@
 Q_DECLARE_METATYPE(UIHostComboWrapper);
 
-/* Host-combo editor widget: */
-class UIHostComboEditor : public QLineEdit
+/** Host-combo editor widget. */
+class UIHostComboEditor : public QIWithRetranslateUI<QWidget>
 {
     Q_OBJECT;
@@ -77,6 +84,35 @@
 public:
 
+    /** Constructs host-combo editor for passed @a pParent. */
     UIHostComboEditor(QWidget *pParent);
-    ~UIHostComboEditor();
+
+private:
+
+    /** Prepares widget content. */
+    void prepare();
+
+    /** Translates widget content. */
+    void retranslateUi();
+
+    /** Defines host-combo sequence. */
+    void setCombo(const UIHostComboWrapper &strCombo);
+    /** Returns host-combo sequence. */
+    UIHostComboWrapper combo() const;
+
+    /** UIHostComboEditorPrivate instance. */
+    UIHostComboEditorPrivate *m_pEditor;
+    /** <b>Clear</b> QIToolButton instance. */
+    QIToolButton *m_pButtonClear;
+};
+
+/* Host-combo editor widget private stuff: */
+class UIHostComboEditorPrivate : public QLineEdit
+{
+    Q_OBJECT;
+
+public:
+
+    UIHostComboEditorPrivate();
+    ~UIHostComboEditorPrivate();
 
     void setCombo(const UIHostComboWrapper &strCombo);
