Index: /trunk/src/VBox/Frontends/VirtualBox/src/settings/global/UIGlobalSettingsInput.cpp
===================================================================
--- /trunk/src/VBox/Frontends/VirtualBox/src/settings/global/UIGlobalSettingsInput.cpp	(revision 44736)
+++ /trunk/src/VBox/Frontends/VirtualBox/src/settings/global/UIGlobalSettingsInput.cpp	(revision 44737)
@@ -24,6 +24,8 @@
 #include <QStyledItemDelegate>
 #include <QItemEditorFactory>
+#include <QTabWidget>
 
 /* GUI includes: */
+#include "QIWidgetValidator.h"
 #include "UIGlobalSettingsInput.h"
 #include "UIShortcutPool.h"
@@ -34,12 +36,36 @@
 /* Input page constructor: */
 UIGlobalSettingsInput::UIGlobalSettingsInput()
+    : m_pValidator(0)
 {
     /* Apply UI decorations: */
     Ui::UIGlobalSettingsInput::setupUi(this);
 
-    /* Set the new shortcut for the eraze-host-combo button: */
-    m_pResetHostCombinationButton->setShortcut(QKeySequence());
-    new QShortcut(QKeySequence(Qt::Key_Delete), m_pResetHostCombinationButton, SLOT(animateClick()));
-    new QShortcut(QKeySequence(Qt::Key_Backspace), m_pResetHostCombinationButton, SLOT(animateClick()));
+    /* Create selector model/table: */
+    m_pSelectorModel = new UIHotKeyTableModel(this, UIActionPoolType_Selector);
+    m_pSelectorTable = new UIHotKeyTable(m_pSelectorModel);
+    /* Create machine model/table: */
+    m_pMachineModel = new UIHotKeyTableModel(this, UIActionPoolType_Runtime);
+    m_pMachineTable = new UIHotKeyTable(m_pMachineModel);
+
+    /* Create tab widget layout: */
+    QVBoxLayout *pVerticalLayout = new QVBoxLayout;
+    pVerticalLayout->setContentsMargins(0, 0, 0, 0);
+    pVerticalLayout->setSpacing(1);
+
+    /* Create tab widget: */
+    m_pTabWidget = new QTabWidget(this);
+    m_pTabWidget->setMinimumWidth(400);
+    m_pTabWidget->insertTab(UIHotKeyTableIndex_Selector, m_pSelectorTable, QString());
+    m_pTabWidget->insertTab(UIHotKeyTableIndex_Machine, m_pMachineTable, QString());
+    pVerticalLayout->addWidget(m_pTabWidget);
+
+    /* Create filter edit: */
+    m_pFilterEditor = new QLineEdit(this);
+    connect(m_pFilterEditor, SIGNAL(textChanged(const QString &)),
+            this, SLOT(sltHandleFilterTextChange()));
+    pVerticalLayout->addWidget(m_pFilterEditor);
+
+    /* Add vertical layout into main one: */
+    m_pMainLayout->addLayout(pVerticalLayout, 0, 0);
 
     /* Apply language settings: */
@@ -54,6 +80,17 @@
     UISettingsPageGlobal::fetchData(data);
 
-    /* Load to cache: */
-    m_cache.m_strHostCombo = m_settings.hostCombo();
+    /* Load host-combo shortcut to cache: */
+    m_cache.m_shortcuts << UIShortcutCacheItem(UIHostCombo::hostComboCacheKey(), tr("Host Combo"),  m_settings.hostCombo(), QString());
+    /* Load all other shortcuts to cache: */
+    const QMap<QString, UIShortcut>& shortcuts = gShortcutPool->shortcuts();
+    const QList<QString> shortcutKeys = shortcuts.keys();
+    foreach (const QString &strShortcutKey, shortcutKeys)
+    {
+        const UIShortcut &shortcut = shortcuts[strShortcutKey];
+        m_cache.m_shortcuts << UIShortcutCacheItem(strShortcutKey, VBoxGlobal::removeAccelMark(shortcut.description()),
+                                                   shortcut.sequence().toString(QKeySequence::NativeText),
+                                                   shortcut.defaultSequence().toString(QKeySequence::NativeText));
+    }
+    /* Load other things to cache: */
     m_cache.m_fAutoCapture = m_settings.autoCapture();
 
@@ -67,6 +104,11 @@
 {
     /* Fetch from cache: */
-    m_pHostKeyEditor->setCombo(m_cache.m_strHostCombo);
+    m_pSelectorModel->load(m_cache.m_shortcuts);
+    m_pMachineModel->load(m_cache.m_shortcuts);
     m_pEnableAutoGrabCheckbox->setChecked(m_cache.m_fAutoCapture);
+
+    /* Revalidate if possible: */
+    if (m_pValidator)
+        m_pValidator->revalidate();
 }
 
@@ -76,5 +118,6 @@
 {
     /* Upload to cache: */
-    m_cache.m_strHostCombo = m_pHostKeyEditor->combo().toString();
+    m_pSelectorModel->save(m_cache.m_shortcuts);
+    m_pMachineModel->save(m_cache.m_shortcuts);
     m_cache.m_fAutoCapture = m_pEnableAutoGrabCheckbox->isChecked();
 }
@@ -87,6 +130,16 @@
     UISettingsPageGlobal::fetchData(data);
 
-    /* Save from cache: */
-    m_settings.setHostCombo(m_cache.m_strHostCombo);
+    /* Save host-combo shortcut from cache: */
+    UIShortcutCacheItem fakeHostComboItem(UIHostCombo::hostComboCacheKey(), QString(), QString(), QString());
+    int iIndexOfHostComboItem = m_cache.m_shortcuts.indexOf(fakeHostComboItem);
+    if (iIndexOfHostComboItem != -1)
+        m_settings.setHostCombo(m_cache.m_shortcuts[iIndexOfHostComboItem].currentSequence);
+    /* Iterate over cached shortcuts: */
+    QMap<QString, QString> sequences;
+    foreach (const UIShortcutCacheItem &item, m_cache.m_shortcuts)
+        sequences.insert(item.key, item.currentSequence);
+    /* Save shortcut sequences from cache: */
+    gShortcutPool->setOverrides(sequences);
+    /* Save other things from cache: */
     m_settings.setAutoCapture(m_cache.m_fAutoCapture);
 
@@ -95,10 +148,35 @@
 }
 
+void UIGlobalSettingsInput::setValidator(QIWidgetValidator *pValidator)
+{
+    m_pValidator = pValidator;
+    connect(m_pSelectorModel, SIGNAL(sigRevalidationRequired()), m_pValidator, SLOT(revalidate()));
+    connect(m_pMachineModel, SIGNAL(sigRevalidationRequired()), m_pValidator, SLOT(revalidate()));
+}
+
+bool UIGlobalSettingsInput::revalidate(QString &strWarning, QString &strTitle)
+{
+    /* Check for unique shortcuts: */
+    if (!m_pSelectorModel->isAllShortcutsUnique())
+    {
+        strTitle += ": " + VBoxGlobal::removeAccelMark(m_pTabWidget->tabText(UIHotKeyTableIndex_Selector));
+        strWarning = tr("there are duplicated shortcuts found.");
+        return false;
+    }
+    else if (!m_pMachineModel->isAllShortcutsUnique())
+    {
+        strTitle += ": " + VBoxGlobal::removeAccelMark(m_pTabWidget->tabText(UIHotKeyTableIndex_Machine));
+        strWarning = tr("there are duplicated shortcuts found.");
+        return false;
+    }
+
+    return true;
+}
+
 /* Navigation stuff: */
 void UIGlobalSettingsInput::setOrderAfter(QWidget *pWidget)
 {
-    setTabOrder(pWidget, m_pHostKeyEditor);
-    setTabOrder(m_pHostKeyEditor, m_pResetHostCombinationButton);
-    setTabOrder(m_pResetHostCombinationButton, m_pEnableAutoGrabCheckbox);
+    setTabOrder(pWidget, m_pTabWidget);
+    setTabOrder(m_pTabWidget, m_pEnableAutoGrabCheckbox);
 }
 
@@ -107,5 +185,21 @@
 {
     /* Translate uic generated strings: */
-    Ui::UIGlobalSettingsInput::retranslateUi (this);
+    Ui::UIGlobalSettingsInput::retranslateUi(this);
+
+    /* Translate tab-widget labels: */
+    m_pTabWidget->setTabText(UIHotKeyTableIndex_Selector, tr("&VirtualBox Manager"));
+    m_pTabWidget->setTabText(UIHotKeyTableIndex_Machine, tr("Virtual &Machine"));
+    m_pSelectorTable->setWhatsThis(tr("Lists all the available shortcuts "
+                                      "which can be configured."));
+    m_pMachineTable->setWhatsThis(tr("Lists all the available shortcuts "
+                                     "which can be configured."));
+    m_pFilterEditor->setWhatsThis(tr("Allows to filter the shortcuts list."));
+}
+
+/* Filtering stuff: */
+void UIGlobalSettingsInput::sltHandleFilterTextChange()
+{
+    m_pSelectorModel->setFilter(m_pFilterEditor->text());
+    m_pMachineModel->setFilter(m_pFilterEditor->text());
 }
 
Index: /trunk/src/VBox/Frontends/VirtualBox/src/settings/global/UIGlobalSettingsInput.h
===================================================================
--- /trunk/src/VBox/Frontends/VirtualBox/src/settings/global/UIGlobalSettingsInput.h	(revision 44736)
+++ /trunk/src/VBox/Frontends/VirtualBox/src/settings/global/UIGlobalSettingsInput.h	(revision 44737)
@@ -29,4 +29,10 @@
 #include "UIActionPool.h"
 
+/* Forward declartions: */
+class QTabWidget;
+class QLineEdit;
+class UIHotKeyTableModel;
+class UIHotKeyTable;
+
 /* Global settings / Input page / Cache / Shortcut cache item: */
 struct UIShortcutCacheItem
@@ -103,5 +109,5 @@
 struct UISettingsCacheGlobalInput
 {
-    QString m_strHostCombo;
+    UIShortcutCache m_shortcuts;
     bool m_fAutoCapture;
 };
@@ -133,4 +139,8 @@
     void saveFromCacheTo(QVariant &data);
 
+    /* Validation stuff: */
+    void setValidator(QIWidgetValidator *pValidator);
+    bool revalidate(QString &strWarning, QString &strTitle);
+
     /* Navigation stuff: */
     void setOrderAfter(QWidget *pWidget);
@@ -139,8 +149,27 @@
     void retranslateUi();
 
+private slots:
+
+    /* Handler: Filtering stuff: */
+    void sltHandleFilterTextChange();
+
 private:
 
     /* Cache: */
+    QIWidgetValidator *m_pValidator;
     UISettingsCacheGlobalInput m_cache;
+    QTabWidget *m_pTabWidget;
+    QLineEdit *m_pFilterEditor;
+    UIHotKeyTableModel *m_pSelectorModel;
+    UIHotKeyTable *m_pSelectorTable;
+    UIHotKeyTableModel *m_pMachineModel;
+    UIHotKeyTable *m_pMachineTable;
+};
+
+/* Hot-key table indexes: */
+enum UIHotKeyTableIndex
+{
+    UIHotKeyTableIndex_Selector = 0,
+    UIHotKeyTableIndex_Machine = 1
 };
 
Index: /trunk/src/VBox/Frontends/VirtualBox/src/settings/global/UIGlobalSettingsInput.ui
===================================================================
--- /trunk/src/VBox/Frontends/VirtualBox/src/settings/global/UIGlobalSettingsInput.ui	(revision 44736)
+++ /trunk/src/VBox/Frontends/VirtualBox/src/settings/global/UIGlobalSettingsInput.ui	(revision 44737)
@@ -27,57 +27,5 @@
     <number>0</number>
    </property>
-   <item row="0" column="0">
-    <spacer>
-     <property name="orientation">
-      <enum>Qt::Horizontal</enum>
-     </property>
-     <property name="sizeType">
-      <enum>QSizePolicy::Fixed</enum>
-     </property>
-     <property name="sizeHint" stdset="0">
-      <size>
-       <width>40</width>
-       <height>20</height>
-      </size>
-     </property>
-    </spacer>
-   </item>
-   <item row="0" column="1">
-    <widget class="QLabel" name="m_pHostKeyLabel">
-     <property name="text">
-      <string>Host &amp;Key:</string>
-     </property>
-     <property name="buddy">
-      <cstring>m_pHostKeyEditor</cstring>
-     </property>
-    </widget>
-   </item>
-   <item row="0" column="2">
-    <widget class="UIHostComboEditor" name="m_pHostKeyEditor">
-     <property name="whatsThis">
-      <string>Displays the key used as a Host Key in the VM window. Activate the entry field and press a new Host Key. Note that alphanumeric, cursor movement and editing keys cannot be used.</string>
-     </property>
-     <property name="sizePolicy">
-      <sizepolicy hsizetype="MinimumExpanding" vsizetype="Minimum">
-       <horstretch>0</horstretch>
-       <verstretch>0</verstretch>
-      </sizepolicy>
-     </property>
-    </widget>
-   </item>
-   <item row="0" column="3">
-    <widget class="UIResetButton" name="m_pResetHostCombinationButton">
-     <property name="focusPolicy">
-      <enum>Qt::StrongFocus</enum>
-     </property>
-     <property name="toolTip">
-      <string>Reset host combination</string>
-     </property>
-     <property name="whatsThis">
-      <string>Resets the key combination used as the host combination in the VM window.</string>
-     </property>
-    </widget>
-   </item>
-   <item row="1" column="2" colspan="2">
+   <item row="1" column="0">
     <widget class="QCheckBox" name="m_pEnableAutoGrabCheckbox">
      <property name="whatsThis">
@@ -89,49 +37,8 @@
     </widget>
    </item>
-   <item row="2" column="0" colspan="4">
-    <spacer>
-     <property name="orientation">
-      <enum>Qt::Vertical</enum>
-     </property>
-     <property name="sizeHint" stdset="0">
-      <size>
-       <width>0</width>
-       <height>0</height>
-      </size>
-     </property>
-    </spacer>
-   </item>
   </layout>
  </widget>
- <customwidgets>
-  <customwidget>
-   <class>UIHostComboEditor</class>
-   <extends>QLineEdit</extends>
-   <header>UIHostComboEditor.h</header>
-  </customwidget>
-  <customwidget>
-   <class>UIResetButton</class>
-   <extends>QAbstractButton</extends>
-   <header>UISpecialControls.h</header>
-  </customwidget>
- </customwidgets>
+ <customwidgets/>
  <resources/>
- <connections>
-  <connection>
-   <sender>m_pResetHostCombinationButton</sender>
-   <signal>clicked(bool)</signal>
-   <receiver>m_pHostKeyEditor</receiver>
-   <slot>sltClear()</slot>
-   <hints>
-    <hint type="sourcelabel">
-     <x>111</x>
-     <y>19</y>
-    </hint>
-    <hint type="destinationlabel">
-     <x>124</x>
-     <y>61</y>
-    </hint>
-   </hints>
-  </connection>
- </connections>
+ <connections/>
 </ui>
Index: /trunk/src/VBox/Frontends/VirtualBox/src/widgets/UIHostComboEditor.cpp
===================================================================
--- /trunk/src/VBox/Frontends/VirtualBox/src/widgets/UIHostComboEditor.cpp	(revision 44736)
+++ /trunk/src/VBox/Frontends/VirtualBox/src/widgets/UIHostComboEditor.cpp	(revision 44737)
@@ -310,5 +310,4 @@
     /* Configure widget: */
     setAttribute(Qt::WA_NativeWindow);
-    setAlignment(Qt::AlignCenter);
     setContextMenuPolicy(Qt::NoContextMenu);
     connect(this, SIGNAL(selectionChanged()), this, SLOT(sltDeselect()));
